how to use knn classifier for classifying cry signals of infants?
2 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
Giyuu
2015-5-7
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!
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!