Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Identifying class based on distance voting

1 Ansicht (letzte 30 Tage)
Aravin
Aravin am 30 Jul. 2016
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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??

Antworten (1)

Image Analyst
Image Analyst am 30 Jul. 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.

Diese Frage ist geschlossen.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by