Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RF: Simplify variable loading and resampling #2

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

adelavega
Copy link

Attempt to simplify fitting encoding/decoding models. Since the himalaya API is similar to sklearn, I focused on making loading data from Neuroscout API easier.

  • I implemented a helper function in pyNS, to help fetch predictors from the Neuroscout API and resample them to TR. ENH: Add high-level predictor fetching utilities neuroscout/pyNS#112
    The main advantage is that pybids already implements densification/resampling logic, and variable alignment. In addition, users could use pybids Transformations on these variables. The downside is the pybids dependency, but it's optional to use this helper.

  • Another nice thing is that this returns a df that also includes indexing info (i.e. subject, run, etc...) which can then be used by whichever downstream CV scheme, etc...

I think my plan with this will be to add this as a pyNS tutorial, but not upstream anything related to himayala/sklearn. Those APIs are already good, so I think as long as we provide the data easily from Neuroscout (both events and preprocessed data), and show a good example, that should be good enough.

Perhaps in the future, I will also work on a full workflow like FitLins (or directly in it!) for encoding/decoding w/ BIDS StatsModels.

@adelavega
Copy link
Author

adelavega commented Dec 20, 2022

I would recommend merging as is, but I'll take this example and develop three things:

  1. Simple data load example
  2. regularized banded cv regression example
  3. (in the future) specification + reproducible workflow w/ himayala

1-2 will live in neuroscout-docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant