The DAG adaptation of the Onion method
Project description
DaOsim
The DAG adaptation of the Onion method
Example 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.5.tar.gz
(4.4 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.5.tar.gz.
File metadata
- Download URL: daosim-0.0.5.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5752c9fbc4189aab8f8231c52640951f6648067bae0f92edf0dfb1064eeabe3
|
|
| MD5 |
c1406dad0365b57c3b599a8100e222ca
|
|
| BLAKE2b-256 |
9651f8951884b22a1a448a63e42b6f9d8fe5d6f3bce9718c195f019f60dad3a1
|
File details
Details for the file daosim-0.0.5-py3-none-any.whl.
File metadata
- Download URL: daosim-0.0.5-py3-none-any.whl
- Upload date:
- Size: 5.0 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 |
254576fe6b2c3b9a058d46a9777a819ac95299bab4e5f1b76d5e6e3e13689e95
|
|
| MD5 |
33f100ff02ffab22a878ba61c3742c32
|
|
| BLAKE2b-256 |
e7519916cb765a4818e38cf1bc0be90ea2f550afbc4ba3e4afc7da07df452f11
|