I tried that example to train
smoker_df on linear regression.
I got an RMSE loss of
and here is its visualization of actual vs predicted output:
and for SGD regression I got an RMSE loss of
visualization for same is:
Are they correct?? Or I’m doing something somewhere wrong?
Might be some mistakes in SGD code chunk .The values in the age are not plotting to the charges,rather it plots to itslef Ii guess
Somehow the predictions by SGDRegressor is Wrong, it’s giving too high values so much so that the graph is distorted. It seems like the actual values are not plotting but that’s not the case as you can see actual values are in the range of 2e5 to 6e5 whereas the model goes to a range of 2.5e10. The actual values are correct, but the model is wrong. Try changing the
eta0 parameters in the model. Maybe decreasing the learning rate helps.