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
Describe the bug 'squared' is deprecated in version 1.4 and will be removed in 1.6.
https://github.com/ageron/handson-ml3/blob/main/10_neural_nets_with_keras.ipynb Line number 11 in code, inside Regression MLP
To Reproduce
Changed to import root_mean_squared_error ```python from sklearn.datasets import fetch_california_housing from sklearn.metrics import mean_squared_error from sklearn.model_selection import train_test_split from sklearn.neural_network import MLPRegressor from sklearn.pipeline import make_pipeline from sklearn.preprocessing import StandardScaler housing = fetch_california_housing() X_train_full, X_test, y_train_full, y_test = train_test_split( housing.data, housing.target, random_state=42) X_train, X_valid, y_train, y_valid = train_test_split( X_train_full, y_train_full, random_state=42) mlp_reg = MLPRegressor(hidden_layer_sizes=[50, 50, 50], random_state=42) pipeline = make_pipeline(StandardScaler(), mlp_reg) pipeline.fit(X_train, y_train) y_pred = pipeline.predict(X_valid) rmse = mean_squared_error(y_valid, y_pred, squared=False)
change to the below :
from sklearn.datasets import fetch_california_housing from sklearn.metrics import mean_squared_error, root_mean_squared_error from sklearn.model_selection import train_test_split from sklearn.neural_network import MLPRegressor from sklearn.pipeline import make_pipeline from sklearn.preprocessing import StandardScaler housing = fetch_california_housing() X_train_full, X_test, y_train_full, y_test = train_test_split(housing.data, housing.target, random_state=42) X_train, X_valid, y_train, y_valid = train_test_split(X_train_full, y_train_full, random_state=42) mlp_reg = MLPRegressor(hidden_layer_sizes=[50, 50, 50], random_state=42) pipeline = make_pipeline(StandardScaler(), mlp_reg) pipeline.fit(X_train, y_train) y_pred = pipeline.predict(X_valid) rmse = root_mean_squared_error(y_valid, y_pred) print(rmse)
Screenshots If applicable, add screenshots to help explain your problem.
The function is depricated kindly update to the above , i have provided the correct code too .
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
'squared' is deprecated in version 1.4 and will be removed in 1.6.
https://github.com/ageron/handson-ml3/blob/main/10_neural_nets_with_keras.ipynb
Line number 11 in code, inside Regression MLP
To Reproduce
change to the below :
Screenshots
If applicable, add screenshots to help explain your problem.
The function is depricated kindly update to the above , i have provided the correct code too .
The text was updated successfully, but these errors were encountered: