A complete in-house curriculum · 2026 edition

Learn data science from first principles to production work.

Every lesson explains exactly what a concept is, why it exists, where professionals use it, how it works, and what can go wrong. Build evidence of skill—not a collection of certificates.

6

structured phases

30

detailed lessons

9–12

months at 15 hours/week

6

portfolio projects

Study system

Use the same professional loop for every lesson

Do not wait to finish all theory before building. Learn a small idea, test it, then use it in a realistic piece of work.

  1. 01

    Understand

    Read the definition and explain it in your own words.

  2. 02

    Observe

    Study the worked example and predict its result.

  3. 03

    Practise

    Complete the exercise without copying the example.

  4. 04

    Build

    Use the concept in the phase project with imperfect data.

  5. 05

    Review

    Check the completion criteria before moving forward.

The complete journey

Six phases, from fundamentals to reliable systems

Complete phases in order. Open each lesson for the full explanation, practical example, mistakes, and exercise.

Your progress

Loading progress…

Phase 01

4–6 weeks

0 / 6 complete

Python and engineering foundations

Outcome: Write reliable programs, inspect errors, and manage a small project without following a tutorial line by line.

01.1Python, data types, and control flow

Exactly what it is

Python is a programming language used to express a repeatable sequence of instructions. Variables store values; data types describe those values; conditions and loops control which instructions run.

Why you should learn it

Data work contains repeated tasks: reading files, correcting values, calculating metrics, and producing reports. Code makes the same process fast, reviewable, and repeatable.

Real-world use case

An operations analyst receives daily order files. A Python program validates every row, calculates revenue, and flags negative quantities before the report is sent.

Learn in this order

  1. 1.Learn strings, numbers, booleans, lists, dictionaries, sets, and tuples.
  2. 2.Use if/elif/else for decisions and loops for repeated work.
  3. 3.Write small functions with clear inputs and return values.
  4. 4.Use comprehensions only when they remain easy to read.

Common mistakes

  • Using one long script instead of small functions
  • Changing a list while looping over it
  • Choosing a list when fast unique lookup needs a set
Validate and total completed orders
orders = [
    {"status": "complete", "qty": 2, "price": 450},
    {"status": "cancelled", "qty": 1, "price": 900},
]

def completed_revenue(rows):
    valid = [r for r in rows if r["status"] == "complete" and r["qty"] > 0]
    return sum(r["qty"] * r["price"] for r in valid)

print(completed_revenue(orders))

Output: Output: 900. Cancelled orders and invalid quantities do not enter the total.

Practice task

Read a list of transactions and return total sales, cancelled count, and the highest-value valid order.

01.2Errors, testing, and reproducible environments

Exactly what it is

Exceptions report failures. Tests check expected behaviour automatically. A virtual environment gives each project its own package versions so one project cannot silently break another.

Why you should learn it

Real input is incomplete and inconsistent. Professional code must fail clearly, protect valid results, and behave the same on another machine.

Real-world use case

A currency column sometimes contains 'N/A'. Instead of crashing halfway through payroll, the program records the bad row and continues with an auditable error report.

Learn in this order

  1. 1.Read tracebacks from the final line upward.
  2. 2.Catch only errors you can handle; never hide every exception.
  3. 3.Validate assumptions at the boundary of a program.
  4. 4.Create focused tests for normal, empty, missing, and invalid input.

Common mistakes

  • Using except: pass and losing the cause
  • Installing every package globally
  • Testing only the happy path
Handle a known input error
def parse_amount(value):
    if value is None or value == "":
        return None
    try:
        amount = float(value)
    except (TypeError, ValueError) as error:
        raise ValueError(f"Invalid amount: {value}") from error
    return amount

Output: Missing values remain missing; malformed values raise a useful error instead of silently becoming zero.

Practice task

Write and test a CSV amount parser for valid numbers, blanks, text, negative values, and very large values.

01.3Git, terminal, and project structure

Exactly what it is

Git records versions of your work. The terminal runs tools directly. A project structure separates source code, tests, data references, configuration, and documentation.

Why you should learn it

Teams must review changes, reproduce results, recover older versions, and work in parallel without emailing notebooks named final_v7.

Real-world use case

Two analysts improve different parts of a churn project. Git shows exactly what each changed and allows a safe review before combining their work.

Learn in this order

  1. 1.Learn pwd, ls, cd, mkdir, and basic file operations.
  2. 2.Use git status, add, commit, branch, pull, and push.
  3. 3.Never commit credentials, private customer data, or large generated files.
  4. 4.Write a README with setup, inputs, commands, and expected output.

Common mistakes

  • One giant commit after a week of work
  • Committing API keys
  • Keeping code only inside an unstructured notebook

Practice task

Publish an expense tracker with source code, tests, sample data, a dependency file, and a clear README.

01.4Object-oriented design, modules, and clean code

Exactly what it is

Classes group data with the behaviour that belongs to it. Modules split code into files with a single responsibility. Clean code uses clear names, small functions, and type hints so others can read it quickly.

Why you should learn it

Data projects grow from one notebook into pipelines, APIs, and shared libraries. Without structure, every change becomes risky and slow.

Real-world use case

A fraud team builds a reusable FeatureBuilder class. Every model imports it, so features are calculated the same way in training and in production.

Learn in this order

  1. 1.Learn classes, __init__, methods, and dataclasses.
  2. 2.Add type hints and run a type checker such as mypy.
  3. 3.Move reusable logic from notebooks into .py modules.
  4. 4.Format with black or ruff and follow PEP 8 naming.

Common mistakes

  • Creating classes for everything when a function is enough
  • Leaving business logic only inside notebooks
  • Names like df2, temp, and final_data
