Warfit-learn
A machine learning toolkit for reproducible research in warfarin dose estimation.
Read the paper on arXiv for free or on Science Direct with your institutional access.
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:
G. Truda and P. Marais, Evaluating warfarin dosing models on multiple datasets with a novel software framework and evolutionary optimisation, Journal of Biomedical Informatics (2020), doi: https://doi.org/10.1016/j.jbi.2020.103634
BibTeX entry:
@article{Truda2020warfit,
title = "Evaluating warfarin dosing models on multiple datasets with a novel software framework and evolutionary optimisation",
journal = "Journal of Biomedical Informatics",
pages = "103634",
year = "2020",
issn = "1532-0464",
doi = "https://doi.org/10.1016/j.jbi.2020.103634",
url = "http://www.sciencedirect.com/science/article/pii/S1532046420302628",
author = "Gianluca Truda and Patrick Marais",
keywords = "Warfarin, Machine learning, Genetic programming, Python, Supervised learning, Anticoagulant, Pharmacogenetics, Software",
}
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/.
Release files for warfit-learn 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| warfit-learn-0.2.1.tar.gz | 224.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| warfit_learn-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:456.1 kB
Release files / warfit-learn-0.2.1.tar.gz
| Download URL | warfit-learn-0.2.1.tar.gz |
|---|---|
| Size | 224.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9d7ae501948bb3c05568c245a88d72df45890360ea2db7008b8a9ba64dad5e99
|
|
BLAKE2b-256 checksum How to use checksums |
219019b237ba6b171f0d50431f4275ec3284b93d1e89b0d6f256e753e7fdc68a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.5
|
Release files / warfit_learn-0.2.1-py3-none-any.whl
| Download URL | warfit_learn-0.2.1-py3-none-any.whl |
|---|---|
| Size | 231.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7dcc0ca3050edbc8ac6518455b2adb952d069a25177b78e89d5dd24f52ef3d94
|
|
BLAKE2b-256 checksum How to use checksums |
d68101c63fdc642cb8fd5de3d87789a3df87041b8f79cbd1298ec6f3cc3c4a7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.5
|