Why does everytime I train a model through SGD I get different predictions everytime for the same data and therefore the rmse loss is different everytime I trained the data?
Also this did not happen in Ordinary least square method!!
For better understanding i ll put my code also.
from sklearn.linear_model import SGDRegressor model_2= SGDRegressor() inputs= nonsmoker_df[['age']] targets= nonsmoker_df.charges model_2.fit(inputs,targets); predictions = model_2.predict(inputs) rmse(targets,predictions)