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

Implement scikit-learn like API #187

Open
cbrnr opened this issue Sep 20, 2016 · 3 comments
Open

Implement scikit-learn like API #187

cbrnr opened this issue Sep 20, 2016 · 3 comments

Comments

@cbrnr
Copy link
Contributor

cbrnr commented Sep 20, 2016

It would be nice to have an API similar to that of scikit-learn, e.g. to perform MVARICA:

model = scot.MVARICA()
model.fit(data)

We'd have to discuss the details though, such as where do we specify certain parameters (e.g. model order, dimensionality - in __init__ or fit). @mbillingr I would be happy if you had some comments on that.

@mbillingr
Copy link
Member

I like the idea. In accordance with scikit-learn, I'd say most configuration parameters should go into __init__.

We should think about the remaing API too (e.g. what to do with the model after fitting).

  • Should there be a .transform() method that allows MVARICA to be used in place of an ICA?
  • How do we expose the fitted components (PCA, ICA, VAR) for further use?
  • How will it fit in current workflows (online application, connectivity analysis, time-/frequency analysis)?

@cbrnr
Copy link
Contributor Author

cbrnr commented Nov 10, 2016

I agree with putting most parameters into __init__.

I think we definitely need a transform method. If this works like in scikit-learn, the transform method should return the transformed signals and thereby exposing the fitted components. Is this what you meant with your second question?

Regarding the workflows, I think we should develop this new API in parallel to the existing one(s) so that we don't break existing workflows. I'm not particularly concerned with online application, since this is not an explicit goal of SCoT. We should try to fit in as nicely as possible into the existing ecosystem, which is mostly NumPy, SciPy, and MNE in our case. Do we need to get more concrete before starting to work on this new API?

@mbillingr
Copy link
Member

transform returns the components, agreed.
How do we expose the VAR model for connectivity analysis? I'd suggest a var property.

Anything else we need to consider?

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

No branches or pull requests

2 participants