Balance number of feature after adaptive k-means clustering
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, I need to classify medical images into 2 different classes (images that contains bleeding and image that NOT contains a bleeding); at the end of my pipeline I have used adaptive k-means clustering in order to identify different colour clusters. Now I'm going to obtain the feature vector in order to train the data with SVM.
The features are the mean values R,G,B for each cluster,but the problem is that the length of feature vector varying for each image since adaptive k-means gives a different number of clusters.
In particular I have images with 12 features (4 clusters), images with 15 features (5 clusters) and images with 9 features (3 clusters).
Can you suggest me a metholodogy to balance the features in order to obtain a feature matrix for the training by SVM?
Here my code:
%%%%adaptive k-means clustering
[clusteredImage,center] = adaptcluster_kmeans(ImagetoSegment);
%%%save features into a matrix
featureMatrix = [featureMatrix; center(:)'];
and the error:
Error using vertcat
Dimensions of matrices being concatenated are not consistent.
Error in main (line 61)
featureMatrix = [featureMatrix; center(:)'];
Thanks in advance
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!