MATLAB routines



This is a list of the main routines you can use to build classification models by means of the Classification toolbox for MATLAB:

class_gui

class_gui opens a GUI for calculating all classification models provided in the toolbox; in order to open the graphical interface, just type on the MATLAB command line:

class_gui

there are no inputs; data can be loaded and saved directly from the graphical interface.

[-> top]


Routines for fitting models

Discriminant Analysis, Partial Least Square Discriminant Analysis (PLSDA), Classification trees (CART), K-Nearest Neighbors (kNN), Potential Functions, Support Vector Machines (SVM), Unequal class models (UNEQ) and Soft Independent Modeling of Class Analogy (SIMCA) can be calculated by means of the routines dafit, plsdafit, cartfit, knnfit, potfit, svmfit, uneqfit and simcafit respectively. The output of the routines collects the calculated class vector [samples x 1], the classification parameters in fitting, and other details. Type "help routine_name" on the MATLAB command window for further information.

[-> top]


Routines for validation

Validation of Discriminant Analysis, Partial Least Square Discriminant Analysis (PLSDA), Classification trees (CART), K-Nearest Neighbors (kNN), Potential Functions, Support Vector Machines (SVM), Unequal class models (UNEQ) and Soft Independent Modeling of Class Analogy (SIMCA) can be calculated by means of the routines dacv, plsdacv, cartcv, knncv, potcv, svmcv, uneqcv and simcacv respectively. The output of the routines collects the predicted class vector [samples x 1], the classification parameters in validation, and other details. Cross validation is performed with venetian blinds (i.e. with 3 cv groups the split of the first group will be [1,0,0,1,0,0,....,1,0,0] and so on) or contiguous blocks (i.e. the split of the first group will be [1,1,1,1,0,0,....,0,0,0] and so on). Moreover, bootstrap with resampling and validation based on random sampling (montecarlo) of 20% of samples can be calculated. Type "help routine_name" on the MATLAB command window for further information.

[-> top]


Routines for predicting new samples

Prediction of new samples by means of Discriminant Analysis, Partial Least Square Discriminant Analysis (PLSDA), Classification trees (CART), K-Nearest Neighbors (kNN), Potential Functions, Support Vector Machines (SVM), Unequal class models (UNEQ) and Soft Independent Modeling of Class Analogy (SIMCA) can be performed with the routines dapred, plsdapred, cartpred, knnpred, potpred, svmpred, uneqpred and simcapred respectively. The output of the routines collects the predicted class vector [samples x 1] and other details. Type "help routine_name" on the MATLAB command window for further information.

[-> top]


Routines for optimising models

The cross validation procedure for selecting the optimal parameters (components for PCA-DA and SIMCA, latent variables for PLSDA, number of neighbours for K-Nearest Neighbors, cost and kernel parameter for SVM, smoothing parameter for Potential Functions) can be performed with the routines dacompsel (for PCA-DA), plsdacompsel (for PLSDA), potsmootsel (for Potential Functions), svmcostsel (for SVM), simcacompsel (for SIMCA), uneqcompsel (for UNEQ) and knnksel (for kNN). The output of the routines collects the error rate in cross validation (and non-error rate in cross validation) associated to each parameter value. Type "help routine_name" on the MATLAB command window for further information.

[-> top]