Skip to content

Commit 1dd5088

Browse files
committed
Fixing detected issue in gs guide
1 parent e81f408 commit 1dd5088

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vignettes/getting_started.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,15 +214,15 @@ Once the model is trained, we can use the standard `tidymodels` `predict()` func
214214
```{r model-predict-class}
215215
# Predict the class for the first 5 images in the test set
216216
class_preds <- mlp_fit |>
217-
predict(new_data = head(test_df))
217+
predict(new_data = head(select(test_df, x)))
218218
class_preds
219219
```
220220

221221
To get the underlying probabilities for each class, we can set `type = "prob"`. This returns a tibble with a probability column for each of the 10 classes (0-9).
222222

223223
```{r model-predict-prob}
224224
# Predict probabilities for the first 5 images
225-
prob_preds <- mlp_fit |> predict(new_data = head(test_df), type = "prob")
225+
prob_preds <- mlp_fit |> predict(new_data = head(select(test_df, x)), type = "prob")
226226
prob_preds
227227
```
228228

0 commit comments

Comments
 (0)