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
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.3.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.3-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: alabEBM-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 c318aaf16cb6a44db4b8a83deb5bd4de846b00e4dae47b8680a5456117bf7e44
MD5 d3635a83b1cb95c70b2090b47ca55125
BLAKE2b-256 11dcfb960e8745dec4823de59ca777efaba596313de0b04e972338f08de53f06

See more details on using hashes here.

File details

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

File metadata

  • Download URL: alabEBM-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4de83b4635202de89c55bc64e97aeead0326ce8050cec335a753d59b4f9134bb
MD5 6adc001918060975c89400c5a806ebdd
BLAKE2b-256 98fb39722a5d9b5255ea94b0813cdbfce4ae562c2076d32b15ce3aef4a3c9289

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