Closed MiPlayer123 closed 2 years ago
You are not using the latest version of the library. That is an old bug that should be fixed by now (it randomly happened when few samples existed in any of the classes). But, in any case this is fixed in the latest version of the library, so please update your dependencies.
I updated the library, but I am running into new errors:
Param = 10.00000 - classifier Evaluation Experiment 81 of 127
Param = 10.00000 - classifier Evaluation Experiment 82 of 127
Param = 10.00000 - classifier Evaluation Experiment 83 of 127
Param = 10.00000 - classifier Evaluation Experiment 84 of 127
Param = 10.00000 - classifier Evaluation Experiment 85 of 127
Param = 10.00000 - classifier Evaluation Experiment 86 of 127
Param = 10.00000 - classifier Evaluation Experiment 87 of 127
Param = 10.00000 - classifier Evaluation Experiment 88 of 127
Param = 10.00000 - classifier Evaluation Experiment 89 of 127
Traceback (most recent call last):
File "D:\Research\Scripts\main.py", line 3, in <module>
aT.extract_features_and_train(["<path>\Audio Classification\BabyCry","<path>\Audio Classification\GlassBreaking", "<path>\Audio Classification\Gunshot", "<path>\Audio Classification\Falling", "<path>\Audio Classification\Background"], 1.0, 1.0, aT.shortTermWindow, aT.shortTermStep, "randomforest", "randomForest2", False)
File "<path>\anaconda3\lib\site-packages\pyAudioAnalysis\audioTrainTest.py", line 307, in extract_features_and_train
best_param = evaluate_classifier(features, class_names, classifier_type,
File <path>\anaconda3\lib\site-packages\pyAudioAnalysis\audioTrainTest.py", line 694, in evaluate_classifier
cmt = np.insert(cmt, missing_classes, 0, axis=0)
File "<__array_function__ internals>", line 5, in insert
File "<path>\anaconda3\lib\site-packages\numpy\lib\function_base.py", line 4672, in insert
old_mask[indices] = False
IndexError: index 5 is out of bounds for axis 0 with size 5
Is there a way I can resolve these issues by modifying my dataset, or is it a bug?
Is it possible to send me the data so that I can reproduce the error?
I figured out the issue. I only had 4 files in one of the folders while the rest had hundreds, but as soon as I added a lot more files to it worked. Let me know if you would still like the data.
Thank for the answer @MiPlayer123 . No need to send me the data. I've added a new issue to add an error if number of samples if is not sufficient.
I am geting the following error when running
aT.extract_features_and_train(["<path>\Audio Classification\BabyCry","<path>\Audio Classification\GlassBreaking", "<path>\Audio Classification\Gunshot", "<path>\Audio Classification\Falling", "<path>\Audio Classification\Background"], 1.0, 1.0, aT.shortTermWindow, aT.shortTermStep, "randomforest", "randomForest2", False)
. All the data in the folders are .wav files