How to prepare the data for Classification learner Toolbox?

2 次查看(过去 30 天)
Dears,
I am doing parking lot detection by using Matlab tool called classification learner. I prepared the dataset as tables and imported it to the classifier but unfortunately, I got training model with 75% accuracy.
I do not know how to improve the classifier accuracy or and how to get rid of variables overlap in scatter plot?
is the problem with my data or in the way I prepared it ?
here is the code for Image Batch processor tool:
function occupied = myimfcn(im)
%Input image
im=rgb2gray(im);
J=imresize(im, [30 80]);
B = reshape(J,1,[]);
occupied.occupied =B;
preparing data code. allresults(1,i).occupied The struct array I got from Image Batch processor tool
for i=1:1000
C(i,:)=allresults(1,i).occupied;
end
A= repmat('empty',500,1);
B = repmat('occupied',500,1);
[sA1, sA2] = size(A);
[sB1, sB2] = size(B);
L(sA1+1:sA1+sB1, 1:sB2) = B;
L(1:sA1, 1:sA2) = A;
D = array2table(C);
D= addvars(D,L,'After','C2400');

回答(1 个)

Santhosh A V
Santhosh A V 2019-3-14
Data preparation for training seems good. You can refer to “Compare and Improve Classification Models” section in below link to improve the accuracy of the classifier. https://in.mathworks.com/help/stats/train-classification-models-in-classification-learner-app.html#bu3xf0x-1
Hope this helps.
Thanks
Santhosh

类别

Help CenterFile Exchange 中查找有关 Classification Ensembles 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by