You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: regression2.Rmd
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -291,7 +291,7 @@ linear regression predicted line of best fit. By default `geom_smooth` adds some
291
291
to the plot that we are not interested in at this point; we provide the argument `se = FALSE` to
292
292
tell `geom_smooth` not to show that information. Figure \@ref(fig:08-lm-predict-all) displays the result.
293
293
294
-
```{r 08-lm-predict-all, fig.height = 3.5, fig.width = 4.5, warning = FALSE, message = FALSE, fig.cap = "Scatter plot of sale price versus size with line of best fit for the full Sacramento housing data."}
294
+
```{r 08-lm-predict-all, fig.height = 3.5, fig.width = 4.5, warning = FALSE, fig.pos = "H", out.extra="", message = FALSE, fig.cap = "Scatter plot of sale price versus size with line of best fit for the full Sacramento housing data."}
295
295
lm_plot_final <- ggplot(sacramento_train, aes(x = sqft, y = price)) +
296
296
geom_point(alpha = 0.4) +
297
297
xlab("House size (square feet)") +
@@ -825,7 +825,7 @@ df <- df |>
825
825
df
826
826
```
827
827
828
-
```{r 08-predictor-design, message = FALSE, warning = FALSE, echo = FALSE, fig.height = 3.5, fig.width = 4.5, fig.pos = "H", out.extra="", fig.cap = "Example of a data set with a nonlinear relationship between the predictor and the response."}
828
+
```{r 08-predictor-design, message = FALSE, warning = FALSE, echo = FALSE, fig.height = 3.5, fig.width = 4.5, fig.cap = "Example of a data set with a nonlinear relationship between the predictor and the response."}
829
829
curve_plt <- ggplot(df, aes(x = x, y = y)) +
830
830
geom_point() +
831
831
xlab("x") +
@@ -870,13 +870,13 @@ a deep understanding of the problem—as well as the wrangling tools
870
870
from previous chapters—to engineer useful new features that improve
871
871
predictive performance.
872
872
873
-
\newpage
874
-
875
873
> **Note:** Feature engineering
876
874
> is *part of tuning your model*, and as such you must not use your test data
877
875
> to evaluate the quality of the features you produce. You are free to use
878
876
> cross-validation, though!
879
877
878
+
\newpage
879
+
880
880
## The other sides of regression
881
881
882
882
So far in this textbook we have used regression only in the context of
0 commit comments