Skip to content

deepcausality-rs/deep_causality

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Crates.io Docs.rs MIT licensed CodeFactor Audit Benchmarks Clippy Tests OpenSSF Best Practices codecov

DeepCausality Logo

Web: https://deepcausality.com

DeepCausality is a hyper-geometric computational causality library that enables fast and deterministic context-aware causal reasoning over complex multi-stage causality models. Deep Causality adds only minimal overhead and thus is suitable for real-time applications without additional acceleration hardware.

DeepCausality is hosted as a sandbox project in the LF AI & Data Foundation.

๐Ÿค” Why DeepCausality?

  1. DeepCausality is written in Rust with safety, reliability, and performance in mind.
  2. DeepCausality provides recursive causal data structures that concisely express arbitrary complex causal structures.
  3. DeepCausality enables context awareness across data-like, time-like, space-like, spacetime-like entities stored within (multiple) context-hyper-graphs.
  4. DeepCausality simplifies modeling of complex tempo-spatial patterns.
  5. DeepCausality comes with Causal State Machine (CSM)

๐Ÿ“š Docs

๐Ÿš€ Getting Started

In your project folder, just run in a terminal:

cargo add deep_causality

See the starter example.

How to run the example code

git clone https://github.com/deepcausality-rs/deep_causality.git

cd deep_causality

make example

You can also run the example code from the project root with cargo:

# make sure you're in the project root folder
cd deep_causality

# CSM (Causal State Machine)
cargo run --release --bin example-csm

# CTX (Context) 
cargo run --release --bin example-ctx

# Smoking inference
cargo run --release --bin example-smoking

# Getting started example
cargo run --release --bin starter

๐Ÿ“ฆ Sub-Crates

โญ Usage

Docs:

Code:

๐Ÿ› ๏ธ Cargo & Make

Cargo works as expected, but in addition to cargo, a makefile exists that abstracts over several additional tools you may have to install before all make commands work. To do so, please run the following command:

    make install

The make install command tests and tries to install all required developer dependencies. if the automatic install fails, the script will show a link with further installation instructions.

After all dependencies have been installed, the following commands are ready to use.

    make build          Builds the code base incrementally (fast) for dev.
    make bench          Runs all benchmarks across all crates.
    make check          Checks the code base for security vulnerabilities.
    make example        Runs the example code.
    make fix            Fixes linting issues as reported by clippy
    make format         Formats call code according to cargo fmt style
    make install        Tests and installs all make script dependencies
    make start          Starts the dev day with updating rust, pulling from git remote, and build the project
    make test           Runs all tests across all crates.

The scripts called by each make command are located in the script folder.

๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Community

๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘ฉโ€๐Ÿ’ป Contribution

Contributions are welcomed especially related to documentation, example code, and fixes. If unsure where to start, open an issue and ask. For more significant code contributions, please run make test and make check locally before opening a PR.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in deep_causality by you, shall be licensed under the MIT license without additional terms or conditions.

For details:

๐Ÿ™ Credits

The project took inspiration from several researchers and their projects in the field:

Parts of the implementation are inspired by:

Finally, inspiration, especially related to the hypergraph structure, was derived from reading the Quanta Magazine.

๐Ÿ“œ Licence

This project is licensed under the MIT license.

๐Ÿ‘ฎ๏ธ Security

For details about security, please read the security policy.

๐ŸŽ Sponsors

JetBrains logo

JetBrains, the premier software development tool provider, has granted a free all-product license under its open-source community support program to the DeepCausality project. The project team expresses its gratitude towards JetBrains generous contribution. Thank you for your commitment to OSS development!

๐Ÿ’ป Author

  • Marvin Hansen.
  • Github GPG key ID: 369D5A0B210D39BC
  • GPG Fingerprint: 4B18 F7B2 04B9 7A72 967E 663E 369D 5A0B 210D 39BC