Implementation of event-based models for degenerative diseases.
Project description
EBM
This is the python
package for implementing EBM.
pip install alabEBM
Usage
To generate random data:
from alabEBM import generate
import numpy as np
S_ordering = np.array([
'HIP-FCI', 'PCC-FCI', 'AB', 'P-Tau', 'MMSE', 'ADAS',
'HIP-GMI', 'AVLT-Sum', 'FUS-GMI', 'FUS-FCI'
])
real_theta_phi_file = '../alabEBM/data/real_theta_phi.json'
js = [50, 100]
rs = [0.1, 0.5]
num_of_datasets_per_combination = 20
generate(
S_ordering,
real_theta_phi_file,
js,
rs,
num_of_datasets_per_combination,
output_dir = 'data'
)
To get results:
from alabEBM import run_hard_kmeans
from alabEBM import run_soft_kmeans
from alabEBM import run_conjugate_priors
data_file = '../alabEBM/data/25|50_10.csv'
n_iter = 20
n_shuffle = 2
burn_in = 2
thinning = 2
heatmap_folder = 'heatmap'
filename = '25_50_10_hk'
temp_result_file = f'results/{filename}.json'
run_hard_kmeans(
data_file,
n_iter,
n_shuffle,
burn_in,
thinning,
heatmap_folder,
filename,
temp_result_file,
)
filename = '25_50_10_sk'
temp_result_file = f'results/{filename}.json'
run_soft_kmeans(
data_file,
n_iter,
n_shuffle,
burn_in,
thinning,
heatmap_folder,
filename,
temp_result_file,
)
filename = '25_50_10_cp'
temp_result_file = f'results/{filename}.json'
run_conjugate_priors(
data_file,
n_iter,
n_shuffle,
burn_in,
thinning,
heatmap_folder,
filename,
temp_result_file,
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
alabEBM-0.0.2.tar.gz
(15.0 kB
view details)
Built Distribution
alabEBM-0.0.2-py3-none-any.whl
(21.2 kB
view details)
File details
Details for the file alabEBM-0.0.2.tar.gz
.
File metadata
- Download URL: alabEBM-0.0.2.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d1006cfe9ed9cd0d2c01f68c41e15db96e55915b3c78d309c808cfba3ff4949 |
|
MD5 | 6d3b6a916a818bf7f38c6d891e6a8bf9 |
|
BLAKE2b-256 | 2322752f116cfa990ba46d8d9cbbf737aef79d42252f9021bba0888398b822a6 |
File details
Details for the file alabEBM-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: alabEBM-0.0.2-py3-none-any.whl
- Upload date:
- Size: 21.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a3a78d07226908518a3af19d89bded44a9863e80de29e2971c417544b0245ab |
|
MD5 | 38ecb4f8cf5490564da285e0e191ac0e |
|
BLAKE2b-256 | b765874165d76bf11b2405c6a72d88dbda10d8c44a29fa85d8a0b4a8696aba3f |