- Notifications
You must be signed in to change notification settings - Fork25.8k
Open
Description
Describe the workflow you want to enable
7b71511 moved duplicated code above the conditional statements, but this means that an expensive step for computing GPR variances is executed even if bothreturn_std
andreturn_cov
areFalse
. Profiling shows this takes ~96% of the computation time. I would like to see they_mean
value returned before this step to save time.
Describe your proposed solution
AboveV = solve_triangular
https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/gaussian_process/_gpr.py#L454, add
if not return_std and not return_cov: return y_mean
Describe alternatives you've considered, if relevant
No response
Additional context
No response