umyelab / LabGym

Quantify user-defined behaviors.
GNU General Public License v3.0
58 stars 5 forks source link

question about number of sorted behaviors #155

Closed vzimmern closed 2 weeks ago

vzimmern commented 2 months ago

Good afternoon,

I have a question about the ideal number of sorted behaviors.

I am trying to categorize a single mouse behavior into either "background" or a rapid movement called "myoclonus".

I have about 150 examples of myoclonus and about 300 examples of background. In a previous iteration of my categorizer (that I accidentally deleted), I had excellent sensitivity for my myoclonus movements but poor specificity so I tried improving my background detection. Unfortunately, by adding more background behaviors, I have lost the sensitivity for the myoclonus movements.

Since background covers everything that a mouse could be doing (e.g. nesting, rearing, grooming, moving around, sitting still), shouldn't I have many more behaviors of background than 300? As per our previous exchanges, I'm making a deliberate effort to make sure the behaviors are unique and don't resemble each other too much.

Thanks for your help, Vincent Zimmern

yujiahu415 commented 2 months ago

Hi, This is probably because the ‘background’ category includes too many behaviors that look very different. The Categorizer may not be able to pick up the common features of the ‘background’ category. It’s also possible that the training examples in your current ‘background’ category are too few to cover majority of the ‘background’ behaviors in your videos. You can first try to include more examples for each behavior type (for example, 100-200 pairs of examples per behavior type) in the ‘background’ category to see if this can improve. If not, you can try separating each behavior type in ‘background’ to its actual behavior categories (you will have multiple categories, rather than just two categories). Hope this can help!