🌍 Data Science · subject
Data Science Machine Learning Syllabus
The Machine Learning syllabus for Data Science in full: 11 chapters, 29 topics and 105 sub-topics, every one listed below, plus 56 Machine Learning flashcards with answers.
Machine Learning syllabus: all 11 chapters
Expand any chapter to see its topics and sub-topics.
-
Introduction to Machine Learning
2 topics- Overview of Machine Learning
- Definition of Machine Learning
- Types of Machine Learning
- Applications of Machine Learning
- History of Machine Learning
- Basic Concepts
- Supervised Learning
- Unsupervised Learning
- Reinforcement Learning
- Semi-Supervised Learning
- Overview of Machine Learning
-
Mathematics for Machine Learning
4 topics- Linear Algebra
- Vectors and Matrices
- Matrix Operations
- Eigenvalues and Eigenvectors
- Singular Value Decomposition
- Calculus
- Differentiation
- Integration
- Partial Derivatives
- Gradient Descent
- Probability and Statistics
- Probability Theory
- Random Variables
- Distributions
- Bayesian Statistics
- Linear Regression
- Simple Linear Regression
- Multiple Linear Regression
- Assumptions of Linear Regression
- Regularization Techniques
- Linear Algebra
-
Data Preprocessing
3 topics- Data Cleaning
- Handling Missing Values
- Handling Outliers
- Data Imputation
- Feature Engineering
- Feature Selection
- Feature Extraction
- Feature Scaling
- Data Transformation
- Normalization
- Standardization
- Encoding Categorical Variables
- Data Cleaning
-
Supervised Learning
2 topics- Classification
- Logistic Regression
- K-Nearest Neighbors
- Support Vector Machines
- Decision Trees
- Random Forests
- Gradient Boosting Machines
- Naive Bayes
- Regression
- Linear Regression
- Polynomial Regression
- Ridge Regression
- Lasso Regression
- Elastic Net
- Classification
-
Unsupervised Learning
3 topics- Clustering
- K-Means Clustering
- Hierarchical Clustering
- DBSCAN
- Gaussian Mixture Models
- Dimensionality Reduction
- Principal Component Analysis
- t-Distributed Stochastic Neighbor Embedding
- Linear Discriminant Analysis
- Independent Component Analysis
- Association Rule Learning
- Apriori Algorithm
- Eclat Algorithm
- Clustering
-
Reinforcement Learning
2 topics- Basics of Reinforcement Learning
- Markov Decision Processes
- Policy Learning
- Value Learning
- Advanced sub-topics
- Q-Learning
- Deep Q-Networks
- Policy Gradient Methods
- Basics of Reinforcement Learning
-
Model Evaluation and Optimization
2 topics- Model Evaluation
- Confusion Matrix
- Precision, Recall, and F1 Score
- ROC and AUC
- Cross-Validation
- Model Optimization
- Hyperparameter Tuning
- Grid Search
- Random Search
- Bayesian Optimization
- Model Evaluation
-
Deep Learning
4 topics- Neural Networks
- Perceptrons
- Feedforward Neural Networks
- Activation Functions
- Backpropagation
- Convolutional Neural Networks
- Convolutional Layers
- Pooling Layers
- Architectures (e.g., AlexNet, VGG, ResNet)
- Recurrent Neural Networks
- Vanilla RNNs
- Long Short-Term Memory (LSTM)
- Gated Recurrent Units (GRU)
- Advanced sub-topics in Deep Learning
- Generative Adversarial Networks (GANs)
- Autoencoders
- Transfer Learning
- Neural Networks
-
Natural Language Processing
3 topics- Text Preprocessing
- Tokenization
- Stemming and Lemmatization
- Stop Words Removal
- Text Representation
- Bag of Words
- TF-IDF
- Word Embeddings (Word2Vec, GloVe)
- NLP Tasks
- Text Classification
- Sentiment Analysis
- Named Entity Recognition
- Machine Translation
- Text Preprocessing
-
Time Series Analysis
2 topics- Basics of Time Series
- Time Series Components
- Stationarity
- Autocorrelation
- Time Series Models
- ARIMA
- SARIMA
- Exponential Smoothing
- Prophet
- Basics of Time Series
-
Deployment and Production
2 topics- Model Deployment
- Saving and Loading Models
- APIs for Model Serving
- Cloud Services (AWS, GCP, Azure)
- Monitoring and Maintenance
- Model Performance Monitoring
- A/B Testing
- Retraining Models
- Model Deployment
Data Science Machine Learning flashcards — 56 questions with answers
What is Machine Learning?
A subfield of artificial intelligence in which systems learn patterns from data to make predictions or decisions without being explicitly programmed for the task. Formally (Tom Mitchell): a program learns from experience $E$ with respect to task $T$ and performance measure $P$ if its performance at $T$, measured by $P$, improves with $E$.
What are the three main types of machine learning?
Supervised learning (labeled data, learns input-to-output mapping), unsupervised learning (unlabeled data, finds structure/patterns), and reinforcement learning (an agent learns via rewards from interacting with an environment).
What is the difference between supervised classification and regression?
Both are supervised. Classification predicts a discrete categorical label (e.g., spam/not-spam), while regression predicts a continuous numerical value (e.g., house price).
Define the bias-variance tradeoff.
Expected test error decomposes as $\text{Error} = \text{Bias}^{2} + \text{Variance} + \sigma^{2}$. High bias (underfitting) means the model is too simple; high variance (overfitting) means it is too sensitive to training data. Reducing one tends to increase the other.
What is overfitting and how is it typically detected?
Overfitting occurs when a model learns noise/specifics of the training data, giving low training error but high test error. It is detected when training performance is much better than validation/test performance.
What is the difference between a parameter and a hyperparameter?
A parameter is learned from data during training (e.g., weights $w$). A hyperparameter is set before training and controls the learning process (e.g., learning rate $\alpha$, number of trees, regularization strength $\lambda$).
What is a dot product of two vectors $\vec{a}$ and $\vec{b}$, and what does it equal geometrically?
$\vec{a} \cdot \vec{b} = \sum_{i=1}^{n} a_i b_i = \lVert \vec{a} \rVert \, \lVert \vec{b} \rVert \cos\theta$, where $\theta$ is the angle between them. It is zero when the vectors are orthogonal.
What does it mean for a matrix to be invertible, and what is the condition involving its determinant?
A square matrix $A$ is invertible (non-singular) if there exists $A^{-1}$ such that $AA^{-1} = I$. This holds if and only if $\det(A) \neq 0$.
What are eigenvalues and eigenvectors of a matrix $A$?
A nonzero vector $\vec{v}$ is an eigenvector of $A$ with eigenvalue $\lambda$ if $A\vec{v} = \lambda \vec{v}$. They describe directions that are only scaled (not rotated) by the linear transformation.
Define the $L_1$ and $L_2$ norms of a vector $\vec{x}$.
$L_1$ norm: $\lVert \vec{x} \rVert_1 = \sum_{i=1}^{n} |x_i|$ (Manhattan). $L_2$ norm: $\lVert \vec{x} \rVert_2 = \sqrt{\sum_{i=1}^{n} x_i^{2}}$ (Euclidean).
What is the derivative used for in machine learning optimization?
The derivative (gradient) gives the slope/direction of steepest increase of a function. Gradient descent moves in the opposite direction of the gradient to minimize a loss function.
What is the gradient of a multivariable function $f(x_1, \dots, x_n)$?
$\nabla f = \left( \frac{\partial f}{\partial x_1}, \frac{\partial f}{\partial x_2}, \dots, \frac{\partial f}{\partial x_n} \right)$ — the vector of partial derivatives, pointing in the direction of steepest ascent.
State the chain rule for the composition $f(g(x))$.
$\frac{d}{dx} f(g(x)) = f'(g(x)) \cdot g'(x)$. It is the foundation of backpropagation in neural networks.
What is the gradient descent parameter update rule?
$\theta := \theta - \alpha \nabla_{\theta} J(\theta)$, where $\alpha$ is the learning rate and $J(\theta)$ is the cost function. The parameters are moved opposite to the gradient to reduce the cost.
State Bayes' theorem.
$P(A \mid B) = \dfrac{P(B \mid A)\,P(A)}{P(B)}$, where $P(A)$ is the prior, $P(B \mid A)$ the likelihood, and $P(A \mid B)$ the posterior.
Define expected value (mean) and variance of a random variable $X$.
Mean: $\mu = E[X] = \sum_i x_i P(x_i)$ (or $\int x f(x)\,dx$). Variance: $\sigma^{2} = E[(X - \mu)^{2}] = E[X^{2}] - (E[X])^{2}$.
What is the probability density function of a normal (Gaussian) distribution?
$f(x) = \dfrac{1}{\sigma \sqrt{2\pi}} \, e^{-\frac{(x - \mu)^{2}}{2\sigma^{2}}}$, parameterized by mean $\mu$ and standard deviation $\sigma$.
What is the difference between covariance and correlation?
Covariance $\text{Cov}(X,Y) = E[(X-\mu_X)(Y-\mu_Y)]$ measures joint variability in original units. Correlation $\rho = \dfrac{\text{Cov}(X,Y)}{\sigma_X \sigma_Y}$ is the normalized, unitless version bounded in $[-1, 1]$.
What does a p-value represent in hypothesis testing?
The probability of observing a result at least as extreme as the one obtained, assuming the null hypothesis $H_0$ is true. A small p-value (e.g., $< 0.05$) leads to rejecting $H_0$.
What is the hypothesis (model) equation for simple linear regression?
$\hat{y} = \beta_0 + \beta_1 x$, where $\beta_0$ is the intercept and $\beta_1$ is the slope. For multiple features: $\hat{y} = \beta_0 + \sum_{j=1}^{p} \beta_j x_j$.
Show the other 36 Machine Learning flashcards
What cost function does linear regression minimize, and what is its formula?
Mean Squared Error (MSE): $J(\beta) = \dfrac{1}{n} \sum_{i=1}^{n} (y_i - \hat{y}_i)^{2}$. Ordinary Least Squares finds the coefficients that minimize this.
What is the closed-form normal equation solution for linear regression?
$\hat{\beta} = (X^{T} X)^{-1} X^{T} y$, which directly computes the coefficients minimizing the sum of squared errors without iteration.
What does the coefficient of determination $R^{2}$ measure?
The proportion of variance in the target explained by the model: $R^{2} = 1 - \dfrac{\sum (y_i - \hat{y}_i)^{2}}{\sum (y_i - \bar{y})^{2}}$. It ranges from $-\infty$ to $1$, where $1$ is a perfect fit.
What are the key assumptions of linear regression?
Linearity (relationship is linear), independence of errors, homoscedasticity (constant error variance), normality of residuals, and little or no multicollinearity among predictors.
What are common strategies for handling missing data?
Deletion (drop rows/columns), imputation (fill with mean/median/mode), model-based imputation (e.g., KNN or regression), or using a missingness indicator flag. The choice depends on the missingness mechanism (MCAR, MAR, MNAR).
What is the difference between an outlier and an anomaly, and name a method to detect outliers.
An outlier is a data point far from the rest of the distribution; an anomaly often implies a meaningful/rare event. Detection methods include the IQR rule (outside $[Q_1 - 1.5\,\text{IQR},\, Q_3 + 1.5\,\text{IQR}]$), z-scores ($|z| > 3$), and isolation forests.
What is the z-score standardization formula and what does it achieve?
$z = \dfrac{x - \mu}{\sigma}$. It rescales a feature to have mean $0$ and standard deviation $1$, making features comparable and helping gradient-based and distance-based algorithms.
What is min-max normalization?
$x' = \dfrac{x - x_{\min}}{x_{\max} - x_{\min}}$, which rescales features to a fixed range, typically $[0, 1]$.
What is feature engineering?
The process of creating, transforming, or selecting input variables (features) from raw data to improve model performance — e.g., creating interaction terms, binning, polynomial features, or domain-derived ratios.
What is one-hot encoding and when is it used?
A technique to convert a categorical variable with $k$ categories into $k$ binary (0/1) columns, used so that nominal categories (no inherent order) can be fed to numerical models without implying ordinal relationships.
What is the difference between feature selection and feature extraction?
Feature selection chooses a subset of the original features (e.g., via filter/wrapper/embedded methods). Feature extraction creates new features by transforming/combining originals (e.g., PCA), changing the feature space.
Why apply a log transformation to a feature?
To reduce right skewness, compress large ranges, stabilize variance, and make multiplicative relationships additive. Useful for heavy-tailed variables like income or counts.
What is the logistic regression model and its output?
It models the probability of a binary class using the sigmoid: $\hat{p} = \sigma(z) = \dfrac{1}{1 + e^{-z}}$ where $z = \beta_0 + \sum_j \beta_j x_j$. Output is a probability in $(0,1)$, thresholded (e.g., at $0.5$) for classification.
What loss function does logistic regression minimize?
Binary cross-entropy (log loss): $J = -\dfrac{1}{n} \sum_{i=1}^{n} \left[ y_i \log \hat{p}_i + (1 - y_i) \log(1 - \hat{p}_i) \right]$.
How does the k-Nearest Neighbors (k-NN) algorithm classify a point?
It finds the $k$ closest training points (by a distance metric like Euclidean) and assigns the majority class among them. It is a lazy, non-parametric, instance-based learner.
What is the core idea of a Support Vector Machine (SVM)?
It finds the hyperplane that maximizes the margin (distance) between classes. The closest points are support vectors. The kernel trick allows nonlinear separation by implicitly mapping to higher dimensions.
What classification assumption does the Naive Bayes classifier make?
It assumes all features are conditionally independent given the class label. Prediction: $\hat{y} = \arg\max_c P(c) \prod_{j} P(x_j \mid c)$.
How does a decision tree decide where to split, and name a common impurity measure.
It selects splits that maximize purity gain. Common impurity measures: Gini impurity $G = 1 - \sum_{i} p_i^{2}$ and entropy $H = -\sum_{i} p_i \log_2 p_i$; the split maximizing information gain (entropy reduction) or Gini decrease is chosen.
What is the difference between bagging and boosting?
Bagging trains models in parallel on bootstrap samples and averages them to reduce variance (e.g., Random Forest). Boosting trains models sequentially, each correcting the errors of the previous, to reduce bias (e.g., AdaBoost, Gradient Boosting).
What is a Random Forest?
An ensemble of decision trees trained on bootstrap samples (bagging) with random feature subsets at each split. Predictions aggregate via majority vote (classification) or averaging (regression), reducing overfitting/variance.
Describe the k-means clustering algorithm.
1) Choose $k$ and initialize $k$ centroids. 2) Assign each point to the nearest centroid. 3) Recompute each centroid as the mean of its assigned points. 4) Repeat steps 2-3 until convergence. It minimizes within-cluster sum of squares (inertia).
What is the elbow method used for in clustering?
To choose the number of clusters $k$ by plotting within-cluster sum of squares (inertia) against $k$ and selecting the 'elbow' point where adding more clusters yields diminishing reductions.
How does DBSCAN differ from k-means?
DBSCAN is density-based: it groups densely connected points (parameters $\varepsilon$ and minPts), can find arbitrarily shaped clusters, marks low-density points as noise, and does not require specifying the number of clusters. k-means requires $k$ and assumes spherical clusters.
What is the goal of dimensionality reduction?
To reduce the number of features while retaining as much relevant information as possible — combating the curse of dimensionality, reducing computation, removing redundancy/noise, and aiding visualization.
What does Principal Component Analysis (PCA) do?
PCA finds orthogonal axes (principal components) that capture maximum variance, given by the eigenvectors of the covariance matrix. It projects data onto the top components, reducing dimensionality while preserving variance.
What is the curse of dimensionality?
As the number of features grows, data becomes sparse, distances between points become less meaningful, and the data needed to generalize grows exponentially — degrading distance-based and density-based methods.
What does association rule learning find, and define support and confidence.
It finds frequent co-occurrence rules $X \Rightarrow Y$ (e.g., market basket analysis). Support: $\text{supp}(X) = \dfrac{\text{transactions containing } X}{\text{total transactions}}$. Confidence: $\text{conf}(X \Rightarrow Y) = \dfrac{\text{supp}(X \cup Y)}{\text{supp}(X)}$.
What is lift in association rule learning and how is it interpreted?
$\text{lift}(X \Rightarrow Y) = \dfrac{\text{conf}(X \Rightarrow Y)}{\text{supp}(Y)}$. Lift $> 1$ means $X$ and $Y$ are positively associated, $= 1$ means independent, $< 1$ means negatively associated.
In reinforcement learning, what are the key components of a Markov Decision Process (MDP)?
States $S$, actions $A$, transition probabilities $P(s' \mid s, a)$, reward function $R(s, a)$, and a discount factor $\gamma \in [0, 1]$. The agent seeks a policy $\pi$ maximizing expected cumulative discounted reward.
What is the Q-learning update rule?
$Q(s, a) \leftarrow Q(s, a) + \alpha \left[ r + \gamma \max_{a'} Q(s', a') - Q(s, a) \right]$, where $\alpha$ is the learning rate, $\gamma$ the discount factor, and $r$ the observed reward.
What is the precision and recall of a classifier?
Precision $= \dfrac{TP}{TP + FP}$ (of predicted positives, how many are correct). Recall $= \dfrac{TP}{TP + FN}$ (of actual positives, how many were found). The $F_1$ score is their harmonic mean: $F_1 = 2 \cdot \dfrac{\text{precision} \cdot \text{recall}}{\text{precision} + \text{recall}}$.
What does ROC-AUC measure?
The ROC curve plots true positive rate vs. false positive rate across thresholds; AUC (area under it) measures overall ranking ability. AUC $= 1$ is perfect, $= 0.5$ is random guessing.
What is k-fold cross-validation?
The data is split into $k$ equal folds; the model is trained on $k-1$ folds and validated on the held-out fold, repeated $k$ times so each fold serves once as validation. Results are averaged, giving a robust performance estimate and reducing dependence on a single split.
What is the difference between L1 (Lasso) and L2 (Ridge) regularization?
L1 adds $\lambda \sum_j |\beta_j|$ to the loss, driving some coefficients to exactly zero (feature selection/sparsity). L2 adds $\lambda \sum_j \beta_j^{2}$, shrinking coefficients smoothly toward zero without eliminating them.
How do batch, stochastic, and mini-batch gradient descent differ?
Batch GD uses the entire dataset per update (stable, slow). Stochastic GD (SGD) uses one sample per update (fast, noisy). Mini-batch GD uses a small subset per update, balancing stability and speed — the most common in practice.
Why is the learning rate $\alpha$ important in gradient descent?
It controls the step size of updates. Too large $\alpha$ can overshoot or diverge; too small $\alpha$ makes convergence very slow. It is a key hyperparameter often tuned or scheduled (decayed) over training.
Data Science Machine Learning FAQ
What is in the Data Science Machine Learning syllabus?
Data Science Machine Learning is split into 11 chapters: Introduction to Machine Learning, Mathematics for Machine Learning, Data Preprocessing, Supervised Learning, Unsupervised Learning, Reinforcement Learning, Model Evaluation and Optimization, Deep Learning, Natural Language Processing, Time Series Analysis and Deployment and Production. Together they contain 29 topics and 105 sub-topics.
How many chapters are in Data Science Machine Learning?
11 chapters, containing 29 topics and 105 sub-topics. The largest chapter is Mathematics for Machine Learning, with 4 topics.
Are there flashcards for Data Science Machine Learning?
Yes — a 56-card Machine Learning deck, printed in full in the flashcards section of this page and available in the Examius app with spaced repetition. The free plan covers one exam of your choice, including its flashcards; Examius Pro, a one-time purchase, unlocks every other exam and deck.