cfBuild
function creates a highly optimised ensemble of radial basis function (RBF) support vector machines (SVMs). The cfBuild
function takes care of all aspects of the SVM optimisation, internally splitting the supplied data into separate training and testing subsets using a bootstrapping approach coupled with a heuristic optimisation algorithm and parallel processing to minimise computation time. The ensemble object can then be used to classify newly acquired data using the cfPredict
function.
cfBuild(inputData, inputClass, ...)
"cfBuild"(inputData, inputClass, bootNum = 100, ensNum = 100, parallel=TRUE, cpus = NULL, type = "SOCK", socketHosts = NULL, scaling = TRUE, ...)
TRUE
. For more details, see sfInit.cfBuild
function returns an object in the form of an R list. The attributes of the list can be accessed by executing the attributes command. More specifically, the list of attributes includes:
missNames
attribute returns the names of the missclassified samples.accNames
attribute returns the names of the correctly classified samples.Chang, Chih-Chung and Lin, Chih-Jen: LIBSVM: a library for Support Vector Machines http://www.csie.ntu.edu.tw/~cjlin/libsvm
Exact formulations of models, algorithms, etc. can be found in the document: Chang, Chih-Chung and Lin, Chih-Jen: LIBSVM: a library for Support Vector Machines http://www.csie.ntu.edu.tw/~cjlin/papers/libsvm.ps.gz
More implementation details and speed benchmarks can be found on: Rong-En Fan and Pai-Hsune Chen and Chih-Jen Lin: Working Set Selection Using the Second Order Information for Training SVM http://www.csie.ntu.edu.tw/~cjlin/papers/quadworkset.pdf
Spendley, W. and Hext, G. R. and Himsworth, F. R. Sequential Application of Simplex Designs in Optimisation and Evolutionary Operation American Statistical Association and American Society for Quality, 1962 Nelder, J. A. and Mead, R. A Simplex Method for Function Minimization The Computer Journal, 1965 C. T. Kelley Iterative Methods for Optimization SIAM Frontiers in Applied Mathematics, 1999 A. C. Davison and D. V. Hinkley Bootstrap Methods and Their Applications CUP, 1997
Booth, J.G., Hall, P. and Wood, A.T.A. Balanced importance resampling for the bootstrap. Annals of Statistics, 21, 286-298, 1993 Davison, A.C. and Hinkley, D.V. Bootstrap Methods and Their Application Cambridge University Press, 1997
Efron, B. and Tibshirani, R. An Introduction to the Bootstrap Chapman & Hall, 1993
cfPredict
,
cfPermute
## Not run:
# data(iris)
#
# irisClass <- iris[,5]
# irisData <- iris[,-5]
#
# # Construct a classification ensemble with 100 classifiers and 100 bootstrap
# # iterations during optimisation
#
# ens <- cfBuild(inputData = irisData, inputClass = irisClass, bootNum = 100,
# ensNum = 100, parallel = TRUE, cpus = 4, type = "SOCK")
#
# # List of attributes available for each classifier in the ensemble
# attributes(ens)
#
# # Get the overall average test and train accuracy
# getAvgAcc(ens)$Test
# getAvgAcc(ens)$Train
#
# # Get all the individual test and train accuracies in the ensemble
# ens$testAcc # alternatively, getAcc(ens)$Test
# ens$trainAcc # alternatively, getAcc(ens)$Train
# ## End(Not run)
Run the code above in your browser using DataLab