Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Identifying class based on distance voting

1 visualización (últimos 30 días)
Aravin
Aravin el 30 de Jul. de 2016
Cerrada: MATLAB Answer Bot el 20 de Ag. de 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??

Respuestas (1)

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

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by