dattalab / keypoint-moseq

https://keypoint-moseq.readthedocs.io
Other
64 stars 26 forks source link

Kappa scan #68

Closed calebweinreb closed 8 months ago

calebweinreb commented 1 year ago

Right now to pick a value of kappa, users have to manually perform fitting over and over again with different kappas until they achieve the target syllable durations. We should automate this by making a kappa_scan function. There are two ways to approach this:

1) We could use a simulated annealing-like approach that algorithmically generates kappa proposals and hones in on the target value (as a human would do)

2) We could use a simpler parameter-scan approach that systematically tests log-spaced kappa values between some user-specified min and max. The function could then plot the results and print the kappa value that was closest to the target, along with the median duration associated with this kappa.

I lean toward (2) since it sounds simpler to implement and understand. If we go that route, here are some additional considerations:

Once this function is written, we will need to update the tutorial notebook and colab notebook accordingly.