A small typed feature builder
from dataclasses import dataclass

@dataclass
class Customer:
    orders: int
    total_spent: float

    def average_order_value(self) -> float:
        return self.total_spent / self.orders if self.orders else 0.0

print(Customer(orders=4, total_spent=2000).average_order_value())

Output: Output: 500.0. Zero orders return 0.0 instead of a division error.

Practice task

Convert one of your notebooks into a package with a module for loading, one for cleaning, and one test file.

01.5Working with files, JSON, and APIs

Exactly what it is

Real data arrives as CSV, Excel, JSON, and responses from web APIs. An API is a URL that returns structured data when you send a request, often with a key and page limits.

Why you should learn it

Much business data never sits in a clean table. You must collect it safely, respect rate limits, and store it in a usable format.

Real-world use case

A marketing analyst pulls daily campaign spend from an advertising API, handles pagination, and saves each day as a dated file for reporting.

Learn in this order

  1. 1.Read and write CSV and JSON with the standard library and pandas.
  2. 2.Use requests with timeouts and check status codes.
  3. 3.Handle pagination and retry temporary failures with backoff.
  4. 4.Keep API keys in environment variables, never in code.

Common mistakes

  • No timeout, so the program hangs forever
  • Committing API keys to Git
  • Ignoring pagination and loading only the first page
Safe API request with retry
import os, time, requests

def fetch(url, retries=3):
    headers = {"Authorization": f"Bearer {os.environ['API_KEY']}"}
    for attempt in range(retries):
        r = requests.get(url, headers=headers, timeout=10)
        if r.status_code == 429:
            time.sleep(2 ** attempt)
            continue
        r.raise_for_status()
        return r.json()
    raise RuntimeError("Rate limit not cleared")

Output: Temporary rate limits are retried with growing waits; real errors stop the program clearly.

Practice task

Collect data from a free public API (weather or exchange rates) for 30 days and save it as a clean table.

Phase project

Reliable expense analyser

Build a command-line program that reads transaction CSV files, validates the schema, categorises spending, and creates a monthly summary.

Deliverables

  • Reusable functions rather than one long script
  • Tests for invalid dates, missing amounts, and duplicate rows
  • Sample input and expected output
  • README with setup and decisions
Ready to continue when
  • Write a 100–150 line program independently
  • Explain a traceback and fix the root cause
  • Create a clean repository another person can run

Optional further study

Phase 02

4–6 weeks, alongside Python

0 / 6 complete

Statistics, probability, and mathematical intuition

Outcome: Describe uncertainty, design a sound comparison, and explain what a statistical result does and does not prove.

02.1Descriptive statistics and distributions

Exactly what it is

Descriptive statistics summarise observed data. A distribution describes which values occur and how often. Mean shows the balance point, median the middle, and variance or standard deviation the spread.

Why you should learn it

A single average can hide skew, outliers, and separate customer groups. Understanding the shape prevents misleading conclusions.

Real-world use case

Average delivery time is 28 minutes, but a long right tail shows 8% of customers wait over an hour. The operational problem is invisible in the average.

Learn in this order

  1. 1.Inspect count, missingness, minimum, maximum, and quantiles.
  2. 2.Plot the distribution before selecting a summary.
  3. 3.Compare meaningful groups and time periods.
  4. 4.Ask whether outliers are errors or rare, real events.

Common mistakes

  • Removing every outlier automatically
  • Comparing groups with very different sample sizes without context
  • Reporting averages without units or time range
