शुरू करेंमुफ़्त में शुरू करें

R squared plot

In the previous exercise, you got an R squared value of 0.651. The R squared metric ranges from 0 to 1, 0 being the worst and 1 the best.

Calculating the R squared value is only the first step in studying your model's predictions.

Making an R squared plot is extremely important because it will uncover potential problems with your model, such as non-linear patterns or regions where your model is either over or under-predicting the outcome variable.

In this exercise, you will create an R squared plot of your model's performance.

The home_test_results tibble has been loaded into your session.

यह अभ्यास पाठ्यक्रम का हिस्सा है

Modeling with tidymodels in R

पाठ्यक्रम देखें

अभ्यास निर्देश

  • Create an R squared plot of your model's performance. The x-axis should have the actual selling price and the y-axis should have the predicted values.
  • Use the appropriate functions to add the line y = x to your plot and standardize the range of both axes.

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

# Create an R squared plot of model performance
ggplot(___, aes(x = ___, y = ___)) +
  geom_point(alpha = 0.5) + 
  ___(color = 'blue', linetype = 2) +
  ___ +
  labs(x = 'Actual Home Selling Price', y = 'Predicted Selling Price')
कोड संपादित करें और चलाएँ