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:

Open the graphical interface: class_gui

class_gui opens the graphical interface (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

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

[-> top]


Routines for validation

Validation of the classification models can be performed by means of the following routines:
Discriminant Analysis: dacv
Partial Least Square Discriminant Analysis (PLSDA): plsdacv
Classification trees (CART): cartcv
Random Forest (RF): randomforestcv
K-Nearest Neighbors (kNN): knncv
Potential Functions: potcv
Support Vector Machines (SVM): svmcv
Unequal class models (UNEQ): uneqcv
Soft Independent Modeling of Class Analogy (SIMCA): simcacv
Backpropagation Neural Networks (BPNN): backpropagationcv
The output of the routines collects the predicted class vector [samples x 1], the classification measures in validation, and other details. Cross validation can be 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

New samples can be predicted by means of the following routines:
Discriminant Analysis: dapred
Partial Least Square Discriminant Analysis (PLSDA): plsdapred
Classification trees (CART): cartpred
Random Forest (RF): randomforestpred
K-Nearest Neighbors (kNN): knnpred
Potential Functions: potpred
Support Vector Machines (SVM): svmpred
Unequal class models (UNEQ): uneqpred
Soft Independent Modeling of Class Analogy (SIMCA): simcapred
Backpropagation Neural Networks (BPNN): backpropagationpred
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, UNEQ and SIMCA, latent variables for PLSDA, number of neighbours for K-Nearest Neighbors, cost and kernel parameter for SVM, smoothing parameter for Potential Functions, number of trees for Random Forest) can be performed with the following routines:
Discriminant Analysis coupled with PCA: dacompsel
Partial Least Square Discriminant Analysis (PLSDA): plsdacompsel
Random Forest (RF): randomforesttreesel
K-Nearest Neighbors (kNN): knnksel
Potential Functions: potsmootsel
Support Vector Machines (SVM): svmcostsel
Unequal class models (UNEQ): uneqcompsel
When dealing with Random Forest, the cross validation procedure is repeated 10 times to evaluate variability of results.
Backpropagation Neural Networks (BPNN): optimisation of BPNN is quite complex and thus no routines were provided to this end. By using the backpropagationfit, backpropagationcv and backpropagationpred one can define his/her own approach to select the proper BPNN settings.
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]