Skip to main content

Joint Progression Modeling (JPM): A Probabilistic Framework for Mixed-Pathology Progression

Project description

pyjpm

Installation

pip install pyjpm

Data generation

To run gen.py first. Then to generate partial ordering datasets. gen_partial.py.

Change Log

  • 2025-07-16 (V 0.0.6)

    • Added mp_method = BT in algorithm.py and run.py.
    • Added PL.
    • Fixed the bug in generate_data.py.
  • 2025-07-19 (V 0.0.7)

    • Added the class of PlackettLuce.
  • 2025-07-20 (V 0.0.15)

    • Updated the definition and implementation of conflict and certainty.
    • Made sure data folder exists after uploading to pypi.
    • Made sure fixed_biomarker_order = True if we use mixed patholgy in data generation.
    • Fixed a bug in the calculation of conflict.
    • Made sure the algorithm.py is using the correct energy calculation functions.
    • Added entropy and certainty calculation in MCMC sampler.
    • Made sure in generate_data.py, certainty is calculated based upon the mp_method.
    • Made sure in generate_data.py, we can tweak the paramter of mcmc_iterations, otherwise it will super slow. This is because the time complexity is mcmc_iterations * sample_count.
    • Tested obtaining ordering_array from separate disease data files. Made some modifcations in algorithm.py to allow this.
  • 2025-07-23 (V 0.0.16 -- didn't push to Pypi)

    • Implemented the conflict version of using only discordant pairs.
  • 2025-07-25 (V 0.0.16)

    • Updated algorithm.py to reflect changes in the class of PlackettLuce.
  • 2025-07-26 (V 0.0.17)

    • Updated generate_data.py to skip calculating certainty and conflict if sample_count <= 1.
  • 2025-08-04 (V 0.1.7)

    • Use fastsaebm codes.
    • Finished testing and data generation.
    • With m_{variant} when number of repitition is 1.
    • Fixed overflow bug in prob_accept=min(1.0, np.exp(current_energy - new_energy)).
  • 2025-08-04 (V 0.2.9)

    • Implemented the new certainty measure.
    • Used the same rng all throughout in generate data.
    • Added save_details to run.py.
    • Solved the logic bug of save_details and save_results.
    • Ensured the randomness again in generate_data.py.
  • 2025-08-09 (V 0.3.1)

    • Used 15 biomarkers.
    • Dynamically adjust dirichlet multinomial alpha array based on the number of biomarkers.
  • 2025-08-10 (V 0.3.3)

    • Use numpy and numba (whenever possible) in mp_utils.py.
  • 2025-08-11 (V 0.3.6)

    • Updated numba version
  • 2025-08-12 (V 0.3.9)

    • Kept improving the numba version. Now it's faster.
    • Include MCMC in PL sampling as well.
  • 2025-08-11 (V 0.4.0)

    • Add RMJ distance mallows.
  • 2025-08-16 (V 0.4.2)

    • Try all njit in mp_utils.py. I want to test it on CHTC.
  • 2025-08-17 (V 0.4.4)

    • I know using np.random is not helpful in shuffle_order func. Change back to the slow version.
  • 2025-08-18 (V 0.4.10)

    • Try to use rng in func of obtain_affected_and_non_clusters.
    • In mallows, use BT for central ranking sampling.
    • Added theta = 100 in mallows.
    • Added mp_method = 'random' in generate_data.py.
    • Remobed recodes folder when running mp-ebm.
  • 2025-08-19 (V 0.4.19)

    • Corrected an error: in data generation, for experiment 9, the noise_std should be max_length * noise_std_parameter rather than its square root. This is imprtant because after using square root, the noise_std in fact become larger, not smaller. For example, in our example where N = 10, the noise_std should be N*0.05 = 0.5, but after square root, it becomes 0.7. If N = 4, then std should be 02, but becomes 0.45 after square root.
    • Added the temperature parameter for mallows sampling.
    • Reuse params inferred from individual diseases.
    • Used biomarkers and theta/phi params obtained from NACC data analysis.
  • 2025-08-20 (v 0.5.1)

    • Used biomarkers and their theta/phi from both ADNI only.
    • Changed 'random' to 'Random' in generate_data.py.
    • Randomly choose two floats for new theta params for overlapping biomarkers.
  • 2025-08-21 (V 0.5.4)

    • Try only 12 biomarkers for params.
    • Try 18 biomarkers for params.
    • Add rnadom pertubations to overlapped biomarkers params.
  • 2025-08-22 (V 0.5.6)

    • Try scaling factor for energy in mh.py
  • 2025-08-23 (V 0.5.9)

    • Test differetn energy influence.
    • use_scaling
  • 205-08-25 (V 0.6.0)

    • Test percentile.
  • 205-08-26 (V 0.6.2)

    • Added analysis about alignment and effect_size.
  • 2025-08-27 (V 0.6.7)

    • Added energy_prior and model_prior.
    • Mapped energy_prior to mallows_temperature.
  • 2025-08-28 (V 0.6.9)

    • Removed energy_prior. Only use model calibration.
  • 2025-08-32 (V 0.7.3)

    • Modified the data generation just like in subtypes.
  • 2025-09-01 (V 0.7.4)

    • Removed the forcing range of event times.
  • 2025-09-03 (V 0.7.5)

    • Added save_data boolen to generate_data.py.
  • 2025-09-04 (V 0.8.0)

    • Removed calibration. We cannot use it.
    • Aligned with how i get staging with pysaebm: completely blind, not even using healthy ratio and the learned stage prior. Only use the theta/phi.
    • Modified what to return in run.py.
  • 2025-09-09 (V 0.8.1)

    • Added plots back.
  • 2025-09-21 (V 0.8.2)

    • Removed iteration >= burn_in when updating best_*.
  • 2025-10-08 (V 0.8.4)

    • Used soft counts for conjugate prior updates.
  • 2025-10-09 (V 0.8.6)

    • Update the non-normal distribution parameters.
  • 2025-11-09 (V 0.8.8)

    • Changed the pkg name from pympebm to pyjpm.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyjpm-0.8.8.tar.gz (178.9 kB view details)

Uploaded Source

Built Distribution

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

pyjpm-0.8.8-py3-none-any.whl (221.3 kB view details)

Uploaded Python 3

File details

Details for the file pyjpm-0.8.8.tar.gz.

File metadata

  • Download URL: pyjpm-0.8.8.tar.gz
  • Upload date:
  • Size: 178.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for pyjpm-0.8.8.tar.gz
Algorithm Hash digest
SHA256 ef76c249962e9dc2b122fde2ef8384ea85b932a03c5d282bad2a49bcc82a9ffe
MD5 4a80277cc67c865f70e4adbf3c022d28
BLAKE2b-256 ebd553ff399c2fae0301c01789edfa433f834576f2d7df80e9a840bf0607f943

See more details on using hashes here.

File details

Details for the file pyjpm-0.8.8-py3-none-any.whl.

File metadata

  • Download URL: pyjpm-0.8.8-py3-none-any.whl
  • Upload date:
  • Size: 221.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for pyjpm-0.8.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f4dd56051a37d78aaea489cd4e002b45fa5d54d7c113986b9662b1ade05ae283
MD5 9ac1f0c99346ae77be4aea697c31e9ba
BLAKE2b-256 064f0a48e216b71908bb5e70e24b433189284e2d3493bd50f085cb047fe2b7f8

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