始める無料で始める

Visualizing each explanatory variable

Being able to see the predictions made by a model makes it easier to understand. In the case where there is only one explanatory variable, seaborn lets you do this without any manual calculation.

To visualize the relationship between a numeric explanatory variable and the numeric response, you can draw a scatter plot with a linear trend line.

To visualize the relationship between a categorical explanatory variable and the numeric response, you can draw a box plot.

taiwan_real_estate is available.

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

Intermediate Regression with statsmodels in Python

コースを見る

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

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

# Import matplotlib.pyplot and seaborn
____
____

# Create a scatter plot with linear trend line of price_twd_msq vs. n_convenience
____

# Show the plot
____
コードを編集して実行