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

Running ridge_cv with a pre-defined parcellation yields ValueError #36

Closed
emdupre opened this issue Dec 2, 2019 · 3 comments
Closed

Comments

@emdupre
Copy link
Collaborator

emdupre commented Dec 2, 2019

Running ridge_cv with a predefined parcellation such as the BASC parcellation yields an error:

ValueError: Cannot have number of splits n_splits=4 greater than the number of samples: n_samples=1.

This seems to be because the cv value for the RidgeAlignment estimator is hard-coded at 4. Changing to another value such as None for LOO allows ridge_cv to run to completion.

Would it make sense to expose cv as an attribute in the user-facing PairwiseAlignment class ?

@thomasbazeille
Copy link
Collaborator

thomasbazeille commented Dec 3, 2019 via email

@emdupre
Copy link
Collaborator Author

emdupre commented Dec 3, 2019

Here's the code I was trying.

But that's a great idea ! What do you think if I create another example in the documentation that includes that ?

@thomasbazeille
Copy link
Collaborator

thomasbazeille commented Dec 13, 2019

Hello I answered this one in #37 after running your code. The problem here is that you try to fit ridge_cv on only one sample and it's built-in cross validation scheme requires at least one image per fold.

Anyway, it's always a bad idea to learn an alignment on only one sample because it'll be very noisy.

+1 for underlining the ability to use a non-default estimator in the docs though, if you have an idea on where it should take place it'd be great.

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

No branches or pull requests

2 participants