Tidymodels and Palmers Penguins

Oddly enough, I’ve been hearing a lot about tidymodels code week, from reddit to youtube.

Plus, the tidytuesday dataset this week looks fun.I figure I’ll spend a tidytuesday trying to figure out this new and in-development machine-learning package.

cols(

Species = col_character(),

Island = col_character(),

bill_length_mm = col_double(),

bill_depth_mm = col_double(),

flipper_length_mm = col_double(),

body_mass_g = col_double(),

Sex = col_character(),

Year = col_double()

)

penguins.pivot %>% ggplot(aes(values, fill = species)) + geom_histogram(bins = 20) + facet_wrap(~ metrics, scales = "free_x")

penguins.train <- penguins.split %>% rsample::training()

penguins.test <- penguins.split %>% rsample::testing()

penguins.cv <- penguins.train %>% rsample::vfold_cv(v = 10)

model.fit.prep

model.fit

.metric .estimator .estimate

<chr> <chr> <dbl>

1 Accuracy Multiclass 0.975

2 Kap Multiclass 0.960

penguins.met %>% autoplot() + ggpubr::theme_pubclean() + theme(strip.background = element_blank())