Learn R Programming

MetaClean (version 1.0.0)

trainClassifier: Train MetaClean Classifier

Description

Wrapper function for training one of the 8 classification algorithms using one of the three available metrics sets.

Usage

trainClassifier(trainData, model, metricSet, hyperparameters)

Arguments

trainData

dataframe. Rows should correspond to peaks, columns should include peak quality metrics and class labels only.

model

Name of the classification algorithm to be trained from the eight available: DecisionTree, LogisiticRegression, NaiveBayes, RandomForest, SVM_Linear, AdaBoost, NeuralNetwork, and ModelAveragedNeuralNetwork.

metricSet

The metric set to be run with the selected model. Select from the following: M4, M7, and M11.

hyperparameters

dataframe of the tuned hyperparameters returned by runCrossValidation()

Value

a trained MetaClean model

Examples

Run this code
# NOT RUN {
# train classification algorithms
# }
# NOT RUN {
best_model <- trainClassifier(trainData=pqMetrics_development,
                                        model="AdaBoost",
                                        metricSet="M11",
                                        hyperparameters)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab