how to use knn classifier for classifying cry signals of infants?

1 view (last 30 days)
i am working on cry signals of new born babies. mainly i want to classify normal baby and babies with apnea and jaundice ailment. how to use knn classifier for this? till now 3 cry samples( 1 normal, 1 with jaundice and 1 with apnea) are processed and their mel frerquency cepstral coefficients are extracted. coefficients are different for each type of sample. i want to show differentiation. how can i do this? pls someone help me. if anyone has code for this pls share it with me.

Answers (1)

Giyuu
Giyuu on 7 May 2015
Dear pranjal,
First of all I thik that you will need more of theese samples (3 is not enough for the classifier to be exact). All of them should be in one matrix, where you have got different samples in the rows and the colums of the matrix are your attributes (for example frequency). Then you want to use it like this:
knn = ClassificationKNN.fit(X, d, 'NumNeighbors', k);
[LABEL,POSTERIOR,COST]=predict(knn, Xt);
where X is your samples matrix, d is a column vector of decisions of the classifier (e.g. 0 - healthy, 1 - apnea and so on) and k is a number of neighbors. Predict function will calculate the predictions, they are stored in LABEL. Xt is the matrix of samples that you want to obtain predicts for.
Good luck!
  1 Comment
pranjal
pranjal on 7 May 2015
thank you for reply. how many minimum training samples are required for classifier? coefficients extracted are in matrix of size<13*1230>. i have 20 normal samples, 10 jaundice and 10 for apnea. will it work?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!