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 个)

类别

Help CenterFile 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!

Translated by