arguments of the "classify" function

7 visualizaciones (últimos 30 días)
MiauMiau
MiauMiau el 29 de Sept. de 2015
Comentada: Ishaa Kulkarni el 8 de Mayo de 2018
Hi
I have both read the doc of "classify", and have also looked at the examples with the dataset fisheriris. However I am still not completely sure I understand the syntax of this function. For instance what is meant with the following arguments:
class = classify(sample,training,group)
What is "sample" supposed to be? I understand that "training" is a training set for the classifier, and group are the class labels, so to say. Is "sample" then the test set ("sample" would be such non-standard word for it and would not have any idea why the Matlab doc is calling it this way..)? Thank you..

Respuestas (1)

Walter Roberson
Walter Roberson el 29 de Sept. de 2015
classify() uses the training data and the group labels to construct a classifier. Then it puts the samples through the classifier and returns the group numbers that result. samples is not test set because test set is data of known class whose outcome is compared to the trained outcome in order to help optimize the classifier. samples is data that the classifier is to be applied to -- not training or test or validation, actual use of the classifier.
  1 comentario
Ishaa Kulkarni
Ishaa Kulkarni el 8 de Mayo de 2018
I have used this function as label=classify(neuralnet,feature,group) feature is a 1D array. my neural net contains 5 classes, and 50 samples each. so, I kept group=[1 2 3 4 5]
It gives me error as: The length of GROUP must equal the number of rows in TRAINING.
what is the problem? plz help

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by