exprso (version 0.1.7)

build: Build Classifiers

Description

A collection of functions to build classifiers.

Usage

buildNB(object, top = 0, ...)
buildLDA(object, top = 0, ...)
buildSVM(object, top = 0, ...)
buildANN(object, top = 0, ...)
buildRF(object, top = 0, ...)
buildDNN(object, top = 0, ...)
"buildNB"(object, top = 0, ...)
"buildLDA"(object, top = 0, ...)
"buildSVM"(object, top = 0, ...)
"buildANN"(object, top = 0, ...)
"buildRF"(object, top = 0, ...)
"buildDNN"(object, top = 0, ...)

Arguments

object
Specifies the ExprsArray object to use as a training set for classification.
top
A numeric scalar or character vector. A numeric scalar indicates the number of top features that should undergo feature selection. A character vector indicates specifically which features by name should undergo feature selection. Set top = 0 to include all features. A numeric vector can also be used to indicate specific features by location, similar to a character vector.
...
Arguments passed to the respective wrapped function.

Value

Returns an ExprsModel object.

Methods (by generic)

buildNB: Method to build classifiers using e1071::naiveBayes. buildLDA: Method to build classifiers using MASS::lda. buildSVM: Method to build classifiers using e1071::svm. buildANN: Method to build classifiers using nnet::nnet. buildRF: Method to build classifiers using randomForest::randomForest. buildDNN: Method to build feed-forward networks using h2o::h2o.deeplearning.

Details

These build methods construct a single classifier given an ExprsArray object and a set of parameters. This function returns an ExprsModel object. In the case of binary classification, these methods use an ExprsBinary object and return an ExprsMachine object. In the case of multi-class classification, these methods use an ExprsMulti object and return an ExprsModule object. In the case of multi-class classification, these methods harness the doMulti function to perform "1 vs. all" classifier construction. In the setting of four class labels, a single build call will return four classifiers that work in concert to make a single prediction of an unlabelled subject. For building multiple classifiers across a vast parameter space in a high-throughput manner, see pl methods.

Like fs methods, build methods have a top argument which allows the user to specify which features to feed INTO the classifier build. This effectively provides the user with one last opportunity to subset the feature space based on prior feature selection or dimension reduction. For all build methods, @preFilter and @reductionModel will get passed along to the resultant ExprsModel object, again ensuring that any test or validation sets will undergo the same feature selection and dimension reduction in the appropriate steps when deploying the classifier. Set top = 0 to pass all features through a build method.

See modHistory to learn more about feature selection history.

See Also

fs build doMulti exprso-predict plCV plGrid plGridMulti plMonteCarlo plNested

Examples

Run this code
## Not run: 
# library(golubEsets)
# data(Golub_Merge)
# array <- arrayEset(Golub_Merge, colBy = "ALL.AML", include = list("ALL", "AML"))
# array <- modFilter(array, 20, 16000, 500, 5) # pre-filter Golub ala Deb 2003
# array <- modTransform(array) # lg transform
# array <- modNormalize(array, c(1, 2)) # normalize gene and subject vectors
# arrays <- splitSample(array, percent.include = 67)
# array.train <- fsStats(arrays[[1]], top = 0, how = "t.test")
# array.train <- fsPrcomp(array.train, top = 50)
# mach <- buildSVM(array.train, top = 5, kernel = "linear", cost = 1)
# ## End(Not run)

Run the code above in your browser using DataLab