๐ŸŒ Machine Learning ยท subject

Machine Learning Core Concepts Syllabus

The Core Concepts syllabus for Machine Learning in full: 5 chapters, 12 topics and 45 sub-topics, every one listed below, plus 51 Core Concepts flashcards with answers.

5Chapters
12Topics
45Sub-topics
51Flashcards

Core Concepts syllabus: all 5 chapters

Expand any chapter to see its topics and sub-topics.

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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

Machine Learning Core Concepts flashcards โ€” 51 questions with answers

  1. What is data cleaning in a machine learning pipeline?

    Data cleaning is the process of detecting and correcting (or removing) corrupt, inaccurate, incomplete, or irrelevant records from a dataset โ€” handling missing values, duplicates, outliers, and inconsistent formatting โ€” so the data is reliable for modeling.

  2. Name three common strategies for handling missing values in a dataset.

    (1) Deletion โ€” drop rows or columns with missing data; (2) Imputation โ€” fill with a statistic such as the mean, median, or mode; (3) Model-based imputation โ€” predict the missing value using algorithms like KNN or regression.

  3. How is the Interquartile Range (IQR) used to detect outliers?

    Compute $IQR = Q_3 - Q_1$. A value is flagged as an outlier if it lies below $Q_1 - 1.5 \cdot IQR$ or above $Q_3 + 1.5 \cdot IQR$.

  4. What is feature engineering?

    Feature engineering is the process of using domain knowledge to create, transform, or select input variables (features) that make machine learning algorithms work better โ€” improving model accuracy by exposing the underlying structure of the data.

  5. What is the difference between feature selection and feature extraction?

    Feature selection chooses a subset of the existing original features (e.g., filter, wrapper, embedded methods). Feature extraction creates new features by combining or transforming the originals (e.g., PCA), producing a new, usually lower-dimensional, representation.

  6. Compare one-hot encoding and label encoding for categorical variables.

    Label encoding assigns each category an integer (introduces an artificial ordinal relationship, suited to ordinal data or tree models). One-hot encoding creates a binary indicator column per category (no false ordering, but increases dimensionality), suited to nominal data and linear models.

  7. State the formula for min-max normalization (feature scaling to $[0,1]$).

    $$x' = \frac{x - x_{\min}}{x_{\max} - x_{\min}}$$

  8. State the formula for standardization (z-score normalization) and what it produces.

    $$z = \frac{x - \mu}{\sigma}$$ It rescales a feature to have mean $\mu = 0$ and standard deviation $\sigma = 1$.

  9. Why might you apply a log transformation to a feature?

    A log transformation, e.g. $x' = \log(x)$, compresses large values and reduces right-skew, making a heavily skewed distribution more symmetric (closer to normal) and stabilizing variance, which helps models that assume normality or are sensitive to scale.

  10. What is the difference between supervised and unsupervised learning?

    Supervised learning trains on labeled data (input-output pairs) to predict a target โ€” e.g., classification and regression. Unsupervised learning finds structure in unlabeled data without target outputs โ€” e.g., clustering, dimensionality reduction, and association rule learning.

  11. Define classification in machine learning.

    Classification is a supervised learning task that predicts a discrete categorical label (class) for an input โ€” e.g., spam vs. not-spam. The model learns a decision boundary separating classes.

  12. What is the logistic (sigmoid) function used in logistic regression, and what is its output range?

    $$\sigma(z) = \frac{1}{1 + e^{-z}}$$ Its output lies in $(0,1)$ and is interpreted as a probability of the positive class.

  13. Write the binary cross-entropy (log loss) used to train a classifier.

    $$L = -\frac{1}{N}\sum_{i=1}^{N}\left[ y_i \log(\hat{y}_i) + (1 - y_i)\log(1 - \hat{y}_i) \right]$$ where $y_i$ is the true label and $\hat{y}_i$ the predicted probability.

  14. How does the k-Nearest Neighbors (KNN) algorithm classify a new point?

    It finds the $k$ training points closest to the query (by a distance metric such as Euclidean), then assigns the majority class among those $k$ neighbors. It is a lazy, instance-based, non-parametric method.

  15. What is the core idea behind a Support Vector Machine (SVM)?

    An SVM finds the hyperplane that maximizes the margin โ€” the distance between the decision boundary and the nearest data points (support vectors) of each class โ€” giving the most robust separation. The kernel trick lets it separate non-linearly separable data.

  16. What does the kernel trick allow an SVM to do?

    The kernel trick computes inner products in a high-dimensional feature space without explicitly mapping the data there, e.g. via the RBF kernel $K(x,x') = \exp(-\gamma \lVert x - x' \rVert^2)$, enabling non-linear decision boundaries efficiently.

  17. Define precision and recall.

    $$\text{Precision} = \frac{TP}{TP + FP}, \qquad \text{Recall} = \frac{TP}{TP + FN}$$ Precision is the fraction of predicted positives that are correct; recall is the fraction of actual positives correctly identified.

  18. Write the formula for the $F_1$ score and explain why it is used.

    $$F_1 = 2 \cdot \frac{\text{Precision} \cdot \text{Recall}}{\text{Precision} + \text{Recall}}$$ It is the harmonic mean of precision and recall, balancing the two โ€” useful for imbalanced classes where accuracy is misleading.

  19. What is a confusion matrix?

    A table comparing predicted vs. actual classes. For binary classification it has four cells: True Positives (TP), False Positives (FP), True Negatives (TN), and False Negatives (FN), from which accuracy, precision, recall, and other metrics are computed.

  20. What do the ROC curve and AUC measure?

    The ROC curve plots True Positive Rate against False Positive Rate across classification thresholds. AUC (Area Under the Curve) summarizes it: $AUC = 0.5$ is random guessing, $AUC = 1.0$ is a perfect classifier โ€” it measures ranking/separability independent of threshold.

Show the other 31 Core Concepts flashcards
  1. Define regression in machine learning.

    Regression is a supervised learning task that predicts a continuous numeric output (e.g., price, temperature) from input features, by modeling the relationship between inputs and a real-valued target.

  2. Write the simple linear regression model equation.

    $$\hat{y} = \beta_0 + \beta_1 x$$ where $\beta_0$ is the intercept and $\beta_1$ is the slope (coefficient) of the feature $x$.

  3. What cost function does ordinary linear regression minimize?

    Mean Squared Error (the sum of squared residuals): $$MSE = \frac{1}{N}\sum_{i=1}^{N}(y_i - \hat{y}_i)^2$$

  4. What does the coefficient of determination $R^2$ represent?

    $$R^2 = 1 - \frac{\sum_i (y_i - \hat{y}_i)^2}{\sum_i (y_i - \bar{y})^2}$$ It is the proportion of variance in the target explained by the model; $R^2 = 1$ is a perfect fit, $R^2 = 0$ means no better than predicting the mean.

  5. Compare Ridge (L2) and Lasso (L1) regularization.

    Ridge adds a penalty $\lambda \sum_j \beta_j^2$, shrinking coefficients toward zero but rarely to exactly zero. Lasso adds $\lambda \sum_j |\beta_j|$, which can drive some coefficients to exactly zero, performing automatic feature selection.

  6. What is the gradient descent update rule for a parameter $\theta$?

    $$\theta := \theta - \alpha \frac{\partial J(\theta)}{\partial \theta}$$ where $\alpha$ is the learning rate and $J(\theta)$ is the cost function. It iteratively moves parameters in the direction of steepest descent.

  7. What is the difference between batch, stochastic, and mini-batch gradient descent?

    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 speed and stability โ€” the most common in practice.

  8. Define clustering and name two main approaches.

    Clustering is unsupervised grouping of data points so that points within a group are more similar to each other than to points in other groups. Two main approaches: partitional (e.g., k-means) and hierarchical (agglomerative/divisive).

  9. Describe the k-means clustering algorithm steps.

    (1) Choose $k$ and initialize $k$ centroids; (2) assign each point to its nearest centroid; (3) recompute each centroid as the mean of its assigned points; (4) repeat steps 2-3 until assignments no longer change (convergence). It minimizes within-cluster sum of squares.

  10. What objective (inertia) does k-means minimize?

    Within-cluster sum of squares (WCSS): $$J = \sum_{i=1}^{k}\sum_{x \in C_i} \lVert x - \mu_i \rVert^2$$ where $\mu_i$ is the centroid of cluster $C_i$.

  11. What is the elbow method for choosing $k$ in k-means?

    Plot the within-cluster sum of squares (inertia) against the number of clusters $k$. The 'elbow' โ€” the point where adding more clusters yields diminishing reduction in inertia โ€” suggests a good value of $k$.

  12. How does DBSCAN differ from k-means?

    DBSCAN is density-based: it groups densely packed points (using parameters $\varepsilon$ and minPts) and labels sparse points as noise. Unlike k-means, it does not require specifying the number of clusters, finds arbitrarily shaped clusters, and handles outliers.

  13. What does the silhouette coefficient measure and what is its range?

    It measures how well a point fits its own cluster vs. the nearest other cluster: $$s = \frac{b - a}{\max(a, b)}$$ where $a$ is mean intra-cluster distance and $b$ is mean nearest-cluster distance. It ranges from $-1$ (poor) to $+1$ (well-clustered).

  14. What is dimensionality reduction and why is it useful?

    It reduces the number of input features while preserving as much meaningful information as possible. Benefits: combats the curse of dimensionality, reduces overfitting and computation, removes redundancy, and enables visualization (2D/3D).

  15. What is the curse of dimensionality?

    As the number of features grows, the volume of the feature space increases exponentially, so data becomes sparse. Distances between points become less meaningful, and models need exponentially more data to generalize, degrading performance.

  16. What does Principal Component Analysis (PCA) do?

    PCA finds new orthogonal axes (principal components) that are linear combinations of the original features, ordered by the variance they capture. Projecting onto the top components reduces dimensionality while retaining maximal variance.

  17. How are principal components related to the covariance matrix in PCA?

    The principal components are the eigenvectors of the data's covariance matrix, and the amount of variance each captures equals its corresponding eigenvalue $\lambda_i$. Components are ranked by descending eigenvalue.

  18. How is the proportion of variance explained by the first $m$ principal components computed?

    $$\text{Explained variance ratio} = \frac{\sum_{i=1}^{m} \lambda_i}{\sum_{j=1}^{d} \lambda_j}$$ where $\lambda_i$ are the eigenvalues (component variances) and $d$ is the total number of components.

  19. What is t-SNE primarily used for, and how does it differ from PCA?

    t-SNE (t-Distributed Stochastic Neighbor Embedding) is a non-linear technique for visualizing high-dimensional data in 2D/3D by preserving local neighborhood structure. Unlike PCA (linear, variance-preserving), t-SNE focuses on local similarity and is mainly for visualization, not feature transformation.

  20. What is association rule learning?

    An unsupervised method for discovering interesting relationships (rules of the form $X \Rightarrow Y$) between items in large transactional datasets โ€” classically used for market basket analysis to find items frequently bought together.

  21. Define support, confidence, and lift for an association rule $X \Rightarrow Y$.

    Support $= P(X \cap Y)$ (frequency of the itemset). Confidence $= P(Y \mid X) = \frac{P(X \cap Y)}{P(X)}$ (reliability). Lift $= \frac{P(X \cap Y)}{P(X)P(Y)}$ โ€” lift $> 1$ means positive correlation, $= 1$ independence, $< 1$ negative.

  22. What principle does the Apriori algorithm rely on?

    The Apriori (anti-monotone) principle: if an itemset is frequent, all of its subsets are also frequent; equivalently, if an itemset is infrequent, all of its supersets are infrequent. This prunes the search space when mining frequent itemsets.

  23. What are the core components of a reinforcement learning problem?

    An agent interacting with an environment via: states $s$, actions $a$, a reward signal $r$, a policy $\pi$ (mapping states to actions), and (often) a value function. The goal is to learn a policy maximizing cumulative reward.

  24. Write the formula for the discounted cumulative return $G_t$ in reinforcement learning.

    $$G_t = \sum_{k=0}^{\infty} \gamma^k r_{t+k+1}$$ where $\gamma \in [0,1]$ is the discount factor that weights future rewards less than immediate ones.

  25. Explain the exploration-exploitation trade-off in reinforcement learning.

    Exploitation chooses actions known to yield high reward; exploration tries new actions to discover potentially better ones. An agent must balance both โ€” e.g., via an $\varepsilon$-greedy policy โ€” to avoid settling on a suboptimal policy.

  26. State 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 and $\gamma$ the discount factor. It is an off-policy, model-free method.

  27. What is the difference between bias and variance, and what is the bias-variance trade-off?

    Bias is error from overly simplistic assumptions (underfitting); variance is error from sensitivity to training-data fluctuations (overfitting). The trade-off: decreasing one tends to increase the other, and total expected error decomposes as $\text{Bias}^2 + \text{Variance} + \text{Irreducible error}$.

  28. 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 remaining fold, repeating $k$ times so each fold serves once as validation. The performance is averaged, giving a more robust, less variance-prone estimate of generalization.

  29. Distinguish overfitting from underfitting and give one remedy for each.

    Overfitting: model fits training noise, low train error but high test error โ€” remedy: regularization, more data, or simpler model. Underfitting: model too simple to capture the pattern, high error everywhere โ€” remedy: a more complex model or better features.

  30. Compare bagging and boosting as ensemble methods.

    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 previous one's errors by reweighting, reducing bias (e.g., AdaBoost, Gradient Boosting / XGBoost).

  31. What is the difference between grid search and random search for hyperparameter optimization?

    Grid search exhaustively evaluates every combination in a predefined discrete grid of hyperparameter values. Random search samples combinations randomly from the search space โ€” often more efficient at finding good values when only a few hyperparameters matter, for the same compute budget.

Machine Learning Core Concepts FAQ

What is in the Machine Learning Core Concepts syllabus?

Machine Learning Core Concepts is split into 5 chapters: Data Preprocessing, Supervised Learning, Unsupervised Learning, Reinforcement Learning and Model Evaluation and Optimization. Together they contain 12 topics and 45 sub-topics.

How many chapters are in Machine Learning Core Concepts?

5 chapters, containing 12 topics and 45 sub-topics. The largest chapter is Data Preprocessing, with 3 topics.

Are there flashcards for Machine Learning Core Concepts?

Yes โ€” a 51-card Core Concepts 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.