Skip to main content

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
```

Project details


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)

Uploaded Source

Built Distribution

brent-0.2.1-py2.py3-none-any.whl (13.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page