Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
R tidymodels part 3: Classification
Rating: 5.0 out of 5(2 ratings)
73 students

R tidymodels part 3: Classification

R, Data Science, tidymodels, Machine Learning, Classification, Logistic Regression, KNN, Naive Bayes, Metrics, RStudio
Last updated 10/2025
English
English [Auto],

What you'll learn

  • What classification is and how it differs from regression
  • How to interpret probabilities, odds, and log-odds in logistic regression
  • How logistic regression models are estimated using maximum likelihood
  • How to fit and interpret logistic regression models in tidymodels
  • What are the key classification metrics and how to calculate them
  • How to use accuracy, precision, recall, specificity, and F1 score
  • How to visualize and interpret ROC curves
  • How probability thresholds affect classification results
  • What happens when data are imbalanced and how to handle it
  • How to use balanced accuracy and advanced metrics for imbalanced data
  • How to tune probability thresholds and evaluate precision–recall curves
  • What resampling techniques exist for imbalanced data (up-sampling, down-sampling, SMOTE)
  • How to apply resampling techniques inside the tidymodels framework
  • How to train and tune KNN classifiers in tidymodels
  • What Bayes’ theorem is and how it leads to the Naive Bayes classifier
  • How the Naive Bayes classifier works for discrete and continuous features
  • How to build and compare Naive Bayes models in tidymodels

Course content

6 sections • 93 lectures • 14h 47m total length
  • Intro1:59

    Explore Tidymodels classification in the third installment, transitioning from regression, outlining basics, algorithms, and the course plan.

  • Course global path2:33

    Explore Tidymodels classification, contrast it with regression, and outline the course structure—from introduction to advanced topics and clustering in supervised learning, and coverage of unsupervised learning.

  • Course layout5:06

    Discover how this tidymodels part 3 course blends theory and practical coding with lectures and coding sessions, plus assignments, exercises, and complete materials in R and PDFs.

  • Exercises & assignments4:56

    Engage with one exercise per section in tidymodels classification, test your coding skills with new tidymodels tricks, and choose solo practice or guided walkthroughs and assignments with eda scripts.

  • R code3:17

    Learn to access and run the tidymodels classification scripts via the course GitHub repository, using RStudio or other tools, with session info and package versions.

Requirements

  • Finishing “R tidymodels part 2: Beyond linear regression” is strongly recommended.
  • Familiarity with the tidymodels framework and ML workflows covered in previous parts.
  • R and RStudio already installed on your computer.
  • Basic knowledge of statistics (concepts such as probability, regression and classification) is a plus.
  • Intermediate R knowledge and experience with tidyverse syntax are recommended.
  • If you are a complete beginner to programming or R, you may find this course challenging.
  • Interest in data science, machine learning, and classification modeling.
  • Curiosity about understanding probabilities, metrics, and model evaluation.
  • Interest in writing clean, efficient, and reproducible R code.
  • Please update R and its libraries if necessary. A list of versions (R and all R libraries used in the exercises) is provided at the end of each section.

Description

You’ve mastered regression modeling and explored advanced algorithms; now it’s time to step into the world of classification.


This course is designed for learners who want to build models that predict categories, not numbers, and who wish to understand the statistical and machine learning foundations behind them.


What You’ll Learn

In this course, you’ll move from probability intuition to full-scale classification workflows using tidymodels, R’s modern ecosystem for machine learning:

  • Understand what classification is and how it differs from regression

  • Learn the logic of logistic regression and its link to probabilities, odds, and log-odds

  • Fit and interpret logistic regression models using maximum likelihood estimation

  • Evaluate models with accuracy, precision, recall, specificity, and F1 score

  • Visualize model performance through ROC and AUC curves

  • Adjust probability thresholds and see their effect on predictions

  • Handle imbalanced data using balanced accuracy, threshold tuning, and advanced metrics

  • Apply resampling techniques such as upsampling, downsampling, and SMOTE

  • Build and tune K-nearest neighbors (KNN) classifiers

  • Explore Naive Bayes as a probabilistic classifier for both numeric and text data

  • Preprocess text using textrecipes and create a simple spam-filtering model

  • Compare multiple classification models within the same tidymodels workflow


Why Take This Course?

Classification problems are everywhere — from medical diagnostics and fraud detection to email filtering and customer segmentation.
This course helps you understand how these models make decisions and how to evaluate them responsibly.

You’ll gain not only the technical skills to build classification models but also the intuition to select the right metric and interpret model behavior — all while keeping your work tidy, reproducible, and explainable.


What You’ll Get

  • Clear, structured explanations of classification theory and practice

  • Step-by-step modeling workflows in R and tidymodels

  • Real-world examples and visual explanations of metrics

  • Exercises and assignments with full solutions

  • All code, datasets, and outputs provided

  • Lifetime access and updates

Who this course is for:

  • Anyone interested in data science or machine learning
  • Learners who want to understand classification modeling in R
  • Anyone who wants to analyze and predict categorical outcomes
  • Data analysts and scientists who want to extend their tidymodels skills
  • Anyone curious about logistic regression, KNN, or Naive Bayes algorithms
  • Those who wish to learn how to evaluate models using real-world metrics
  • Professionals who work with imbalanced data or probability-based predictions
  • Students and researchers building classification models
  • R users aiming to deepen their modeling expertise within the tidyverse/tidymodels ecosystem
  • Data scientists who mainly use Python and want to extend their skills into R