[英]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.