-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
Closed
Description
Describe the bug
PLSRegression returns incorrect y_mean_ value when scale = False. In fact, the same value of y_mean_ is returned whether scale = True or = False.
Steps/Code to Reproduce
pls = PLSRegression(n_components=pls_n_components, scale=False)
pls.fit(X,Y)
pls.y_mean_ # y_mean_ will be an incorrect value.
Suggested Correction
The correct value of y_mean_ if scale=False would be given by
pls.y_mean_correct= pls.y_mean_ - np.dot(pls.x_mean_ , pls.coef_)
Reactions are currently unavailable