how to use knn classifier for classifying cry signals of infants?
조회 수: 1 (최근 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!