How to prepare the data for Classification learner Toolbox?
이전 댓글 표시
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
2019년 3월 14일
0 개 추천
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
카테고리
도움말 센터 및 File Exchange에서 Get Started with Statistics and Machine Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!