Skip to content

Commit 85f6332

Browse files
added note about 3d plots to regression 3d plots
1 parent d4f1e6f commit 85f6332

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

regression1.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -750,10 +750,10 @@ This time when we performed KNN regression on the same data set, but also
750750
included number of bedrooms as a predictor, we obtained a RMSPE test error
751751
of `r format(round(knn_mult_mets |> pull(.estimate)), big.mark=",", nsmall=0, scientific=FALSE)`.
752752
Figure \@ref(fig:07-knn-mult-viz) visualizes the model's predictions overlaid on top of the data. This
753-
time the predictions are a surface in 3-D space, instead of a line in 2-D space, as we have 2
753+
time the predictions are a surface in 3D space, instead of a line in 2D space, as we have 2
754754
predictors instead of 1.
755755

756-
```{r 07-knn-mult-viz, echo = FALSE, message = FALSE, warning = FALSE, fig.cap = "KNN regression model’s predictions represented as a surface in 3-D space overlaid on top of the data using three predictors (price, house size, and the number of bedrooms).", out.width="80%"}
756+
```{r 07-knn-mult-viz, echo = FALSE, message = FALSE, warning = FALSE, fig.cap = "KNN regression model’s predictions represented as a surface in 3D space overlaid on top of the data using three predictors (price, house size, and the number of bedrooms). Note that in general we recommend against using 3D visualizations; here we use a 3D visualization only to illustrate what the surface of predictions looks like for learning purposes.", out.width="80%"}
757757
xvals <- seq(from = min(sacramento_train$sqft),
758758
to = max(sacramento_train$sqft),
759759
length = 50)

regression2.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ is `r format(round(lm_mult_test_results %>% filter(.metric == 'rmse') %>% pull(.
453453
In the case of two predictors, we can plot the predictions made by our linear regression creates a *plane* of best fit, as
454454
shown in Figure \@ref(fig:08-3DlinReg).
455455

456-
```{r 08-3DlinReg, echo = FALSE, message = FALSE, warning = FALSE, fig.cap = "Linear regression plane of best fit overlaid on top of the data (using price, house size, and number of bedrooms as predictors).", out.width="80%"}
456+
```{r 08-3DlinReg, echo = FALSE, message = FALSE, warning = FALSE, fig.cap = "Linear regression plane of best fit overlaid on top of the data (using price, house size, and number of bedrooms as predictors). Note that in general we recommend against using 3D visualizations; here we use a 3D visualization only to illustrate what the regression plane looks like for learning purposes.", out.width="80%"}
457457
xvals <- seq(from = min(sacramento_train$sqft),
458458
to = max(sacramento_train$sqft),
459459
length = 50)

0 commit comments

Comments
 (0)