python sklearn multiple linear regression display r-squared

前端 未结 2 1725
礼貌的吻别
礼貌的吻别 2021-01-30 14:59

I calculated my multiple linear regression equation and I want to see the adjusted R-squared. I know that the score function allows me to see r-squared, but it is not adjusted.<

2条回答
  •  情话喂你
    2021-01-30 15:33

    regressor = LinearRegression(fit_intercept=False)
    regressor.fit(x_train, y_train)
    print(f'r_sqr value: {regressor.score(x_train, y_train)}')
    

提交回复
热议问题