[英]Not getting correct output in linear regression
嗨,我在 (mean_squared_error=(y_test,y_pred)) 这个命令之后有疑问我没有得到任何 output 并且在 lr_fit(x_train,y_train) 之后我只得到线性回归
# doesn't return anything
# it just fit the model
# https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html
lr.fit(x_train, y_train)
# to get mean squared error, the correct syntax is
mae = mean_squared_error(y_test,y_pred)
print(mea)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.