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.5.tar.gz
(15.1 kB
view details)
Built Distribution
alabEBM-0.0.5-py3-none-any.whl
(21.2 kB
view details)
File details
Details for the file alabEBM-0.0.5.tar.gz
.
File metadata
- Download URL: alabEBM-0.0.5.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24d36f74a86258d2248333ade13f009ef76c64982927c9e7e9f492a6b64fd94b |
|
MD5 | caae6289609e3c304e934e1f334520da |
|
BLAKE2b-256 | a044e177508a0d2680268674fcef68fef4a85087d3fbd7d7add53c176ba43477 |
File details
Details for the file alabEBM-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: alabEBM-0.0.5-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 | 0468fbe4c714715702b875972fd6cb9780dafe6fdafedcea8becb3a887c690cb |
|
MD5 | 9d41736633a9071a0018ccb056daf033 |
|
BLAKE2b-256 | 5ed5dc1641558f0b76f29d7e83a3e37aaddebfe1f040f16d5ad87a6856fc5bc0 |