Skip to content

Commit 6a4d199

Browse files
committed
fixing 1 line of code running onto next page, fixing spacing between words
1 parent 65d70b7 commit 6a4d199

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

classification1.Rmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ total set of variables per image in this data set is:
170170
11. Symmetry: how similar the nucleus is when mirrored
171171
12. Fractal Dimension: a measurement of how "rough" the perimeter is
172172

173+
\pagebreak
173174

174175
Below we use `glimpse` \index{glimpse} to preview the data frame. This function can
175176
make it easier to inspect the data when we have a lot of columns,
@@ -192,7 +193,7 @@ glimpse(cancer)
192193
```
193194

194195
Recall that factors have what are called "levels", which you can think of as categories. We
195-
can verify the levels of the `Class` column by using the `levels` \index{levels}\index{factor!levels} function.
196+
can verify the levels of the `Class` column by using the `levels`\index{levels}\index{factor!levels} function.
196197
This function should return the name of each category in that column. Given
197198
that we only have two different values in our `Class` column (B for benign and M
198199
for malignant), we only expect to get two names back. Note that the `levels` function requires a *vector* argument;
@@ -534,7 +535,7 @@ kable(math_table, booktabs = TRUE,
534535
```
535536

536537
The result of this computation shows that 3 of the 5 nearest neighbors to our new observation are
537-
malignant (`M`); since this is the majority, we classify our new observation as malignant.
538+
malignant ("M"); since this is the majority, we classify our new observation as malignant.
538539
These 5 neighbors are circled in Figure \@ref(fig:05-multiknn-3).
539540

540541
```{r 05-multiknn-3, echo = FALSE, fig.height = 3.5, fig.width = 4.5, fig.cap="Scatter plot of concavity versus perimeter with 5 nearest neighbors circled."}
@@ -582,7 +583,6 @@ three predictors.
582583
new_obs_Perimeter <- 0
583584
new_obs_Concavity <- 3.5
584585
new_obs_Symmetry <- 1
585-
586586
cancer |>
587587
select(ID, Perimeter, Concavity, Symmetry, Class) |>
588588
mutate(dist_from_new = sqrt((Perimeter - new_obs_Perimeter)^2 +

0 commit comments

Comments
 (0)