Course contents

Welcome

Welcome

On this page
  1. What you will be able to do
  2. R is a language, not a diagnosis machine
  3. Follow this learning sequence
  4. Start with Chapter 01

You do not need any coding background. Start with RStudio, learn how to import and understand a data table, and then complete an entire supervised ML workflow. Parts III to VI of the course survey the major families of supervised and unsupervised algorithms, then help you choose among them.

What you will be able to do

After the core track (Chapters 01–18), you can open RStudio, read a CSV, audit missing values, use functions, make plots, define the outcome and predictors, split by a valid unit, impute without leakage, fit logistic regression and random forests, cross-validate, report performance, save the model, and explain why a final holdout is not a reusable tuning set.

After Parts III to VI (Chapters 19–31), you can choose the appropriate task and compare several methods: numeric regression, binary/multiclass classification, PCA, clustering, association mining, anomaly detection, forecasting, survival, and partial-label methods. You will also know when neural, boosting, graph, transfer, or reinforcement learning requires deeper preparation.

R is a language, not a diagnosis machine

A program is a repeatable list of instructions. A data frame is a table. A learning algorithm finds patterns in specified training examples. These statements describe a computational procedure—not evidence that the predictions are medically valid.

Our dataset has 600 fabricated examples. The labels are deliberately fully known, unlike many real EHR exports. We never infer that “no diagnosis recorded” means confirmed negative. Real patient data must not be added to this course or to your practice files.

Follow this learning sequence

  1. Learn to code (01–08): what a line does, how to read errors, tables, missing values, and plots.
  2. Finish a full model (09–18): question, label, split, preprocessing, baseline, CV, threshold, independent test, and report.
  3. Learn more methods (19–28): Part III adds supervised regression, classification families and evaluation, and time and survival (19–22); Part IV covers unsupervised learning: PCA and clustering, clustering families, dimensionality, association and anomaly detection (23–26); Part V covers other kinds of learning, including positive–unlabeled labels (27–28).
  4. Choose and compare methods (29–31): Part VI gives a methods map, rules for selecting a method without overfitting, and an advanced capstone that reproduces four method labs and explains why the outcomes and metrics differ.

For each chapter: predict the output → run the example → change one line → solve Try it → check the solution → explain the conclusion to another member.

Start with Chapter 01

Chapter 01 — Orientation. The Methods map (chapter 29) summarizes the method families of Parts III to V; you may skim it before Part III for a preview, and read it in full in Part VI.

The practice files are one free download, r-for-ehr-practice.zip, from this course’s page on the website. Chapter 02 shows how to use it.

Privacy: All course records are simulated. Storing files privately, for example in a private online repository, does not make a location approved for real protected health information. Never upload real charts, MRNs, clinical notes, or identifiers without formal authorization and appropriate security controls.

Evaluation: A model that ranks invented Yes/No labels well has not proven disease detection, calibration, equity, or clinical usefulness.