KumarLabJax / JABS-behavior-classifier

Behavior Classifier Component from the Jax Animal Behavior System
Other
12 stars 2 forks source link

Label balancing and symmetric behaviors for training classifiers #23

Closed SkepticRaven closed 11 months ago

SkepticRaven commented 1 year ago

Adds:

SkepticRaven commented 1 year ago

Current TODO:

Right now, this option only really works within the gui. classify.py will fail.

SkepticRaven commented 1 year ago

Adding in another new feature: symmetric behaviors (where left-right features can be swapped)

In addition to that, a massive rework was done to enable this feature to be added

dahhei commented 1 year ago

I believe that I can't test these changes on my local install of JABS unless the update-reqs is merged first. There is a version from commit-head 49c9b10 on the HPC that I will use to test these updates. 😃

dahhei commented 1 year ago

Cayson initially raised this issue so I tested out the all k-fold cross-validation and it appears as though the top 10 feature labels are incorrect. I trained a Drinking classifier which typically has the distance to Lixit features present. This one does not. The all k-fold does seem to work otherwise though.

dahhei commented 1 year ago

It would be nice if the cross validation iteration value included a "cross validation iteration 14/n", with n being the total number that it will test. 🤠

SkepticRaven commented 1 year ago

Lower pose version projects aren't getting their feature set correctly propagated to the new functions. On a pose_v2 project:

Traceback (most recent call last):
  File "/behavior-classifier/src/ui/training_thread.py", line 56, in run
    features, group_mapping = self._project.get_labeled_features(
  File "/behavior-classifier/src/project/project.py", line 663, in get_labeled_features
    column_names = features.get_feature_column_names(
  File "/behavior-classifier/src/feature_extraction/features.py", line 539, in get_feature_column_names
    column_names = self.get_feature_name_vector(pose_version=self._pose_version, use_social=use_social, extended_features=self._extended_features)
  File "/behavior-classifier/src/feature_extraction/features.py", line 494, in get_feature_name_vector
    assert pose_version >= 5
AssertionError
SkepticRaven commented 1 year ago

The commits above are a rebase merge with main (based on the other recent merge into main: https://github.com/KumarLabJax/JABS-behavior-classifier/pull/27)

SkepticRaven commented 11 months ago

The feature rewrite to propagate names alongside values fixed the pose_v2 bug. This branch should be ready to merge (after updating the appropriate version numbers)!