Coder Social home page Coder Social logo

ghost's Introduction

GHOST

This repository is part of the Supporting Information to

GHOST: Adjusting the Decision Threshold to Handle Imbalanced Data in Machine Learning

Carmen Esposito,1 Gregory A. Landrum,1,2 Nadine Schneider,3 Nikolaus Stiefl,3 and Sereina Riniker1

1 Laboratory of Physical Chemistry, ETH Zurich, Vladimir-Prelog-Weg 2, 8093 Zurich,Switzerland
2 T5 Informatics GmbH, Spalenring 11, 4055 Basel, Switzerland
3 Novartis Institutes for BioMedical Research, Novartis Pharma AG, Novartis Campus,4002 Basel, Switzerland

Installing GHOST

You can install the most recent release of GHOST from pypi:

python -m pip install ghostml

or, if you want to install the development version directly from github:

python -m pip install git+https://github.com/rinikerlab/GHOST

Content

Notebooks:

  • library_example.ipynb
    Example of how to use the ghostml library.

  • example_oob_threshold_optimization.ipynb
    Example of how to use the oob-based thresholding method to optimize the decision threshold of a random forest classifier.

  • example_GHOST.ipynb
    Example of how to use GHOST (Generalized tHreshOld ShifTing) to optimize the decision threshold of classification models.

  • Tutorial_Threshold_Optimization_RF.ipynb
    Notebook explaining step by step how to reproduce the results reported in our work. Here, the code is only executed for 6 public datasets and the random forest model.

  • Reproduce_Results_Public_Datasets.ipynb
    Notebook to reproduce the results reported in our work. Here, results are produced for all 138 public datasets. The user can choose between four different machine learning methods, namely random forest (RF), gradient boosting (GB), XGBoost (XGB), and logistic regression (LR). The user can also choose between two different molecular descriptors, ECFP4 and RDKit2D.

  • DeepChem_PubChem.ipynb
    Notebook to reproduce the results of the multi-task classification models for the PubChem datasets.

  • DeepChem_MoleculeNet.ipynb
    Notebook to reproduce the results of the multi-task classification models for the MoleculeNet datasets.

Validation Data:

The threshold optimization methods have been validated agaist 138 public datasets and these are all provided here in the folder notebooks/data.

Dependencies:

If you are just interested in using ghostml in your own code/notebooks, you'll just need these packages:

  • numpy
  • pandas
  • sklearn

A list of dependencies to run the example notebooks is available in the file notebooks/ghost_env.yml. This conda environment was used to obtain the results reported in our work.

Authors

Carmen Esposito (GHOST procedure) and Greg Landrum (oob-based threshold optimization approach, data collection, initial code).

Acknowledgements

Conformal prediction (CP) experiments were adapted from the CP functions provided by the Volkamer Lab.

License

This package is licensed under the terms of the MIT license.

Citation

https://doi.org/10.1021/acs.jcim.1c00160

ghost's People

Contributors

cespos avatar greglandrum avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.