EthoML / VAME

Variational Animal Motion Embedding - A tool for time series embedding and clustering
https://ethoml.github.io/VAME/
GNU General Public License v3.0
12 stars 2 forks source link

Move find_zero_labels() from community to pose segmentation step #97

Open katiekly opened 4 weeks ago

katiekly commented 4 weeks ago

We're still encountering zero motif errors, where some sessions are not using some motifs so the length of motif_usage.npy is less than n_cluster. Our fix, find_zero_labels(), is located in community_analysis.py. This should be moved to pose_segmentation.py.

Note, occurred with Kyerl's cohort and Tyler's sample cohort. Tyler's cohort had one session used only one motif. Another session was missing two motifs.

in pose_segmentation.py, line 91 (shown below) does not account for unused motifs motif_usage = np.unique(label, return_counts=True) #warning doesn't catch motif's with no usage

Consider rewriting get_motif_usage() to initialize motif usage with length of n_cluster and use count to populate motif usage