@@ -749,8 +749,8 @@ knn_spec
749
749
750
750
In order to fit the model on the breast cancer data, we need to pass the model specification
751
751
and the data set to the ` fit ` function. We also need to specify what variables to use as predictors
752
- and what variable to use as the target . Below, the ` Class ~ Perimeter + Concavity ` argument specifies
753
- that ` Class ` is the target variable (the one we want to predict),
752
+ and what variable to use as the response . Below, the ` Class ~ Perimeter + Concavity ` argument specifies
753
+ that ` Class ` is the response variable (the one we want to predict),
754
754
and both ` Perimeter ` and ` Concavity ` are to be used as the predictors.
755
755
756
756
``` {r 05-tidymodels-4}
@@ -861,7 +861,7 @@ In the `tidymodels` framework, all data preprocessing happens
861
861
using a ` recipe ` from [ the ` recipes ` R package] ( https://recipes.tidymodels.org/ ) [ @recipes ] .
862
862
Here we will initialize a recipe\index{recipe} \index{tidymodels!recipe|see{recipe}} for
863
863
the ` unscaled_cancer ` data above, specifying
864
- that the ` Class ` variable is the target , and all other variables are predictors:
864
+ that the ` Class ` variable is the response , and all other variables are predictors:
865
865
866
866
``` {r 05-scaling-2, results=FALSE, message=FALSE, echo = TRUE}
867
867
uc_recipe <- recipe(Class ~ ., data = unscaled_cancer)
@@ -872,7 +872,7 @@ uc_recipe
872
872
hidden_print_cli(uc_recipe)
873
873
```
874
874
875
- So far, there is not much in the recipe; just a statement about the number of targets
875
+ So far, there is not much in the recipe; just a statement about the number of response variables
876
876
and predictors. Let's add
877
877
scaling (` step_scale ` ) \index{recipe!step\_ scale} and
878
878
centering (` step_center ` ) \index{recipe!step\_ center} steps for
@@ -904,7 +904,7 @@ as well as naming particular columns with the same syntax as the `select` functi
904
904
For example:
905
905
906
906
- ` all_nominal() ` and ` all_numeric() ` : specify all categorical or all numeric variables
907
- - ` all_predictors() ` and ` all_outcomes() ` : specify all predictor or all target variables
907
+ - ` all_predictors() ` and ` all_outcomes() ` : specify all predictor or all response variables
908
908
- ` Area, Smoothness ` : specify both the ` Area ` and ` Smoothness ` variable
909
909
- ` -Class ` : specify everything except the ` Class ` variable
910
910
@@ -1324,7 +1324,7 @@ First we will load the data, create a model, and specify a recipe for how the da
1324
1324
1325
1325
``` {r 05-workflow, message = FALSE, warning = FALSE}
1326
1326
# load the unscaled cancer data
1327
- # and make sure the target Class variable is a factor
1327
+ # and make sure the response variable, Class, is a factor
1328
1328
unscaled_cancer <- read_csv("data/unscaled_wdbc.csv") |>
1329
1329
mutate(Class = as_factor(Class))
1330
1330
0 commit comments