The DAG adaptation of the Onion method
Project description
DaOsim
The DAG adaptation of the Onion method
Exmaple Usage
import pandas as pd
from daosim import er_dag # generates a Erdos-Renyi directed acyclic graph
from daosim import sf_out # rewires a DAG to have scale-free out degree
from daosim import randomize_graph # randomly shuffles the order of the variables
from daosim import corr # samples a correlation matrix
from daosim import simulate # simulates a dataset
from daosim import standardize # standardizes a dataset
p = 10 # number of variables
ad = 4 # average degree
n = 100 # number of samples
g = er_dag(p, ad=ad)
g = sf_out(g)
g = randomize_graph(g)
R, B, O = corr(g)
X = simulate(B, O, n)
X = standardize(X)
cols = [f"X{i + 1}" for i in range(p)]
df = pd.DataFrame(X, columns=cols)
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
daosim-0.0.3.tar.gz
(4.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file daosim-0.0.3.tar.gz.
File metadata
- Download URL: daosim-0.0.3.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89a67d5cc57b8ac9ec10b12d254495502bdfb2bc3e1a5d6297fe7f37bcedf74b
|
|
| MD5 |
02f125cc3e19f618199567ffe15ee504
|
|
| BLAKE2b-256 |
a7e4b0f108f8ff4d33ac470d9d7d0c764e437bd5b4ab2da28e6bf88eee5f4f93
|
File details
Details for the file daosim-0.0.3-py3-none-any.whl.
File metadata
- Download URL: daosim-0.0.3-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32d32af35ad853e79cef757041ec32ab4f757f8cae79ceb627d88700d44eeef3
|
|
| MD5 |
3473bbb11f1ad93488241fa037afced1
|
|
| BLAKE2b-256 |
6908071bad9dda0da28f7a86ca8d0dfec498073691b93685cd1e625ccf42036c
|