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

MultipleKernelRidgeCV deltas shared over all targets? #36

Open
cnnmat opened this issue Jun 2, 2022 · 3 comments
Open

MultipleKernelRidgeCV deltas shared over all targets? #36

cnnmat opened this issue Jun 2, 2022 · 3 comments

Comments

@cnnmat
Copy link

cnnmat commented Jun 2, 2022

Is it somehow possible to have the deltas of the model optimized for best fitting all targets when using Multiple-kernel ridge with scikit-learn API?
Meaning that the deltas_ output (or another output) of MultipleKernelRidgeCV would be:
array of shape (n_kernels, 1) Best log kernel weights for all targets.
instead of
array of shape (n_kernels, n_targets) Best log kernel weights for each target.

I still have several targets but would be interested in the "shared over all targets" result.

I tried using the parameter local_alpha = False in the solver_params of the MultipleKernelRidgeCV but I don't find any optimized alpha or delta in the output model (and there is no more best_alphas_ or deltas_ either).

Thank you in advance for your help :)

@TomDLT
Copy link
Collaborator

TomDLT commented Jun 3, 2022

I agree optimizing a single delta for all targets would be useful.
It is currently not implemented, but I will add it to the todo list.

@cnnmat
Copy link
Author

cnnmat commented Jun 3, 2022

Great, thank you very much! :)

@TomDLT
Copy link
Collaborator

TomDLT commented Jun 15, 2022

Actually I just checked, and using local_alpha=False does select the same alpha/delta for all targets, as found in model.best_alphas_ and model.deltas_. My previous answer assumed that it only shared alphas and not deltas, but it does share both. (The option is only available with solver="random_search" though.)

there is no more best_alphas_ or deltas_ either

Are you sure you fitted the model the second time?

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