<< nan_row_col_deletion Classification nan_train_lda_sparse >>

NaN Toolbox >> NaN Toolbox > Classification > nan_test_sc

nan_test_sc

apply statistical and SVM classifier to test data

Calling Sequence

R = nan_test_sc(CC,D)
R = nan_test_sc(CC,D,target_Classlabel)
R = nan_test_sc(CC,D, target_Classlabel,TYPE)

Parameters

CC:

classifier, which is typically obtained by train_sc.

target_Classlabel:

target class label

TYPE:

If a statistical classifier is used, TYPE can be used to modify the classifier.

TYPE = 'MDA' :

mahalanobis distance based classifier

TYPE = 'MD2' :

mahalanobis distance based classifier

TYPE = 'MD3' :

mahalanobis distance based classifier

TYPE = 'GRB' :

Gaussian radial basis function

TYPE = 'QDA' :

quadratic discriminant analysis

TYPE = 'LD2' :

linear discriminant analysis

TYPE = 'LD3', 'LDA', 'FDA, 'FLDA' :

(Fisher's) linear discriminant analysis

TYPE = 'LD4' :

linear discriminant analysis

TYPE = 'GDBC' :

general distance based classifier

R:

struct with the following fields

R.output :

output: "signed" distance for each class.

R.classlabel:

class for output data

target :

The target class is optional. If it is provided, the following values are returned.

R.kappa :

Cohen's kappa coefficient

R.ACC :

Classification accuracy

R.H :

Confusion matrix

Examples

samples = [rand(1,20); -1*rand(1,20)];
CC = nan_train_sc(samples,[1;2]);
train_samples = [rand(1,20); -1*rand(1,20)];
tt = nan_test_sc(CC,train_samples,[1;2]);
disp(tt.classlabel==CC.Labels);

See also

Bibliography

[1] R. Duda, P. Hart, and D. Stork, Pattern Classification, second ed.

John Wiley & Sons, 2001.

Authors


<< nan_row_col_deletion Classification nan_train_lda_sparse >>