Skip to main content

A toolkit for reproducible research in warfarin dose estimation

Project description

Warfit-learn

PyPI version fury.io PyPI pyversions Codacy Badge PyPI license

A machine learning toolkit for reproducible research in warfarin dose estimation.

Read the paper on arXiv.

Contents

Features

  • Seamless loading, cleaning, and preprocessing of the IWPC warfarin dataset.
  • Standardised implementations of scoring functions.
    • Percentage patients within 20% of therapeutic dose (PW20)
    • Mean absolute error (MAE)
    • R2 coefficient
    • Hybrid scoring functions
    • Confidence intervals
  • Multithreaded model evaluation using standardised resampling techniques.
    • Monte-carlo cross validation
    • Bootstrap resampling
  • Full interoperability with NumPy, SciPy, Pandas, Scikit-learn, and MLxtend.

Supports Python 3.6+ on macOS, Linux, and Windows.

Installation

pip install warfit-learn

Usage

For a detailed tutorial, see the Getting Started document.

Seamless loading and preprocessing of IWPC dataset

from warfit_learn import datasets, preprocessing
raw_iwpc = datasets.load_iwpc()
data = preprocessing.prepare_iwpc(raw_iwpc)

Full scikit-learn interoperability

from sklearn.linear_model import LinearRegression
from sklearn.svm import LinearSVR
from warfit_learn.estimators import Estimator
my_models = [
    Estimator(LinearRegression(), 'LR'),
    Estimator(LinearSVR(loss='epsilon_insensitive'), 'SVR'),
]

Seamless, multithreaded research

from warfit_learn.evaluation import evaluate_estimators
results = evaluate_estimators(
    my_models,
    data,
    parallelism=0.5,
    resamples=10,
)

Citing this work

If you use warfit-learn in a scientific publication, please consider citing the following paper:

Truda, G. and Marais, P., 2019. Warfarin dose estimation on multiple datasets with automated hyperparameter optimisation and a novel software framework. arXiv preprint arXiv:1907.05363.

BibTeX entry:

@article{truda2019warfarin,
  title={Warfarin dose estimation on multiple datasets with automated hyperparameter optimisation and a novel software framework},
  author={Truda, Gianluca and Marais, Patrick},
  journal={arXiv preprint arXiv:1907.05363},
  year={2019}
}

Copyright

Copyright (C) 2019 Gianluca Truda

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

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

warfit-learn-0.2.tar.gz (223.9 kB view details)

Uploaded Source

Built Distribution

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

warfit_learn-0.2-py3-none-any.whl (231.7 kB view details)

Uploaded Python 3

File details

Details for the file warfit-learn-0.2.tar.gz.

File metadata

  • Download URL: warfit-learn-0.2.tar.gz
  • Upload date:
  • Size: 223.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5

File hashes

Hashes for warfit-learn-0.2.tar.gz
Algorithm Hash digest
SHA256 aae6358976cbc44ab5ebf0e4e630b5efbc6ba5dd8e64d2b376e9976d690333d7
MD5 aed371ea7471b034bd53e752ba5ff3cb
BLAKE2b-256 df998cd83de2d3a76ce6c07a204f2d0049f3d4a67608c0c066917dbad855622b

See more details on using hashes here.

File details

Details for the file warfit_learn-0.2-py3-none-any.whl.

File metadata

  • Download URL: warfit_learn-0.2-py3-none-any.whl
  • Upload date:
  • Size: 231.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5

File hashes

Hashes for warfit_learn-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ca75066956b8ccd0c1d72ee957b6e8d4205b9e19ad163efda90daaf4ecacaf95
MD5 c395a75b43b00ba08ab97854f1fd2443
BLAKE2b-256 9db9a265018109f92f6aeb414d0debe4d50a0bd5f97f7f457a0bc7389c7cac5e

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