Skip to main content

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_data
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.7.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

alabEBM-0.0.7-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file alabEBM-0.0.7.tar.gz.

File metadata

  • Download URL: alabEBM-0.0.7.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.19

File hashes

Hashes for alabEBM-0.0.7.tar.gz
Algorithm Hash digest
SHA256 98a52471a7232666b3f3bb26a89e67c36221a9e4e58dd138f530c9d821601c1a
MD5 33dceeb0a2c4619f37c9eb402c03534c
BLAKE2b-256 847b1d11dc74f60869e5b36014d475ae3396bb23767a206c591a2ded18425a3c

See more details on using hashes here.

File details

Details for the file alabEBM-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: alabEBM-0.0.7-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.8.19

File hashes

Hashes for alabEBM-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c3491ca968e03a86d181b5ea5ef93a8ecf98088ac30cb9ce4ea26fe7d3784990
MD5 be666a9173c8be0db1c0d23e4911e0b4
BLAKE2b-256 f98ad4a041c5a034979b2298f5b2457484979583f451bbcc782a6a9cef847d0c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page