Query about the kNN and SVM classifiers training
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi all,
could anyone help me how to use the kNN and SVM classifiers where my problem in details as follows :
1-I have two classes of fruit images (Normal and Abnormal)
2-I extracted color feature histogram where bins=250
3-I sorted these extracted features in a matrix of size 250 *100
4-I transposed each matrix like : transposed_matrix= matrix' % for K-means clustering purpose
5-I clustered each matrix to 4-centers using K-means algorithm where each center is a feature
6- I stored 40 clustered matrices of normal images (each one is represented by 4-centers ) in the training matrix to be 160 centers * 250 columns as a training matrix ,also I did the same thing for abnormal images in another training matrix also
But now I don't know how to give these two training matrices to the kNN and SVM classifiers
and then test an unknown image taken from the testing set (also represented by 4-centers) using
kNN and SVM classifiers to classify it to normal or abnormal class,could anyone guide me how to
do that in a matlab code lines because I am new in matlab I saw the svmclassify function on
and
But I don't know how to adapt these codes for my case, I attached my test code
and thank you so much in advance.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Recognition, Object Detection, and Semantic Segmentation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!