MATLAB Answers

error occured during fusion with GLCM and invarient moment feature

2 views (last 30 days)
Balaji M. Sontakke
Balaji M. Sontakke on 25 Feb 2020
Here i combined(fused) two different type of features i.e invarient moment and GLCM. When i classify with individual invarient moment or GLCM i got 98.75 % accuracy but when i combine these two features with following program i got 25% accuracy, what is the problem in my program i dont understand.
clear all;
tic; %% calculating elapsed time for execution
%% load mat files
test = {load('db3.mat'),load('db5.mat')};
train = {load('db4.mat'),load('db6.mat')};
n1 = cellfun(@fieldnames,test,'un',0);
n2 = cellfun(@fieldnames,train,'un',0);
V1 = cellfun(@(x,y)[x.(y)],test,[n1{:}],'un',0);
V2 = cellfun(@(x,y)[x.(y)],train,[n2{:}],'un',0);
P_test = cell2mat(reshape(cat(1,V1{:}),100,[])); %for 100 classes
P_train = cell2mat(reshape(cat(1,V2{:}),200,[])); %for 100 classes
%% labeling class
%% Normalisation by Z - Scores
P_train = zscore(P_train,0,2);
P_test =zscore(P_test,0,2);
%% classfication
predictlabel = knnclassify(P_test, P_train, train_label,2,'cosine','nearest');
cp = classperf(test_label,predictlabel);
Conf_Mat = confusionmat(test_label,predictlabel);
%% % Evaluate Performance
[FPR, TPR,Thr, AUC, OPTROCPT] = perfcurve(predictlabel, test_label,1);
xlabel('False positive rate')
ylabel('True positive rate')
title('ROC Curve for Classification ')
t = table(FPR, TPR, Thr);
fprintf('\n\n Overall accuracy:%f%%\n',cp.CorrectRate*100);
%% calculating elapsed time for execution


Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!