knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
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.
# install from CRAN install.packages("chemmodlab") # Or use the development from GitHub: # install.packages("devtools") devtools::install_github("jrash/chemmodlab")
Usage is divided into two sections:
NOTE: The confidence bands and hypothesis tests section does not require models to be fit in chemmodlab. Score and activity information can be provided from any model.
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)
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)
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)
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.