How can I compare all test samples with training samples by euclidean distance?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
wisam kh
el 24 de Jul. de 2018
Comentada: wisam kh
el 25 de Jul. de 2018
Hello
The features of the images were extracted, 60 training images and 20 images for test.
Use the euclidean distance to compare the test samples with the training samples.
test_template2= repmat(test_template1,1,size(trdata,2));
E_distance = sqrt(sum((test_template2-euclidean_template).^2));
[result indxofmin]=min(E_distance)
Using this code I can compare one sample of the test samples with all the training samples.
How can I compare all test samples with training samples and give the closest sample number for each sample of the test?
0 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Statistics and Machine Learning Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!