get_classification.accuracy: get.classification.accuracy

Description Usage Arguments Details Value Author(s)

View source: R/get_classification.accuracy.R

Description

This function performs classification accuracy analysis using the training and test sets. Users can choose support vector machine, logistic regression, random forest, and naive bayes as classifiers. The performance evaluation is determined based on the total classification rate, balanced accuracy rate, and AUC.

Usage

1
2
3
4
get.classification.accuracy(kfold, featuretable, classlabels, 
kernelname = "radial", errortype = "AUC", conflevel = 95,
 classifier = "svm", seednum = 555,
 testfeaturetable = NA, testclasslabels = NA)

Arguments

kfold

Number of folds for cross-validation. e.g. 5 or 10

featuretable

R object for feature table with only differentially expressed features. This is the training set. The first two columns should be m/z and time.

classlabels

Class labels vector. e.g. c("case","control","case")

kernelname

Kernel for SVM: e.g. "radial" or "linear"

errortype

total: total classification accuracy rate; (number of correct classifications/total N) BAR: balanced accuracy rate; accounts of number of correct classification per class; BAR=(1/m)*((C1/N1)+(C2/N2)+...+(Cm/Nm)) where m is the number of classes, Cm is the number of correct classifications in class m, and Nm is the total number of subjects in class m. AUC: area under the curve

conflevel

Confidence level for k-fold classification accuracy e.g: 95

classifier

Classification algorithm to be used for ROC analysis. svm: Support Vector Machine logitreg: Logistic Regression rf: random forest naivebayes: naive bayes eg: "svm", "logitreg", "rf", "naivebayes"

seednum

Starting point used in the generation of a sequence of random numbers. e.g. 555

testfeaturetable

R object for test feature table with only differentially expressed features. This is the test set. The first two columns should be m/z and time. The order of features should be same as the training set.

testclasslabels

Class labels vector for samples in the test set.

Details

Function to evaluate classification. This function performs classification accuracy analysis using the training and test sets. Users can choose support vector machine, logistic regression, random forest, and naive bayes as classifiers. The performance evaluation is determined based on the total classification rate, balanced accuracy rate, and AUC.

Value

Classification accuracy in training and test sets

Author(s)

Karan Uppal; kuppal2@emory.edu


kuppal2/xmsPANDA documentation built on May 15, 2021, 5:48 a.m.