簡體   English   中英

在線性回歸中沒有得到正確的 output

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

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM