Skip to main content

Implementation of event-based models for degenerative diseases.

Project description

EBM

This is the python package for implementing Event Based Models for Disease Progression.

Installation

pip install alabEBM

Generate Random Data

from alabEBM import generate, get_params_path
import os

# Get path to default parameters
params_file = get_params_path()

# Generate data using default parameters
S_ordering = [
    'HIP-FCI', 'PCC-FCI', 'AB', 'P-Tau', 'MMSE', 'ADAS',
    'HIP-GMI', 'AVLT-Sum', 'FUS-GMI', 'FUS-FCI'
]

generate(
    S_ordering=S_ordering,
    real_theta_phi_file=params_file,  # Use default parameters
    js = [50, 100], # Number of participants
    rs = [0.1, 0.5], # Percentage of non-diseased participants
    num_of_datasets_per_combination=2,
    output_dir='my_data'
)

Run MCMC Algorithms

from alabEBM import run_ebm
from alabEBM.data import get_sample_data_path
import os

print("Current Working Directory:", os.getcwd())

for algorithm in ['soft_kmeans', 'conjugate_priors', 'hard_kmeans']:
    results = run_ebm(
        data_file=get_sample_data_path('25|50_10.csv'),  # Use the path helper
        algorithm=algorithm,
        n_iter=2000,
        n_shuffle=2,
        burn_in=1000,
        thinning=20,
    )

Features

  • Multiple MCMC algorithms:

    • Conjugate Priors
    • Hard K-means
    • Soft K-means
  • Data generation utilities

  • Extensive logging

Project details


Release history Release notifications | RSS feed

This version

0.2.1

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.2.1.tar.gz (31.6 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.2.1-py3-none-any.whl (35.9 kB view details)

Uploaded Python 3

File details

Details for the file alabebm-0.2.1.tar.gz.

File metadata

  • Download URL: alabebm-0.2.1.tar.gz
  • Upload date:
  • Size: 31.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for alabebm-0.2.1.tar.gz
Algorithm Hash digest
SHA256 f510d56d3710cd030db06965b8cd72791599dfaa8d9f3cb7cedb1c9f179523cb
MD5 78b0d7e5adcef2731381976a06531069
BLAKE2b-256 3258bf029212156d5f0979cbb060695f4c667e92e58548be64691190199987e6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: alabEBM-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 35.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for alabEBM-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 97f936dbe66e76fe972b5acd1d1b86d60256750247f18fe841881626f746cc85
MD5 8961b0a975d2ab7f84b3ea9cfd1b2e09
BLAKE2b-256 0cf5f19679224c174a4c3e94567d64ca2e893071d100a6c763cc26636ff1bdcd

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