Skip to content

Conversation

@MathieuBertin
Copy link

Reference Issues/PRs

Fixes #18065

What does this implement/fix? Explain your changes.

The current GaussianProcessRegressor doesn't work with multidimensional output when normalize_y=True, and either y_std or y_cov is queried.

y_std depends on the std of the target if the target is normalized.
Hence it was necessary to add a dimension to y_std if the target is multidimensional, to allow a different set of values for each of the dimensions of the target.

The same problem arose for y_cov, and was fixed similarly by adding a dimension when the target is multidimensional.

Any other comments?

My first contribution here. Sorry in advance if I misunderstood any of the guidelines.

I am not sure of what should happen when the target is multidimensional but not normalized (normalize_y=False)
In the hereby submitted code, a dimension is added to y_std and y_cov if the target is multidimensional, regardless of the value of normalize_y.
The drawback is that if normalize_y=False, values of y_std and y_cov will be identical for all values of this new dimension, which seems redundant.

…ut when normalize_y=True"

Added a dimension to y_std and y_cov if model fitted with multidimensional target
Corrected: comment line too long
@plgreenLIRU
Copy link
Contributor

Interesting, does this mean that we don't have a test for a multi-dimensional output with normalisze_y=True?

@MathieuBertin
Copy link
Author

Interesting, does this mean that we don't have a test for a multi-dimensional output with normalisze_y=True?

Yes this is correct. I added the test in my code (file test_gpr.py, function test_y_normalized_multioutput)

Base automatically changed from master to main January 22, 2021 10:53
@glemaitre
Copy link
Member

This has been addressed in another PR.

@glemaitre glemaitre closed this Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GaussianProcessRegressor doesn't work with multidemensional output when normalize_y=True

4 participants