Closed timonmerk closed 8 months ago
Thanks @timonmerk I think that's a great idea! We can also link it to the Allen Demo, which uses the PyTorch API: https://cebra.ai/docs/demo_notebooks/Demo_Allen.html -- would you like to make a PR?
Edit to add, we DO have an example, just to be sure you saw it, https://cebra.ai/docs/usage.html#quick-start-torch-api-example, but agree it's not nearly as expressive as your good suggestion to make the sklearn Quick Start guide!
Thanks! Yes, that notebook was super helpful already but might be good to link it also in the usage.rst
.
I also compiled the documentation and ran my linked example locally, but of course it's a bit difficult to test it since it's in a rst file only..
but of course it's a bit difficult to test it since it's in a rst file only..
Actually this is included in the unit tests!
Locally, you can run make test
or also directly (adapt as needed)
python -m pytest --ff --doctest-modules -m "not requires_dataset" tests ./docs/source/usage.rst cebra
The CEBRA documentation is very comprehensive and presents in a lot of detail the parameterization. In the current form however the focus seems to explain the scikit-learn API and there is no example script for using the PyTorch API: https://cebra.ai/docs/usage.html
But for many options I am unsure how to parametrize them in the scikit-learn API. For example when using discrete behavioral data, it's currently not possible to specify
empirical
ordiscrete
sampling: https://github.com/AdaptiveMotorControlLab/CEBRA/blob/0378db0b2431d0c50a1e9b80aa1b865869586851/cebra/data/single_session.py#L89I think this is also intended to not overload the
cebra.Cebra
intialization or themodel.fit()
function with too many parameters?Therefore I thought that maybe adding a minimal example in the
usage.rst
of how a dataloader with "non-scikitlearn API" conform parameters could be used using PyTorch directly: