LSIRM Statistical and Machine Learning

This site hosts materials for the LSIRM course on Statistical and Machine learning.

1. Linear Regression Models

  • Handout pdf
  • Code r
  • Lab Problems: pdf, Answers: pdf

2. Modeling Non-linearity in Linear Regression Models

  • Diagnosing, Transformations, Polynomials: Handout pdf, Code r
  • Cross-validation: Handout pdf, Code r
  • Splines, Smoothing Splines and GAMS: Handout pdf, Code r
    • Lab Exercises: Handout: html Answers: html r
  • Data: rda rda

  • Regression Models with Selection - MARS and Polywog: Handout pdf, Code r

We may use a different version of polywog than the one on CRAN, so you can download the relevant binaries from the links below. Before trying to install them, first do the following:

install.packages(c("foreach", "Formula", "glmnet", "iterators", 
    "Matrix", "miscTools", "ncvreg", "Rcpp", "stringr"))
  • Polywog Windows Binary zip macOS Binary tgz

After you’ve downloaded the files, you can set R’s working directory to wherever you stored the binary file and then do either of the following as appropriate.

install.packages("", repos=NULL)
install.packages("polywog_0.4-1.tgz", repos=NULL)

4. Tree-based regression models

  • Handout pdf
  • Code r

5. Unsupervised Learning - SVD and PCA

  • Handout pdf
  • Code r