Machine Learning: Linear Models

Learn to build a variety of Linear Models using R.

Contents

  • Motivating Example
  • k-Nearest Neighbours
  • Background
    • Residuals
    • Best fit and least squares
  • Linear Regression
    • Assumptions
    • Multiple regression
    • Model evaluation (RMSE, MAE and MPE)
    • Categorical and dummy variables
    • Formulae
      • Simple Formulae
      • Interactions
    • Example: Prostate Cancer Data
    • Example: Prostate Cancer Data with Interactions
    • Polynomial regression
    • LOESS
  • Validating Model Assumptions
    • Fit Diagnostics
  • Using {broom}
  • Logistic Regression
    • Odds, Log Odds and the Logit Function
    • Example: Synthetic Data
    • Principle of Parsimony
    • Multicollinearity
    • Example: Myopia Data
  • Generalised Linear Models
    • Logistic Regression
      • Odds, Log Odds and the Logit Function
      • Example: Synthetic Data
      • Thresholding and classification
      • Principle of Parsimony
      • Multicollinearity
      • Example: Myopia Data
      • Beyond binary: One-versus-rest models
      • Model evaluation
    • Poisson regression
  • Feature Importance
  • Feature Selection
    • Stepwise (forward selection and backward elimination)
  • Regularisation
    • Lasso and Ridge Regression
  • Generalized Additive Models
  • Mixed Effects Models
  • Using {caret}
    • pre-processing;
    • train/test splitting;
    • feature importance and feature selection;
    • model evaluation (using cross validation and bootstrapping);
    • model tuning.

Prior Knowledge

We assume that participants have prior experience with R, ideally having completed both the the Introduction to R and Data Wrangling courses.

Book now!

Training Philosophy

Our training emphasises practical skills. So, although you'll be learning concepts and theory, you'll see how everything is applied in the real world. We will work through examples and exercises based on real datasets.

Requirements

All you'll need is a computer with a browser and a decent internet connection. We'll be using an online development environment. This means that you can focus on learning and not on solving technical problems.

Of course, we are happy to help you get your local environment set up too! You can start by following these instructions.

Package

The training package includes access to
  • our online development environment and
  • detailed course material (slides and scripts).

Return to our list of courses.