No project description provided
Project description
# brent
> They're good DAGs brent.
## What it is
Suppose we have a graph like below.
![](images/dag1.png)
Calculating the marginal probability is defined via;
```math
p(A, B, C, D, E, F, G) = p(A|E) p(B|A) p(C|A,B) p(D|A,B,E) p(E) p(F|C,G) p(G)
```
Brent is a small, but fun, tool that makes it easy to explore causal graphical modelling and do-calculus.
## inference plots
![](images/dag2.svg)
## planned usage
```python
from brent import DAG, Query
dag = Graph(data=df)
dag.add_edge("smoking", "tar")
dag.add_edge("tar", "cancer")
dag.add_edge("smoking", "cancer")
```
## project structure
```
│
├── data/ <- The original, immutable data dump.
├── notebooks/ <- Jupyter notebooks. Naming convention is a short `-` delimited
│ description, a number (for ordering), and the creator's initials,
│ e.g. `initial-data-exploration-01-hg`.
├── tests/ <- Unit tests.
├── dagger/ <- Python module with source code of this project.
├── Makefile <- Makefile with commands like `make environment`
└── README.md <- The top-level README for developers using this project.
```
## installation
Install `brent` in the virtual environment via:
```bash
$ pip install --editable .
```
You can generate documentation locally by running:
```bash
$ pdoc --html --overwrite --template-dir doc/pdoc_template --http 0.0.0.0:12345 dagger
```
> They're good DAGs brent.
## What it is
Suppose we have a graph like below.
![](images/dag1.png)
Calculating the marginal probability is defined via;
```math
p(A, B, C, D, E, F, G) = p(A|E) p(B|A) p(C|A,B) p(D|A,B,E) p(E) p(F|C,G) p(G)
```
Brent is a small, but fun, tool that makes it easy to explore causal graphical modelling and do-calculus.
## inference plots
![](images/dag2.svg)
## planned usage
```python
from brent import DAG, Query
dag = Graph(data=df)
dag.add_edge("smoking", "tar")
dag.add_edge("tar", "cancer")
dag.add_edge("smoking", "cancer")
```
## project structure
```
│
├── data/ <- The original, immutable data dump.
├── notebooks/ <- Jupyter notebooks. Naming convention is a short `-` delimited
│ description, a number (for ordering), and the creator's initials,
│ e.g. `initial-data-exploration-01-hg`.
├── tests/ <- Unit tests.
├── dagger/ <- Python module with source code of this project.
├── Makefile <- Makefile with commands like `make environment`
└── README.md <- The top-level README for developers using this project.
```
## installation
Install `brent` in the virtual environment via:
```bash
$ pip install --editable .
```
You can generate documentation locally by running:
```bash
$ pdoc --html --overwrite --template-dir doc/pdoc_template --http 0.0.0.0:12345 dagger
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
brent-0.2.1.tar.gz
(9.9 kB
view hashes)
Built Distribution
brent-0.2.1-py2.py3-none-any.whl
(13.5 kB
view hashes)
Close
Hashes for brent-0.2.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46e3c4f76ecabaa21dd96de15b62d0c8ca030233fe60d238eb029cdf58164de8 |
|
MD5 | 211de56e31b74a832acc3c422fb1a055 |
|
BLAKE2b-256 | 222908f6afcd7b7e657eee0049561a674073f2aa254e5185778f2efa1d58c292 |