GithubHelp home page GithubHelp logo

jrash / chemmodlab Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 8.0 38.17 MB

chemmodlab: A Cheminformatics Modeling Laboratory for Fitting and Assessing Machine Learning Models

Home Page: https://github.com/jrash/chemmodlab/

License: GNU General Public License v3.0

R 100.00%

chemmodlab's Introduction

chemmodlab

Build Status CRAN

chemmodlab contains a suite of methods for fitting machine learning models and for validating the resulting models. The methods are tailored to virtual screening for drug discovery applications and include confidence bands and hypothesis tests for hit enrichment curves.

The methodologies implemented in chemmodlab are described in the following papers:

Installation

# install from CRAN
install.packages("chemmodlab")

# Or use the development from GitHub:
# install.packages("devtools")
devtools::install_github("jrash/chemmodlab")

Usage

Usage is divided into two sections:

  1. Confidence bands and hypothesis tests for hit enrichment curves
  2. Generalized model fitting and evaluations

1. Confidence bands and hypothesis tests for hit enrichment curves

NOTES:

  1. The confidence band and hypothesis test functions do not require models to be fit in chemmodlab. Only score and activity information need to be provided, and these can be provided from any model.

Confidence bands for individual curves

library(chemmodlab)

data(pparg)

HitEnrich(S.df = pparg[,c(14,2,5)],
          y = pparg[,3], labels = c("Maximum z-score","Surflex-dock", "ICM"),
          log = T, conf = T, conf.level = .95)

Confidence bands for differences between curves

All pairwise differences between three methods are shown:

par(mfrow = c(2, 2))

HitEnrichDiff(S.df = pparg[,c(14,2,5)], y = pparg[,3], x.max = NULL, labels =
                c("Maximum z-score","Surflex-dock", "ICM"),
              log = T, conf.level = .95)

Hypothesis tests at specific fractions

n <- nrow(pparg)
tested <- c(3,32,321)
ntested <- length(tested)
PerfCurveTest( S1=pparg$maxz_scores, S2=pparg$surf_scores,
               X=pparg$surf_actives, r=tested/n, alpha=.05)
#> $diff_estimate
#> [1]  0.00000000 -0.01176471  0.05882353
#> 
#> $std_err
#> [1] 0.005366091 0.023740011 0.029532874
#> 
#> $ci_interval
#>               [,1]       [,2]
#> [1,] -0.0105173443 0.01051734
#> [2,] -0.0580238186 0.03503531
#> [3,] -0.0004121052 0.11535463
#> 
#> $p_value
#> [1] 1.00000000 0.62020172 0.04639319

2. Generalized model fitting and evaluations

  • ModelTrain() fits a series of classification or regression models to sets of descriptors and computes cross-validated measures of model performance. Repeated k-fold cross validation is performed with multiple, different fold assignments for the data (“splits”).

  • MakeModelDefaults() makes a list containing the default parameters for all models implemented in ModelTrain.

  • plot.chemmodlab() takes a chemmodlab object output by the ModelTrain function and creates a series of accumulation curve plots for assesing model and descriptor set performance.

  • Performance() can evaluate many performance measures across all splits created by ModelTrain, then outputs a data frame for each D-M combination.

  • CombineSplits() evaluates a specified performance measure across all splits created by ModelTrain and conducts statistical tests to determine the best performing descriptor set and model (D-M) combinations.

  • chemmodlab() is the constructor for the chemmodlab object.

    The statistical methodologies comprise a comprehensive collection of approaches whose validity and utility have been accepted by experts in the Cheminformatics field. As promising new methodologies emerge from the statistical and data-mining communities, they will be incorporated into the laboratory. These methods are aimed at discovering quantitative structure-activity relationships (QSARs). However, the user can directly input their own choices of descriptors and responses, so the capability for comparing models is effectively unlimited.

library(chemmodlab)

data(aid364)
cml <- ModelTrain(aid364, ids = TRUE, xcol.lengths = c(24, 147),
                  des.names = c("BurdenNumbers", "Pharmacophores"))
plot(cml, splits = 1, meths = c("NNet", "KNN"))

CombineSplits(cml, metric = "enhancement", m = 100)

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.