crossValidation: Cross Validation

Description Usage Arguments Details Value Source Examples

View source: R/crossValidation.R

Description

Use k-fold cross-validation to guarantee the accuracy and reduce variability of LMDRT-SVM classification in this package.

Usage

1
crossValidation(rawdata, yname, levels, svm = c("svmt"), k = 10)

Arguments

rawdata

original data set.

yname

the name of result-column.

levels

results in result-column.

svm

type of support vector machine.

k

the number of folds in cross-validation.

Details

One round of cross-validation involves partitioning a sample of data into complementary subsets, performing the analysis on train set, and validating the analysis on test set. To reduce variability, k rounds of cross-validation are performed using different partitions, and the validation results are combined over the rounds to give an estimate of the LMDRT-SVM model's predictive performance.

Value

The function gives the result of prediction combined over k-round validation include confusion matrix and some derivations from it. When TP, TN, FP, FN represent 4 type in confusion matrix respectively, the function gives accuracy(ACC) , positive predictive value (PPV), true positive rate (TPR), true negative rate (TNR) and negative predictive value (NPV).

Source

For cross vaildation, based on Kohavi, Ron (1995). "A study of cross-validation and bootstrap for accuracy estimation and model selection". Proceedings of the Fourteenth International Joint Conference on Artificial Intelligence. San Mateo, CA: Morgan Kaufmann. 2 (12): 1137–1143. CiteSeerX 10.1.1.48.529. Devijver, Pierre A.; Kittler, Josef (1982). Pattern Recognition: A Statistical Approach. London, GB: Prentice-Hall. ISBN 0-13-654236-0.

Examples

1
crossValidation(rawdata,class, c(attack,normal), k = 3)

ShanLu92/FeaAug documentation built on Jan. 31, 2021, 7:21 p.m.