测验Chapter quizzes
Test what stuck from each chapter of Classical Data Science. Every answer comes with an explanation and a link back to the section. Scores stay in your browser.
History & Landscape
Tests the three eras of AI, the nesting of AI, ML and deep learning, the roles around a project, when classical ML beats deep learning, and the first pandas procedures the rest of the book relies on.
Business Problem Framing
Tests turning a vague business ask into a precise ML problem statement: stakeholders and goal statements, labels, units, horizons and leakage, business success metrics, cost-based thresholds, and choosing the problem type.
Math Foundations: Statistics, Probability & Linear Algebra
Tests whether you can apply the chapter's maths by hand. Bayes posteriors, distribution probabilities, z-scores, correlation, t-statistics and effect sizes, matrix products and inverses, and the normal equations on tiny datasets.
Math Foundations: Calculus & Optimisation
Tests whether you can do the maths of training by hand. Derivatives and gradients, gradient descent steps, learning-rate limits, the chain rule through a tiny network, loss values, mini-batch counts, and momentum and Adam updates.
Information Theory Basics
Tests whether you can compute entropy, cross-entropy, KL divergence, mutual information and information gain by hand, in bits and nats, and spot the traps around zeros, clipping and asymmetry.
Python Data Science Ecosystem
Tests whether you can pick the right layer of the stack and predict what NumPy, pandas and scikit-learn code does, including broadcasting, NaN handling and leakage traps.
Data Cleaning & Wrangling
Tests whether you can diagnose and treat missing values, outliers, duplicates, wrong types, encoding errors and messy categories, and predict what the pandas cleaning code does.
SQL for Data Science
Tests analytical SQL: grouping and HAVING, CTEs, window functions and their frames, joins that silently change row counts, and keeping queries cheap at warehouse scale. Most answers were checked by running the query in DuckDB.
Exploratory Data Analysis & Visualisation
Tests whether you can read a distribution, pick the right chart, interpret correlations without over-reading them, and spot confounding and data snooping before they reach a model.
The Data Science Lifecycle
Tests whether you can tell which lifecycle stage a project is really in, spot how it is failing, and judge when it may move on or must loop back.
Supervised Learning: Overview of Approaches
Tests the bias-variance trade-off and the inductive bias of each major algorithm family: linear models, SVMs, trees, KNN and Naive Bayes. Includes hand calculations and customer scenarios on choosing a first model.
Ensemble Methods
Tests why combining models works: bagging and Random Forests for variance, boosting for bias, and stacking with out-of-fold predictions. Includes hand calculations of correlated-average variance, bootstrap coverage, majority votes and gradient-boosting updates.
Cross-Validation & Model Selection
Tests how to get an honest performance estimate: fold arithmetic, stratification, time-ordered and grouped splits, leakage through preprocessing, nested CV and fair model comparison.
Feature Engineering
Tests scaling, skew transforms, polynomial and binned features, categorical and target encoding, cyclical datetime features and keeping every fitted step leakage-safe, mostly by computing the values by hand.
Feature Selection & Dimensionality Reduction
Tests why extra columns hurt, how filter, wrapper and embedded selection differ, how to read PCA eigenvalues and loadings, and when t-SNE and UMAP are the wrong tool.
Model Evaluation
Tests computing and choosing metrics from confusion matrices, thresholds, ranked scores, probabilities and regression errors, and spotting when a good-looking number misleads.
Hyperparameter Optimisation
Tests how to define search spaces, what grid, random and Bayesian search cost and when each fits, and why a tuned validation score needs an untouched test set.
Regularisation
Tests how to read learning curves, compute and compare L1, L2 and Elastic Net penalties, set alpha and C in the right direction, and use dropout and early stopping correctly.
Unsupervised Learning
Tests K-Means by hand, choosing K, silhouette, GMM soft assignment, DBSCAN point types, linkage and dendrograms, and Isolation Forest's contamination rate.
Time Series Analysis
Tests leakage-free splits and lag features, stationarity and differencing, ACF/PACF order selection, ARIMA, exponential smoothing by hand, and forecast baselines and error metrics.