trainClassifier: Train MetaClean Classifier

Description Usage Arguments Value Examples

View source: R/trainClassifier.R

Description

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

Usage

1
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

1
2
3
4
5
# train classification algorithms
best_model <- trainClassifier(trainData=pqMetrics_development,
                                        model="AdaBoost",
                                        metricSet="M11",
                                        hyperparameters)

MetaClean documentation built on Jan. 13, 2021, 6:30 p.m.