How to prepare the data for Classification learner Toolbox?
1 view (last 30 days)
Show older comments
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');
0 Comments
Answers (1)
Santhosh A V
on 14 Mar 2019
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
See Also
Categories
Find more on Classification Ensembles in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!