https://github.com/gianlucatruda/warfit-learn
A machine learning toolkit for reproducible research in anticoagulant dose estimation.
https://github.com/gianlucatruda/warfit-learn
data-science iwpc pandas preprocessing python reproducible-research sklearn supervised-learning warfarin warfit-learn
Last synced: 9 months ago
JSON representation
A machine learning toolkit for reproducible research in anticoagulant dose estimation.
- Host: GitHub
- URL: https://github.com/gianlucatruda/warfit-learn
- Owner: gianlucatruda
- License: gpl-3.0
- Created: 2019-07-04T13:55:33.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-06-14T13:32:53.000Z (about 5 years ago)
- Last Synced: 2024-12-06T19:11:39.187Z (over 1 year ago)
- Topics: data-science, iwpc, pandas, preprocessing, python, reproducible-research, sklearn, supervised-learning, warfarin, warfit-learn
- Language: Python
- Homepage: https://arxiv.org/abs/1907.05363
- Size: 368 KB
- Stars: 11
- Watchers: 5
- Forks: 4
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Warfit-learn
[](https://pypi.org/project/warfit-learn/)
[](https://pypi.org/project/warfit-learn/)
[](https://app.codacy.com/app/gianlucatruda/warfit-learn?utm_source=github.com\&utm_medium=referral\&utm_content=gianlucatruda/warfit-learn\&utm_campaign=Badge_Grade_Dashboard)
[](https://pypi.org/project/warfit-learn/)
*A machine learning toolkit for reproducible research in warfarin dose estimation.*
Read [the paper on arXiv](https://arxiv.org/abs/1907.05363) for free or on [Science Direct](https://doi.org/10.1016/j.jbi.2020.103634) with your institutional access.
## Contents
* [Features](#features)
* [Installation](#installation)
* [Usage](#usage)
* [Citing this work](#citing-this-work)
## 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
```bash
pip install warfit-learn
```
## Usage
For a detailed tutorial, see the [Getting Started](https://github.com/gianlucatruda/warfit-learn/blob/master/docs/warfit_learn_tutorial.ipynb) document.
**Seamless loading and preprocessing of IWPC dataset**
```python
from warfit_learn import datasets, preprocessing
raw_iwpc = datasets.load_iwpc()
data = preprocessing.prepare_iwpc(raw_iwpc)
```
**Full scikit-learn interoperability**
```python
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**
```python
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:
```bibtex
@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/.