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.4.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.4.tar.gz.
File metadata
- Download URL: daosim-0.0.4.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 |
6cca3462ae7657844f245b5aeddc732c8d5c9392cde1868de6e1e5029fa87311
|
|
| MD5 |
0103283605858de5ed92e98c1b01249e
|
|
| BLAKE2b-256 |
cb895e55b11df290fe0d36eb787b2ee011edbcf43de0f9563f5955a0ad78240e
|
File details
Details for the file daosim-0.0.4-py3-none-any.whl.
File metadata
- Download URL: daosim-0.0.4-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 |
56ab70e9670bdd6e4927c2b6c76920331f00db7ec096a4d8c6835c73f2a75be1
|
|
| MD5 |
a73350c29c7546a954309af9b70870ce
|
|
| BLAKE2b-256 |
4d2bfc704d74f158b25619d3b073a617b92325c8b42776fed7ba57bde7a306c2
|