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 the graph 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.2.tar.gz
(4.1 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.2.tar.gz.
File metadata
- Download URL: daosim-0.0.2.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c04c1388c78773bd2be2cb2b548c6d9e1c90914a05d24778f796b44c9feff421
|
|
| MD5 |
b593ca590510629281a08cd6e4c00ad4
|
|
| BLAKE2b-256 |
6bc2baacc46c74bdd6ebb9d7036dbba29349109a430fb835386214d91e054a2e
|
File details
Details for the file daosim-0.0.2-py3-none-any.whl.
File metadata
- Download URL: daosim-0.0.2-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.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55715be9d9fc2851934d890f157fdda3a6c385bad7bc920c99ee3ae8a1352a26
|
|
| MD5 |
3d6dc0e086ca385ba5a108262f08e4b3
|
|
| BLAKE2b-256 |
6fbf6229e9da5236e85c785984226e2613b54896c95596d00524acd34e9f0568
|