Codync
무료 오픈소스 1:1 대안, Grok Bot과 Muse 대신
Create, query, and modify causal graphs. 'caugi' (Causal Graph Interface) is a causality-first, high performance graph package that provides a simple interface to build, structure, and examine causal
개발 도구R · RustGitHub @frederikfabriciusbjerre온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기Causal Graph Interface (for R)
저장소 README에서 가져옴
README 전체를 불러오는 중입니다.
README 전문 보기 ↗Causal Graph Interface (for R) — a fast and flexible toolbox for building, coercing and analyzing causal graphs.
caugi?caugi (pronounced “corgi”) stands for Causal Graph Interface. It
is a causality-first graph package that focuses on performance and
flexibility. If you are developing scripts or algorithms in the field of
causality or if you are learning about causal graphs for the first time,
caugi is made for you.
You can install the development version of caugi from GitHub with:
pak::pak("frederikfabriciusbjerre/caugi")
or directly from CRAN with:
install.packages("caugi")
Rust is required for caugi to work. If you don’t have Rust installed,
visit rustup.rs for installation instructions
appropriate for your platform.
Alternatively, you may install Rust from your OS package manager.
caugiA caugi graph object is the bread and butter of the caugi package.
It is easy to create, query, and modify.
library(caugi)
You can create simple graphs as well as a number of predefined graph
classes. Currently, we support the classes "DAG", "PDAG", "MPDAG",
"CPDAG", "ADMG", "AG", "UG" as well as an "UNKNOWN" class. We
plan on supporting several other causal graph types in future releases,
such as "PAG", "MAG", and "SWIG".
# a tiny DAG
cg <- caugi(
A %-->% B + C,
B %-->% D,
C %-->% D,
class = "DAG"
)
plot(cg)
The available edges in caugi are listed below:
%-->% (directed)%---% (undirected)%<->% (bidirected)%o->% (partially directed)%--o% (partially undirected)%o-o% (partial)You can register more types with register_caugi_edge(), if you find
that you need a more expressive set of edges. For example, if you want
to represent a directed edge in the reverse direction, you can do so
like this:
register_caugi_edge(
glyph = "<--",
tail_mark = "arrow",
head_mark = "tail",
class = "directed",
symmetric = FALSE
)
caugi(A %-->% B, B %<--% C, class = "DAG")
#> <caugi object; 3 nodes, 2 edges; simple: TRUE; session=0xb4d198260>
#> graph_class: DAG
#> nodes: A, B, C
#> edges: A-->B, B<--C
# reset the registry to default with original edges
reset_caugi_registry()
We expect this feature to be needing further polishing in future releases, and we would love your input if you use this feature!
caugi provides a number of functions to query and analyze caugi
objects. Some of the available functions are:
caugi graphs are represented in a compact Compressed Sparse Row (CSR)
format in Rust. caugi works with a front-loading philosophy. Since the
caugi graph is stored in a CSR format, mutations of the graph is
computationally expensive compared to other graph storage systems, but
it allows for very fast querying. Additionally to the storage format of
the graph itself, caugi also stores additional information about node
relations in such a way that it allows for faster queries without
blowing up the object too much.
To accommodate for the cost of mutations, caugi graphs are built
lazily, but you can force a build by using the function build().
It’s fast, dawg 🐶 See the article on performance on our website for benchmarks.
Would you like to contribute? Great! Please see Contributing to
caugi for detailed guidelines on
code style, testing, and the development workflow. Quick tips: follow
the tidyverse style guide for R code, run styler::style_pkg() for R
and cargo fmt for Rust before PRs, and write tests for new features.
Did you find run into problems? That’s paw-ful! Please report an issue!