始める無料で始める

Comparing residual standard error

The other common metric for assessing model fit is the residual standard error (RSE), which measures the typical size of the residuals.

RSE can't directly be retrieved using statsmodels, but you can retrieve the mean squared error (MSE) using the .mse_resid attribute. By taking the square root of the MSE, you can get the RSE.

In the last exercise, you saw how including both explanatory variables into the model increased the coefficient of determination. How do you think using both explanatory variables will change the RSE?

mdl_price_vs_conv, mdl_price_vs_age, and mdl_price_vs_both are available as fitted models.

この演習はコースの一部です

Intermediate Regression with statsmodels in Python

コースを見る

実践的なインタラクティブ演習

このサンプルコードを完成させて、この演習に挑戦してみましょう。

# Print the RSE for mdl_price_vs_conv
print("rse_conv: ", ____)

# Print the RSE for mdl_price_vs_age
print("rse_age: ", ____)

# Print RSE for mdl_price_vs_both
print("rse_both: ", ____)
コードを編集して実行