tyiannak / pyAudioAnalysis

Python Audio Analysis Library: Feature Extraction, Classification, Segmentation and Applications
Apache License 2.0
5.75k stars 1.18k forks source link

Get accuracy of predicted class #354

Open needpeeling opened 2 years ago

needpeeling commented 2 years ago

Is there a way of getting accuracy of the predicted class?

For example: If we have 2 classes to predict (cats, dogs) but I want to classify my test file bird.wav:

c, p, p_nam = aT.file_classification(testfiles, "svm_dog_cat","svm_rbf")

Output: bird.wav: P(media/dog_samples=0.17790907874998627) P(media/cat_samples=0.8220909212500138)

This is obviously wrong. Therefore I´m looking for an accuracy value of predicted classes. Do you have any ideas?