Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

error occured during fusion with GLCM and invarient moment feature

조회 수: 1 (최근 30일)
Balaji M. Sontakke
Balaji M. Sontakke 2020년 2월 25일
마감: MATLAB Answer Bot 2021년 8월 20일
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;
clc;
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
train_label=load('train_label_100.txt');
test_label=load('test_label_100.txt');
%% 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);
disp(Conf_Mat);
%% % Evaluate Performance
[FPR, TPR,Thr, AUC, OPTROCPT] = perfcurve(predictlabel, test_label,1);
figure,
plot(TPR,FPR,'r-','LineWidth',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
toc

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by