We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
from sklearn.compose import TransformedTargetRegressor def exp_model(model): return TransformedTargetRegressor(regressor=model, func=np.exp, inverse_func=np.log) X = np.linspace(0,1,100).reshape(-1, 1) y = np.linspace(0, 1, 100) model = exp_model(LinearGAM(s(0))) model.fit(X, y) y_pred = model.predict(X) plt.plot(y, y_pred)
draws, incorrectly, a horizontal line, while the supposedly equivalent
from sklearn.compose import TransformedTargetRegressor def exp_model(model): return TransformedTargetRegressor(regressor=model, func=np.exp, inverse_func=np.log) X = np.linspace(0,1,100).reshape(-1, 1) y = np.linspace(0, 1, 100) model = exp_model(LinearGAM()) model.fit(X, y) y_pred = model.predict(X) plt.plot(y, y_pred)
(differing only by deleting s(0)) draws, correctly, the diagonal.
s(0)
Is there any way out?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
draws, incorrectly, a horizontal line, while the supposedly equivalent
(differing only by deleting
s(0)
) draws, correctly, the diagonal.Is there any way out?
The text was updated successfully, but these errors were encountered: