I have 7 classes of inputs that are related to the brain signals activity (EEG). When the number of classes is large, the performance of classification algorithms may be affected. As you can see in the following code, I extracted the features for them and in the first phase I trained my model with 70% of the my data and got 100% accuracy but in the testing phase with the remaining 30% I did not get more than 42.5% accuracy. What is your suggestion to improve the accuracy of my Model?
for i=1:7
[A D]=dwt2(segment_train(i).train,'db1');
wave_train(i).A=A;
wave_train(i).D=D;
f1=mean(A);
f2=median(A);
f3=max(D);
f4=abs(fft(D));
f4=mean(f4);
f5=var(D);
f6=skewness(D);
f7=entropy(D);
f8=var(A);
f9=mean(D);
f(i,:)=[f1 f2 f3 f4 f5 f6 f7 f8 f9];
end
% feature extraction
% Classifier
nOfSamples=7;
nOfClassInstance=10;
Sample=f;
class=[1 2 3 4 5 6 7]'
%SVM
Model=fitcecoc(Sample,class);
predictt=predict(Model,Sample);
disp('class predict')
disp([class predictt])
%Accuracy
Accuracy=mean(class==predictt)*100;
fprintf('\nAccuracy =%d\n',Accuracy)