{"id":14958382,"url":"https://github.com/gianlucatruda/warfit-learn","last_synced_at":"2025-10-24T14:31:56.615Z","repository":{"id":49563414,"uuid":"195251209","full_name":"gianlucatruda/warfit-learn","owner":"gianlucatruda","description":"A machine learning toolkit for reproducible research in anticoagulant dose estimation.","archived":false,"fork":false,"pushed_at":"2021-06-14T13:32:53.000Z","size":377,"stargazers_count":11,"open_issues_count":6,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-06T19:11:39.187Z","etag":null,"topics":["data-science","iwpc","pandas","preprocessing","python","reproducible-research","sklearn","supervised-learning","warfarin","warfit-learn"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/1907.05363","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gianlucatruda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-04T13:55:33.000Z","updated_at":"2024-09-15T12:17:26.000Z","dependencies_parsed_at":"2022-09-19T14:01:52.894Z","dependency_job_id":null,"html_url":"https://github.com/gianlucatruda/warfit-learn","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianlucatruda%2Fwarfit-learn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianlucatruda%2Fwarfit-learn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianlucatruda%2Fwarfit-learn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianlucatruda%2Fwarfit-learn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gianlucatruda","download_url":"https://codeload.github.com/gianlucatruda/warfit-learn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237990583,"owners_count":19398453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","iwpc","pandas","preprocessing","python","reproducible-research","sklearn","supervised-learning","warfarin","warfit-learn"],"created_at":"2024-09-24T13:16:54.800Z","updated_at":"2025-10-24T14:31:52.941Z","avatar_url":"https://github.com/gianlucatruda.png","language":"Python","funding_links":[],"categories":["Machine Learning \u0026 Research"],"sub_categories":[],"readme":"# Warfit-learn\n\n[![PyPI version fury.io](https://badge.fury.io/py/warfit-learn.svg)](https://pypi.org/project/warfit-learn/)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/warfit-learn.svg)](https://pypi.org/project/warfit-learn/)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/467076ac86de4ca389febcf07bffd161)](https://app.codacy.com/app/gianlucatruda/warfit-learn?utm_source=github.com\\\u0026utm_medium=referral\\\u0026utm_content=gianlucatruda/warfit-learn\\\u0026utm_campaign=Badge_Grade_Dashboard)\n[![PyPI license](https://img.shields.io/pypi/l/warfit-learn.svg)](https://pypi.org/project/warfit-learn/)\n\n*A machine learning toolkit for reproducible research in warfarin dose estimation.*\n\nRead [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.\n\n## Contents\n\n*   [Features](#features)\n*   [Installation](#installation)\n*   [Usage](#usage)\n*   [Citing this work](#citing-this-work)\n\n## Features\n\n*   Seamless loading, cleaning, and preprocessing of the IWPC warfarin dataset.\n*   Standardised implementations of scoring functions.\n*   Percentage patients within 20% of therapeutic dose (PW20)\n*   Mean absolute error (MAE)\n*   R\u003csup\u003e2\u003c/sup\u003e coefficient\n*   Hybrid scoring functions\n*   Confidence intervals\n*   Multithreaded model evaluation using standardised resampling techniques.\n*   Monte-carlo cross validation\n*   Bootstrap resampling\n*   Full interoperability with NumPy, SciPy, Pandas, Scikit-learn, and MLxtend.\n\nSupports Python 3.6+ on macOS, Linux, and Windows.\n\n## Installation\n\n```bash\npip install warfit-learn\n```\n\n## Usage\n\nFor a detailed tutorial, see the [Getting Started](https://github.com/gianlucatruda/warfit-learn/blob/master/docs/warfit_learn_tutorial.ipynb) document.\n\n**Seamless loading and preprocessing of IWPC dataset**\n\n```python\nfrom warfit_learn import datasets, preprocessing\nraw_iwpc = datasets.load_iwpc()\ndata = preprocessing.prepare_iwpc(raw_iwpc)\n```\n\n**Full scikit-learn interoperability**\n\n```python\nfrom sklearn.linear_model import LinearRegression\nfrom sklearn.svm import LinearSVR\nfrom warfit_learn.estimators import Estimator\nmy_models = [\n    Estimator(LinearRegression(), 'LR'),\n    Estimator(LinearSVR(loss='epsilon_insensitive'), 'SVR'),\n]\n```\n\n**Seamless, multithreaded research**\n\n```python\nfrom warfit_learn.evaluation import evaluate_estimators\nresults = evaluate_estimators(\n    my_models,\n    data,\n    parallelism=0.5,\n    resamples=10,\n)\n```\n\n## Citing this work\n\nIf you use warfit-learn in a scientific publication, please consider citing the following paper:\n\nG. 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\n\nBibTeX entry:\n\n```bibtex\n@article{Truda2020warfit,\n  title = \"Evaluating warfarin dosing models on multiple datasets with a novel software framework and evolutionary optimisation\",\n  journal = \"Journal of Biomedical Informatics\",\n  pages = \"103634\",\n  year = \"2020\",\n  issn = \"1532-0464\",\n  doi = \"https://doi.org/10.1016/j.jbi.2020.103634\",\n  url = \"http://www.sciencedirect.com/science/article/pii/S1532046420302628\",\n  author = \"Gianluca Truda and Patrick Marais\",\n  keywords = \"Warfarin, Machine learning, Genetic programming, Python, Supervised learning, Anticoagulant, Pharmacogenetics, Software\",\n}\n```\n\n## Copyright\n\nCopyright (C) 2019 Gianluca Truda\n\nThis 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/.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgianlucatruda%2Fwarfit-learn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgianlucatruda%2Fwarfit-learn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgianlucatruda%2Fwarfit-learn/lists"}