Mean versus median
times = [18, 20, 21, 22, 79]
mean = sum(times) / len(times)  # 32
median = sorted(times)[len(times) // 2]  # 21

Output: One delay pulls the mean to 32 minutes. The median better describes a typical order, while the outlier still needs investigation.

Practice task

Analyse delivery times by city. Report typical performance, variability, tail risk, and missing-data rate.

02.2Probability, sampling, and confidence intervals

Exactly what it is

Probability quantifies uncertainty. A sample estimates a larger population. A confidence interval gives a range produced by a method that captures the true value at a stated long-run rate.

Why you should learn it

Business decisions use incomplete evidence. Sampling theory helps distinguish a stable pattern from random variation.

Real-world use case

A survey of 1,000 customers estimates satisfaction at 72%. A confidence interval communicates how precise that estimate is before leadership treats 72% as exact.

Learn in this order

  1. 1.Define the population and how the sample was selected.
  2. 2.Study conditional probability and Bayes' rule.
  3. 3.Understand standard error and the effect of sample size.
  4. 4.State assumptions whenever you report an interval.

Common mistakes

  • Treating correlation as causation
  • Ignoring selection bias
  • Saying a 95% interval gives a 95% probability to a fixed parameter

Practice task

Simulate coin flips at different sample sizes and observe how estimated probability stabilises.

02.3Hypothesis tests and A/B experiments

Exactly what it is

A hypothesis test asks whether observed evidence would be unusual under a defined null hypothesis. An A/B test randomly assigns comparable users to alternatives to estimate a causal effect.

Why you should learn it

Teams need to know whether a new price, page, or recommendation actually improves an outcome rather than merely moving at the same time.

Real-world use case

An online shop tests a shorter checkout. Conversion rises from 4.0% to 4.4%; the team checks uncertainty, practical value, guardrail metrics, and sample quality before release.

Learn in this order

  1. 1.Write the primary metric and minimum useful effect before testing.
  2. 2.Randomise, estimate sample size, and set a stopping rule.
  3. 3.Check assignment balance and instrumentation.
  4. 4.Report effect size and interval, not only a p-value.

Common mistakes

  • Stopping when the p-value first looks good
  • Testing many metrics and reporting only winners
  • Confusing statistical significance with meaningful business impact
Business value of a lift
control_rate = 0.040
treatment_rate = 0.044
monthly_visitors = 500_000
extra_orders = (treatment_rate - control_rate) * monthly_visitors
print(round(extra_orders))

Output: Estimated lift: 2,000 additional orders per month, before accounting for uncertainty and costs.

Practice task

Write an experiment plan for a redesigned signup page, including metric, guardrails, sample unit, risks, and decision rule.

02.4Linear algebra and calculus for machine learning

Exactly what it is

Linear algebra describes data as vectors and matrices. Calculus describes how a value changes; the gradient shows which direction reduces model error fastest.

Why you should learn it

Every model, from linear regression to neural networks, is matrix multiplication plus gradient-based optimisation. Understanding this helps you debug training and read research.

Real-world use case

A recommendation system represents users and products as vectors. The dot product of the two vectors scores how well a product matches a user.

Learn in this order

  1. 1.Learn vectors, dot products, matrix multiplication, and shapes.
  2. 2.Understand derivatives, partial derivatives, and the chain rule.
  3. 3.Implement gradient descent by hand for a straight line.
  4. 4.Learn eigenvectors intuitively through PCA.

Common mistakes

  • Memorising formulas without checking matrix shapes
  • Learning rate too high, so loss explodes
  • Skipping maths entirely and treating models as magic
Gradient descent for y = w·x
import numpy as np
x = np.array([1, 2, 3, 4]); y = 2 * x
w, lr = 0.0, 0.01
for _ in range(200):
    grad = -2 * np.mean(x * (y - w * x))
    w -= lr * grad
print(round(w, 3))

Output: Output: about 2.0. The model learned the true slope by repeatedly moving against the gradient.

Practice task

Implement linear regression with NumPy using gradient descent, then compare the result with scikit-learn.

02.5Correlation, causation, and regression thinking

Exactly what it is

Correlation measures whether two variables move together. Causation means changing one variable actually changes the other. Regression estimates the relationship while holding other factors constant.

Why you should learn it

Business leaders make decisions based on your findings. Confusing correlation with causation leads to expensive wrong actions.

Real-world use case

Customers who use a mobile app spend more. An analyst checks whether high spenders simply prefer the app before recommending pushing everyone to it.

Learn in this order

  1. 1.Compute Pearson and Spearman correlation.
  2. 2.Identify confounders: hidden factors that affect both variables.
  3. 3.Fit a multiple regression and interpret coefficients.
  4. 4.Use experiments or causal methods such as difference-in-differences when possible.

Common mistakes

  • Claiming 'X causes Y' from observational data
  • Ignoring outliers that drive a correlation
  • Reading p-values as effect size
A classic confounder
# Ice cream sales and drownings are correlated (r = 0.8)
# Confounder: hot weather increases both
# Regression: drownings ~ ice_cream + temperature
# ice_cream coefficient -> near 0 once temperature is included

Output: After controlling for temperature, ice cream has no real effect. The first correlation was misleading.

Practice task

Find a public dataset with two correlated variables and write one page on possible confounders and how to test causation.

Phase project

Product experiment report

Analyse a realistic A/B test from raw assignment and event data to a recommendation.

Deliverables

  • Data quality and sample-ratio checks
  • Effect size with confidence interval
  • Segment analysis marked as exploratory
  • Plain-English launch or no-launch recommendation
Ready to continue when
  • Explain p-value, confidence interval, and statistical power simply
  • Recognise selection bias and confounding
  • Design an experiment without peeking or metric shopping

Optional further study

Phase 03

6–8 weeks

0 / 6 complete

SQL, data cleaning, and exploratory analysis

Outcome: Turn imperfect tables into a trustworthy analysis and communicate useful findings with evidence.

03.1SQL and relational thinking

Exactly what it is

SQL describes the result you want from related tables. Keys connect entities; joins combine them; aggregations summarise them; window functions calculate across related rows without collapsing detail.

Why you should learn it

Most company data lives in databases. A data scientist must retrieve the correct population before modelling; a wrong join can invalidate everything downstream.

Real-world use case

A marketplace combines customers, orders, and refunds to calculate monthly net revenue and repeat-purchase rate by acquisition channel.

Learn in this order

  1. 1.Master SELECT, WHERE, CASE, GROUP BY, and HAVING.
  2. 2.Learn inner and left joins and verify row counts after every join.
  3. 3.Use CTEs to name logical stages.
  4. 4.Use window functions for ranking, running totals, and previous-event comparisons.

Common mistakes

  • Many-to-many joins that multiply revenue
  • Filtering the right table in WHERE after a left join
  • Using SELECT DISTINCT to hide an incorrect join
Rank products within each category
WITH sales AS (
  SELECT category, product_id, SUM(amount) AS revenue
  FROM orders
  WHERE status = 'complete'
  GROUP BY category, product_id
)
SELECT *, RANK() OVER (
  PARTITION BY category ORDER BY revenue DESC
) AS category_rank
FROM sales;

Output: Each product keeps its row and receives a rank within its category. Ties receive the same rank.

Practice task

Find each customer's first order, latest order, lifetime revenue, and 30-day repeat status.

03.2Pandas, NumPy, and data quality

Exactly what it is

Pandas provides labelled tables in Python; NumPy provides efficient numeric arrays. Data cleaning identifies invalid, missing, duplicated, inconsistent, or impossible values and applies documented rules.

Why you should learn it

Model quality cannot exceed input quality. Cleaning also protects business reports from silent over-counting and inconsistent definitions.

Real-world use case

Customer records use three date formats, duplicated IDs, mixed currencies, and blank cancellation reasons. A documented cleaning pipeline creates one analysis-ready table.

Learn in this order

  1. 1.Create a data contract: columns, types, allowed values, and grain.
  2. 2.Profile types, uniqueness, ranges, missingness, and duplicates.
  3. 3.Correct with explicit rules and preserve raw data.
  4. 4.Validate row counts and totals after transformations.

Common mistakes

  • Using inplace operations across a long notebook
  • Filling missing values with zero without domain meaning
  • Dropping duplicates without defining the row grain
Clean dates and deduplicate deliberately
orders["ordered_at"] = pd.to_datetime(
    orders["ordered_at"], errors="coerce", utc=True
)
orders = orders.sort_values("updated_at")
orders = orders.drop_duplicates("order_id", keep="last")
assert orders["order_id"].is_unique

Output: Invalid dates become visible missing values, and the latest known version of each order is retained.

Practice task

Clean a retail file and produce a quality report showing invalid types, missingness, duplicates, and rejected rows.

03.3Exploratory analysis and visual communication

Exactly what it is

Exploratory data analysis tests assumptions, discovers patterns, and finds quality problems before formal modelling. Visualisation encodes comparisons so an audience can understand the evidence quickly.

Why you should learn it

The first useful answer is often a segmented trend or process problem, not a model. Clear charts help teams act on findings.

Real-world use case

Churn appears stable overall, but cohort analysis reveals that customers acquired through one campaign leave twice as fast after the first month.

Learn in this order

  1. 1.Start with a business question and metric definition.
  2. 2.Inspect time, segments, distributions, and relationships.
  3. 3.Use bar charts for categories, lines for time, and scatter plots for relationships.
  4. 4.End every chart with one factual takeaway and one caveat.

Common mistakes

  • Using a pie chart for many categories
  • Truncated axes that exaggerate change
  • Treating an exploratory correlation as proof

Practice task

Create a five-chart executive analysis where every chart answers a different business question.

03.4Data visualisation and storytelling

Exactly what it is

Visualisation turns numbers into charts people can understand quickly. Storytelling arranges findings into a clear message: context, insight, and recommended action.

Why you should learn it

An analysis that decision-makers cannot understand has no impact. Clear charts are often the most valuable output of a data scientist.

Real-world use case

A product analyst shows a single line chart where sign-ups drop exactly after a form change, and the team reverts it the same day.

Learn in this order

  1. 1.Choose the chart by question: trend = line, comparison = bar, distribution = histogram, relationship = scatter.
  2. 2.Use matplotlib and seaborn, then Plotly for interactive charts.
  3. 3.Remove clutter; label axes and add a clear title stating the insight.
  4. 4.Build a dashboard in Power BI, Tableau, or Streamlit.

Common mistakes

  • Pie charts with many slices
  • Truncated y-axis that exaggerates change
  • Titles that describe the chart instead of the insight
Insight-first chart
import matplotlib.pyplot as plt
ax = daily.plot(x="date", y="signups", legend=False)
ax.axvline("2026-03-10", linestyle="--")
ax.set_title("Sign-ups fell 32% after the new form launched")
ax.set_ylabel("Daily sign-ups")
plt.tight_layout()

Output: The title states the finding, and the marker shows exactly when it happened.

Practice task

Create a five-chart story from a public dataset and present it in three minutes to a friend.

03.5Data engineering basics: pipelines, warehouses, and data quality

Exactly what it is

A pipeline moves data from sources to storage on a schedule (ETL or ELT). A warehouse such as BigQuery or Snowflake stores analytics data. Data quality checks confirm the data is complete, fresh, and valid.

Why you should learn it

Models and dashboards are only as good as the data feeding them. Most production incidents start with broken or late data.

Real-world use case

An e-commerce company loads orders every hour with Airflow, transforms them with dbt, and blocks the dashboard refresh if row counts drop by half.

Learn in this order

  1. 1.Understand ETL vs ELT, batch vs streaming.
  2. 2.Learn a warehouse and dbt models.
  3. 3.Schedule jobs with Airflow or Prefect.
  4. 4.Add checks: nulls, duplicates, freshness, and value ranges.

Common mistakes

  • No alerts when a job fails silently
  • Rewriting history without backups
  • Mixing raw and cleaned data in one table
Simple data quality gate
def check(df):
    assert len(df) > 1000, "Too few rows"
    assert df["order_id"].is_unique, "Duplicate orders"
    assert df["amount"].ge(0).all(), "Negative amounts"
    assert df["created_at"].max() > now - timedelta(hours=2), "Stale data"

Output: The pipeline stops before bad data reaches reports or models.

Practice task

Build a daily pipeline that downloads a public dataset, validates it, and loads it into SQLite or DuckDB.

Phase project

Marketplace health analysis

Combine orders, customers, products, and refunds; clean them; then explain revenue, retention, and operational risk.

Deliverables

  • SQL query with row-count checks
  • Reproducible cleaning notebook or script
  • Five decision-focused charts
  • One-page recommendation with limitations
Ready to continue when
  • Explain the grain of every table
  • Detect a join that duplicates rows
  • Clean an unfamiliar file and find three defensible insights

Optional further study

Phase 04

8–10 weeks

0 / 6 complete

Machine learning and honest evaluation

Outcome: Build a baseline, select an appropriate model and metric, prevent leakage, and translate predictions into decisions.

04.1Problem framing, baselines, and splits

Exactly what it is

Machine learning learns patterns from examples to predict an unknown value or group similar observations. Problem framing defines the prediction unit, target, decision time, and action the prediction will support.

Why you should learn it

A technically accurate model is useless if it predicts too late, optimises the wrong target, or cannot trigger a useful action.

Real-world use case

Instead of 'predict churn', define: every Monday, score active subscribers for cancellation in the next 30 days so the retention team can contact the highest-risk 2,000.

Learn in this order

  1. 1.Write the business decision and prediction timestamp.
  2. 2.Define labels using only information available after that timestamp.
  3. 3.Create a simple rule or average as a baseline.
  4. 4.Split by time or entity to match future use.

Common mistakes

  • Randomly splitting time-dependent data
  • Using a feature recorded after the outcome
  • Starting with a complex model before a baseline

Practice task

Frame fraud detection with prediction unit, label window, feature window, action, costs, and safe fallback.

04.2Models, preprocessing, and feature engineering

Exactly what it is

Linear models learn weighted relationships; trees learn decision rules; ensembles combine many models. Preprocessing converts raw inputs into stable numeric features. Feature engineering represents useful domain knowledge.

Why you should learn it

Different models suit different data, constraints, and explanation needs. A pipeline ensures training and prediction apply exactly the same transformations.

Real-world use case

A lender compares logistic regression for transparency with gradient-boosted trees for nonlinear performance, while retaining human review and fairness checks.

Learn in this order

  1. 1.Begin with logistic or linear regression.
  2. 2.Use trees and ensembles for nonlinear tabular patterns.
  3. 3.Fit imputers, encoders, and scalers only on training data.
  4. 4.Keep transformations and model in one pipeline.

Common mistakes

  • Scaling the complete dataset before splitting
  • Encoding missing or unseen categories inconsistently
  • Adding hundreds of features without an ablation check
Leakage-safe pipeline
pipeline = Pipeline([
    ("prep", ColumnTransformer([
        ("num", StandardScaler(), numeric_cols),
        ("cat", OneHotEncoder(handle_unknown="ignore"), category_cols),
    ])),
    ("model", LogisticRegression(class_weight="balanced")),
])
pipeline.fit(X_train, y_train)

Output: Preprocessing learns only from training data and is reused consistently for validation and future predictions.

Practice task

Compare a baseline, logistic regression, decision tree, and boosted model using one controlled validation design.

04.3Metrics, validation, imbalance, and thresholds

Exactly what it is

A metric measures one aspect of model behaviour. Precision asks how many alerts were correct; recall asks how many real cases were found. A threshold converts a probability into an action.

Why you should learn it

Accuracy can be 99.9% while detecting no rare fraud. The correct metric and threshold depend on the cost of false alarms, missed cases, and operational capacity.

Real-world use case

A hospital triage model prioritises recall for dangerous conditions but constrains false alerts so clinicians can review the queue safely.

Learn in this order

  1. 1.Choose metrics from error costs, not habit.
  2. 2.Use cross-validation only when folds match deployment reality.
  3. 3.Inspect confusion matrices and calibration.
  4. 4.Tune the decision threshold on validation data, then evaluate once on test data.

Common mistakes

  • Selecting the model on the test set
  • Using SMOTE before the split
  • Reporting ROC-AUC without checking precision at the operating threshold
Why accuracy fails
patients = 10_000
positive = 50
predicted_positive = 0
accuracy = (patients - positive) / patients
print(f"{accuracy:.1%}")

Output: Accuracy is 99.5%, yet recall is 0% because the model misses every positive patient.

Practice task

Given a review capacity of 500 cases per day, choose a threshold and explain the expected true and false alerts.

04.4Feature engineering and handling imbalanced data

Exactly what it is

Feature engineering creates useful model inputs from raw data, such as days since last purchase. Imbalanced data means one class is rare, like fraud at 0.5% of transactions.

Why you should learn it

Better features usually beat a fancier algorithm. Rare-event problems are common in industry, and accuracy alone hides failure.

Real-world use case

A bank adds 'transactions in the last hour' and 'distance from home' features, and uses class weights so the model catches more fraud.

Learn in this order

  1. 1.Encode categories (one-hot, target encoding) and scale numbers.
  2. 2.Create time, ratio, and aggregation features.
  3. 3.Use class weights, resampling, or threshold tuning for imbalance.
  4. 4.Evaluate with precision, recall, PR-AUC, and a cost matrix.

Common mistakes

  • Reporting 99% accuracy on 1% positive data
  • Oversampling before the train/test split
  • Features that use future information
Tune the decision threshold
from sklearn.metrics import precision_score, recall_score
probs = model.predict_proba(X_val)[:, 1]
for t in [0.5, 0.3, 0.1]:
    pred = probs >= t
    print(t, precision_score(y_val, pred), recall_score(y_val, pred))

Output: Lowering the threshold catches more fraud (higher recall) at the cost of more false alarms. Choose based on business cost.

Practice task

Train a fraud model on a public credit card dataset and choose a threshold using an assumed cost per missed fraud and per false alarm.

04.5Unsupervised learning, clustering, and explainability

Exactly what it is

Unsupervised learning finds structure without labels: clustering groups similar items, dimensionality reduction compresses features. Explainability tools like SHAP show why a model made a prediction.

Why you should learn it

Labels are often missing. Stakeholders and regulators also need to understand model decisions before they trust them.

Real-world use case

A retailer clusters customers into segments for targeted offers, and a lender uses SHAP to explain each loan decision to customers.

Learn in this order

  1. 1.Learn K-means, DBSCAN, and hierarchical clustering.
  2. 2.Use PCA and UMAP to visualise high-dimensional data.
  3. 3.Validate clusters with business meaning, not only scores.
  4. 4.Explain models with feature importance and SHAP values.

Common mistakes

  • Forgetting to scale before K-means
  • Picking the number of clusters without business review
  • Treating SHAP values as causal effects
Customer segmentation
from sklearn.preprocessing import StandardScaler
from sklearn.cluster import KMeans
X = StandardScaler().fit_transform(rfm[["recency", "frequency", "monetary"]])
rfm["segment"] = KMeans(n_clusters=4, n_init=10, random_state=42).fit_predict(X)
print(rfm.groupby("segment").mean())

Output: Four segments appear, such as 'loyal high spenders' and 'at-risk customers', each with a clear action.

Practice task

Segment an online retail dataset with RFM features and write a one-line marketing action for each segment.

Phase project

Production-minded churn model

Build a time-aware churn model that produces a prioritised intervention list, not only a score.

Deliverables

  • Problem and label specification
  • Baseline and two model comparison
  • Leakage audit and validation rationale
  • Threshold, business-cost estimate, and model card
Ready to continue when
  • Explain why the split matches deployment
  • Choose metrics from business costs
  • Find leakage and compare against a baseline

Optional further study

Phase 05

8–10 weeks

0 / 6 complete

Deep learning, LLMs, and specialisation

Outcome: Use pretrained models responsibly, diagnose training, and build one focused vision, language, or time-series system.

05.1Neural networks and training behaviour

Exactly what it is

A neural network composes layers of weighted transformations. A loss measures error; backpropagation calculates how each weight contributed; an optimiser updates weights to reduce loss.

Why you should learn it

Neural networks learn rich patterns from images, text, audio, and large datasets where manual features are limiting.

Real-world use case

A manufacturer fine-tunes an image model to identify surface defects, then routes uncertain cases to a quality inspector.

Learn in this order

  1. 1.Understand tensors, layers, activations, loss, and gradients.
  2. 2.Build a small training and validation loop.
  3. 3.Read learning curves for underfitting and overfitting.
  4. 4.Use transfer learning before training from scratch.

Common mistakes

  • Using the test set while tuning
  • Ignoring data augmentation leakage
  • Assuming a lower training loss means better real-world performance

Practice task

Fine-tune a small image classifier and document five misclassified examples by error type.

05.2Embeddings, transformers, and retrieval

Exactly what it is

Embeddings represent meaning as numeric vectors. Transformers use attention to relate parts of a sequence. Retrieval-augmented generation finds relevant source passages and gives them to a language model before it answers.

Why you should learn it

A general language model does not know private or changing company information. Retrieval provides current evidence and allows citations without retraining the model.

Real-world use case

A support assistant searches approved policy documents, answers from the retrieved passages, cites them, and declines when evidence is weak.

Learn in this order

  1. 1.Clean and chunk documents with useful metadata.
  2. 2.Create embeddings and store them in a searchable index.
  3. 3.Retrieve and rerank relevant chunks.
  4. 4.Generate with citations and evaluate retrieval separately from answer quality.

Common mistakes

  • Evaluating only fluent answers
  • Chunks without source metadata
  • Sending sensitive documents to an unapproved external model
RAG control flow
question = "Can I return a sale item?"
passages = retrieve(question, top_k=5)

if not passages or passages[0].score < MIN_SCORE:
    answer = "I could not find a reliable policy answer."
else:
    answer = generate(question, context=passages, require_citations=True)

Output: The system uses evidence when retrieval is strong and gives a safe fallback when it is not.

Practice task

Create 20 answerable and 10 unanswerable questions; measure retrieval hit rate, citation correctness, and refusal quality.

05.3Time series and responsible specialisation

Exactly what it is

Time-series data is ordered and often contains trend, seasonality, changing variance, and external events. Forecasts must be evaluated by moving forward through time.

Why you should learn it

Demand, staffing, inventory, energy, and finance decisions depend on future estimates and their uncertainty.

Real-world use case

A retailer forecasts weekly item demand while accounting for holidays and promotions, then converts uncertainty into safety-stock levels.

Learn in this order

  1. 1.Plot history and define forecast horizon.
  2. 2.Create seasonal-naive and moving-average baselines.
  3. 3.Use rolling backtests with no future information.
  4. 4.Report prediction intervals and error by product segment.

Common mistakes

  • Random train-test splitting
  • Using future rolling values
  • Ignoring stockouts that censor observed demand

Practice task

Forecast eight weeks of demand and compare against last-week and last-year baselines across rolling windows.

05.4Computer vision and transfer learning

Exactly what it is

Convolutional neural networks learn visual patterns from images. Transfer learning reuses a model trained on millions of images and fine-tunes it on your small dataset.

Why you should learn it

Most companies do not have millions of labelled images. Transfer learning gives strong results with hundreds of examples and little compute.

Real-world use case

A factory fine-tunes a pretrained ResNet on 800 photos to detect defective parts on the production line.

Learn in this order

  1. 1.Understand convolutions, pooling, and image tensors.
  2. 2.Load a pretrained model in PyTorch or Keras.
  3. 3.Freeze early layers, replace the final layer, and fine-tune.
  4. 4.Use data augmentation and check errors visually.

Common mistakes

  • Leaking near-duplicate images across train and test
  • No augmentation on tiny datasets
  • Never looking at misclassified images
Fine-tune a pretrained model
import torch.nn as nn
from torchvision import models
model = models.resnet18(weights="DEFAULT")
for p in model.parameters():
    p.requires_grad = False
model.fc = nn.Linear(model.fc.in_features, 2)  # defect / ok

Output: Only the new final layer trains, so good accuracy is reached quickly on a small dataset.

Practice task

Fine-tune an image classifier on a small dataset of your choice and show the ten worst mistakes.

05.5LLM applications, prompt engineering, and evaluation

Exactly what it is

Large language models generate text from instructions. Prompt engineering designs clear instructions and examples. Evaluation measures correctness, safety, and cost with a fixed test set.

Why you should learn it

LLM features are now common in products. Companies need people who can make them reliable, measurable, and affordable.

Real-world use case

A support team uses an LLM to classify tickets and draft replies, measured weekly against 300 labelled tickets before any prompt change ships.

Learn in this order

  1. 1.Write structured prompts: role, task, constraints, output format.
  2. 2.Use few-shot examples and JSON outputs.
  3. 3.Build an evaluation set and track accuracy per version.
  4. 4.Control cost, latency, hallucination, and prompt injection risks.

Common mistakes

  • Judging quality from three hand-picked examples
  • Trusting outputs without validation
  • Putting user text into prompts without injection safeguards
Structured classification prompt
prompt = """Classify the ticket into one category:
billing, bug, account, other.
Return JSON: {"category": "...", "confidence": 0-1}
Ticket: {ticket}"""
# Evaluate on 300 labelled tickets -> accuracy 0.91

Output: A fixed format makes outputs easy to parse and compare between prompt versions.

Practice task

Build an LLM ticket classifier, create a 100-example evaluation set, and compare two prompts.

Phase project

Evidence-grounded document assistant

Build a RAG assistant over a controlled document set with citations, evaluation, and safe refusal behaviour.

Deliverables

  • Document and privacy policy
  • Retrieval and generation pipeline
  • Evaluation set with failure categories
  • Latency, cost, and safety report
Ready to continue when
  • Explain backpropagation without formulas
  • Diagnose overfitting from learning curves
  • Separate retrieval failures from generation failures

Optional further study

Phase 06

6–8 weeks

0 / 6 complete

Production systems and professional practice

Outcome: Package, release, observe, and safely operate a data product with team-ready documentation and rollback plans.

06.1APIs, containers, and release workflow

Exactly what it is

An API gives other software a stable way to request predictions. A container packages code and dependencies. Continuous integration checks changes before release; continuous delivery makes releases repeatable.

Why you should learn it

A notebook on one laptop cannot serve customers reliably. Production needs a defined interface, repeatable environment, tests, versioning, and safe rollout.

Real-world use case

A pricing service accepts product features, validates them, returns a prediction and model version, and records latency without storing sensitive payloads.

Learn in this order

  1. 1.Save preprocessing and model as one versioned artefact.
  2. 2.Define and validate request and response schemas.
  3. 3.Package the service and add health checks.
  4. 4.Release gradually with a previous version ready to restore.

Common mistakes

  • Loading a different preprocessor in production
  • No input limits or schema validation
  • Replacing every instance at once with no rollback
A small prediction contract
class PredictionRequest(BaseModel):
    customer_age_days: int = Field(ge=0)
    orders_30d: int = Field(ge=0)

@app.post("/predict")
def predict(row: PredictionRequest):
    score = model.predict_proba([row.model_dump()])[0, 1]
    return {"risk": float(score), "model_version": MODEL_VERSION}

Output: Invalid negative values are rejected before inference, and every response identifies the model version.

Practice task

Design an API contract including validation, version, timeout behaviour, error response, and health endpoint.

06.2Monitoring, drift, and incident response

Exactly what it is

Monitoring observes service health, input quality, prediction patterns, and delayed outcomes. Drift means production data or relationships changed. An incident process detects, contains, diagnoses, and prevents recurrence.

Why you should learn it

A model can keep returning successful responses while its predictions become harmful. Monitoring must cover correctness and business impact, not only server uptime.

Real-world use case

A bank data feed changes income from monthly to annual values. Range monitoring alerts immediately; the service falls back to rules while the team fixes the pipeline.

Learn in this order

  1. 1.Track latency, errors, volume, and cost.
  2. 2.Validate schema, ranges, missingness, and category changes.
  3. 3.Monitor prediction distribution and outcome metrics by segment.
  4. 4.Define alert owners, severity, fallback, rollback, and post-incident review.

Common mistakes

  • Alerting on every small statistical change
  • Monitoring aggregate accuracy but not vulnerable groups
  • Retraining automatically without approval gates

Practice task

Write a runbook for a 30% rise in missing values, including detection, triage, communication, fallback, and recovery checks.

06.3Reproducibility, security, and collaboration

Exactly what it is

Reproducibility links a result to exact code, data, configuration, and model versions. Security limits data and system access. Documentation preserves assumptions, ownership, intended use, and known risks.

Why you should learn it

Professional data science is team work under legal, ethical, and operational constraints. A result must survive review and ownership changes.

Real-world use case

An insurance model has a model card, training lineage, approval record, access controls, fairness analysis, owner, review date, and retirement plan.

Learn in this order

  1. 1.Track experiments and immutable artefact versions.
  2. 2.Use least-privilege access and a secret manager.
  3. 3.Remove personal data that is not necessary.
  4. 4.Document intended use, exclusions, metrics, limitations, and owners.

Common mistakes

  • Personal data in notebooks or logs
  • No owner after launch
  • A model card that lists metrics but not limitations

Practice task

Create a model card and production-readiness review for your capstone, including security and rollback sections.

06.4CI/CD, testing, and experiment tracking for ML

Exactly what it is

CI/CD automatically tests and deploys code on every change. Experiment tracking with MLflow or Weights & Biases records parameters, data versions, metrics, and model files.

Why you should learn it

Without automation and records, teams cannot reproduce a model, compare experiments, or deploy safely and often.

Real-world use case

Every pull request runs unit tests, data checks, and a quick training job. If the new model beats production on the holdout set, it is registered for review.

Learn in this order

  1. 1.Write tests for data, features, and model behaviour.
  2. 2.Run them with GitHub Actions on each pull request.
  3. 3.Log experiments and register models with MLflow.
  4. 4.Version data with DVC or dated snapshots.

Common mistakes

  • Deploying models trained on a laptop with no record
  • Only testing code, never data
  • Manual deployments that differ each time
Log an experiment
import mlflow
with mlflow.start_run():
    mlflow.log_params({"max_depth": 6, "data_version": "2026-09-01"})
    mlflow.log_metric("pr_auc", 0.47)
    mlflow.sklearn.log_model(model, "model")

Output: Anyone can later find exactly which data and settings produced this model.

Practice task

Add a GitHub Actions workflow to your project that runs tests and trains a small model on every push.

06.5Cloud, scaling, cost, and responsible AI

Exactly what it is

Cloud platforms (AWS, GCP, Azure) provide storage, compute, and managed ML services. Responsible AI covers fairness, privacy, security, and transparency.

Why you should learn it

Production models serve real people at scale. Poor choices waste money or harm users and create legal risk.

Real-world use case

A lending model is audited for approval-rate gaps across groups, personal data is masked, and batch scoring runs nightly on cheap compute instead of an always-on server.

Learn in this order

  1. 1.Learn one cloud: object storage, compute, and a managed ML service.
  2. 2.Choose batch vs real-time serving based on need.
  3. 3.Estimate and monitor cost per prediction.
  4. 4.Check fairness metrics, remove unnecessary personal data, and write a model card.

Common mistakes

  • Real-time APIs where a nightly batch is enough
  • Leaving GPU machines running
  • Storing raw personal data in training logs
Simple fairness check
rates = df.groupby("group")["approved"].mean()
print(rates)
print("ratio:", rates.min() / rates.max())
# ratio below 0.8 -> investigate before launch

Output: A large gap in approval rates triggers a review before the model affects customers.

Practice task

Write a model card for your capstone: purpose, data, metrics, fairness results, limitations, and cost estimate.

Phase project

Production capstone

Turn your strongest model into a tested service with automated checks, monitoring design, documentation, and a live demonstration.

Deliverables

  • Versioned model service and container
  • Automated tests and release checks
  • Monitoring dashboard specification and runbook
  • Model card, architecture diagram, demo, and rollback plan
Ready to continue when
  • Reproduce a result from a clean environment
  • Explain release, monitoring, and rollback clearly
  • Handle invalid input and model failure safely

Optional further study

Production gate

A model is not finished when training ends.

Before real users depend on it, review the whole decision system. Every line below needs an owner and evidence—not only a checked box.

Business

The decision, owner, user, success metric, and cost of errors are documented.

Data

Schema, lineage, consent, freshness, quality rules, and point-in-time correctness are verified.

Model

Baseline, split, metrics, calibration, segment performance, and limitations are recorded.

Service

Input validation, load tests, timeouts, fallback, versioning, and rollback are ready.

Monitoring

Health, quality, drift, outcomes, alert thresholds, and on-call ownership are defined.

Governance

Privacy, access, security review, model card, approval, and retirement plan exist.

Failure handbook

What to do when the real world is messy

These are normal operating conditions, not rare exceptions. Design for them before launch.

The data is late

Do not silently use old data. Measure freshness, stop or label the output, alert the owner, and use an approved fallback.

The schema changes

Validate names, types, ranges, and required fields before processing. Quarantine invalid batches rather than corrupting results.

The target leaks

Rebuild features as they existed at prediction time. Split before learning transformations and audit every feature's availability date.

Classes are imbalanced

Use precision, recall, PR-AUC, calibrated probabilities, threshold tuning, and realistic error costs instead of accuracy alone.

The world changes

Track input, prediction, and outcome drift by segment. Investigate causes before retraining; keep a stable fallback.

Labels arrive late

Monitor proxy signals carefully, store predictions for later evaluation, and define when true outcome performance can be reported.

A service is too slow

Set a latency budget. Profile the full path, then simplify features, cache safe results, batch work, or choose a smaller model.

The model is unfair

Measure errors across relevant groups, investigate data and process causes, involve domain owners, and document mitigations and residual risk.

Career preparation

Turn learning into credible evidence

Employers need to see how you think, validate, communicate, and handle constraints. Make those abilities visible.

01

Build evidence, not clones

Create three projects: one strong analysis, one evaluated model, and one deployed system. Use a real decision, messy data, a baseline, limitations, and measurable results.

02

Write professional documentation

Every project needs a one-sentence problem, data description, method, validation design, result, limitations, setup steps, and a short demo. A reviewer should understand it in two minutes.

03

Use outcome-based resume bullets

Write: action + method + scale + measured result. Example: Built a time-aware churn pipeline on 1.2M events, improving recall at fixed review capacity from 41% to 58%.

04

Prepare project stories

Use: context, decision, constraints, approach, validation, result, failure, and next step. Be ready to explain why you rejected alternatives.

05

Practise the interview mix

Cover SQL, Python, probability, experiments, machine learning, product sense, case studies, and production design. Speak while solving and state assumptions.

06

Apply before you feel finished

After Phase 03, begin applying to analyst and junior data roles. Tailor the first project and resume bullets to the problems in each job description.

Sustainable schedule

A realistic 15-hour week

Consistency matters more than occasional long sessions. If you have less time, keep the order and extend the duration.

Mon–Tue

Learn one concept and reproduce its smallest example.

Wed–Thu

Solve exercises, inspect mistakes, and write short notes.

Friday

Review the week and explain the topic without notes.

Saturday

Build the current phase project for three focused hours.

Sunday

Rest or review; plan the next week and commit your work.