Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Identifying class based on distance voting
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Lets say I have three classes. Each class have some template samples. For given query sample I want to find the possible class it matches to based on distance. Let the dimension of query be 1x256, and each sample of very class is also of same dimensions. Now based on voting scheme I want to know the class of given query. How may I do this.
How I am doing this, is as below.
Let D contains the sample of three classes. It is of size 256 x 30. For the sake of simplicity I have 10 samples for each class. For given query I do this following things. Let query be query.
query = repmat(query, [1 size(D,2)]);
dist = sqrt(sum((query - D).^2)); %Eculidean distance of query with all values.
Now I computing voting??
0 commentaires
Réponses (1)
Image Analyst
le 30 Juil 2016
I think might want knnsearch() in the Statistics and Machine Learning Toolbox. Otherwise computing the generalized linear distance is okay, but you mgiht want to divide by the size of each cluster (class) to normalize it.
0 commentaires
Cette question est clôturée.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!