KullmannLab / pyecog2

PyEcog2 is a python software package aimed at exploring, visualizing and analyzing (video) EEG telemetry data
GNU General Public License v3.0
4 stars 0 forks source link

First use of global classifier sometimes raises error and fails #45

Closed mfpleite closed 8 months ago

mfpleite commented 2 years ago

Repeated tries seem to work. Double check classifier import and assimilation

mfpleite commented 2 years ago

Running HMM... Traceback (most recent call last): File "c:\users\lignanilab\documents\github\pyecog2\pyecog2\coding_tests\WaveletWidget.py", line 147, in run result = self.fn(*self.args, **self.kwargs) File "c:\users\lignanilab\documents\github\pyecog2\pyecog2\classifier.py", line 186, in classify_animal_with_global gc.classify_animal(animal,progress_bar,max_annotations,labels2annotate, prob_th=prob_th, outlier_th = outlier_th,viterbi=viterbi) File "c:\users\lignanilab\documents\github\pyecog2\pyecog2\classifier.py", line 429, in classify_animal hmm.A = transitions2rates(self.transitions_matrix, self.blank_npoints, self.class_npoints) File "c:\users\lignanilab\documents\github\pyecog2\pyecog2\classifier.py", line 86, in transitions2rates A[i+1,i+1] = nclasspoints[i] - np.sum(A[i+1,:]) IndexError: index 2 is out of bounds for axis 0 with size 2 Worker Finished, emitting LabelsChanged signal Annotations Table widget Set Data called. Annotations page length: 266 row count: 266 Annotations Table widget Set Data ran in 0.10731330000000128 seconds AnnotationParameterTree Re_init Called loading C:/Users/LignaniLab/Desktop/Library_YQ/pyecog_library/ LibraryProject.pyecog_classifier Could not load imported classifier

mfpleite commented 2 years ago

OK the classifier module needs a cleanup to better handle flexible feature selection for training. Specially between Global and Animal specific classifiers

mfpleite commented 8 months ago

Solved