Machine Learning Concepts: Models, Training, and Evaluation
Grade 11 · Technology · Study Guide
A college-prep overview of how machine learning systems learn from data, covering supervised vs. unsupervised learning, model training, and evaluation metrics.
Machine learning (ML) is a branch of artificial intelligence where systems improve their performance on a task by learning patterns from data rather than following explicitly programmed rules. The quality and quantity of data are often the most important factors in determining how well a model performs.
Supervised learning uses labeled training data — each input example is paired with a correct output. Algorithms like linear regression (for continuous outputs) and logistic regression or decision trees (for categorical outputs) learn a mapping from inputs to labels. A neural network stacks layers of weighted connections and uses backpropagation with gradient descent to adjust weights, minimizing a loss function that measures prediction error. Deep learning refers to neural networks with many hidden layers, capable of learning complex representations automatically from raw data such as images or text.
Unsupervised learning works with unlabeled data, discovering hidden structure. K-means clustering partitions data into k groups by minimizing within-cluster variance. Principal Component Analysis (PCA) reduces dimensionality by projecting data onto the directions of greatest variance, helping with visualization and removing redundant features. Association rule mining finds frequent item co-occurrences, famously used in market basket analysis.
Model evaluation is critical for ensuring a model generalizes beyond training data. Splitting data into training, validation, and test sets prevents overfitting — where a model memorizes training data but fails on new examples. Key metrics include accuracy (fraction correct), precision (true positives / predicted positives), recall (true positives / actual positives), and F1-score (harmonic mean of precision and recall). Cross-validation averages performance across multiple train/test splits for a more reliable estimate.
Key terms
- Supervised Learning
- ML paradigm where the model learns from labeled input-output pairs.
- Unsupervised Learning
- ML paradigm where the model finds patterns in unlabeled data.
- Training Data
- The labeled dataset used to fit a model's parameters.
- Overfitting
- When a model learns training data too precisely and performs poorly on unseen data.
- Loss Function
- A mathematical function measuring the difference between model predictions and true labels.
- Gradient Descent
- An optimization algorithm that iteratively adjusts model parameters in the direction that reduces the loss.
- Neural Network
- A model composed of layers of interconnected weighted nodes, loosely inspired by biological neurons.
- Backpropagation
- Algorithm for computing gradients in a neural network by applying the chain rule layer by layer.
- K-Means Clustering
- An unsupervised algorithm that partitions n data points into k clusters by minimizing within-cluster variance.
- Cross-Validation
- A technique that averages model performance across multiple train/test splits to produce a reliable evaluation estimate.
Flashcards
- Supervised learning
- Learns a mapping from labeled inputs to outputs (e.g., classification, regression).
- Unsupervised learning
- Discovers structure in unlabeled data (e.g., clustering, dimensionality reduction).
- Regression
- Supervised learning task predicting a continuous numeric output.
- Classification
- Supervised learning task predicting a discrete class label.
- Overfitting
- Model memorizes training data, fails to generalize to new examples.
- Underfitting
- Model is too simple to capture the underlying pattern in data.
- Gradient Descent
- Iterative optimizer that moves parameters in the direction of steepest loss decrease.
- Neural Network
- Layers of weighted nodes using activation functions to learn complex mappings.
- Backpropagation
- Computes gradients through a network by applying chain rule from output to input layers.
- Precision
- Of all predicted positives, the fraction that are truly positive.
- Recall
- Of all actual positives, the fraction the model correctly identified.
- Cross-validation
- Evaluates model performance across multiple data splits to reduce variance in the estimate.
Questions
Which type of machine learning requires labeled training data?
- Unsupervised learning
- Reinforcement learning
- Supervised learning
- Self-supervised learning
Show answer
Answer: Supervised learning
Supervised learning is defined by the use of labeled examples — each input comes with a known correct output the model learns to predict.
Overfitting occurs when a model performs well on training data but poorly on unseen data.
Show answer
Answer: True
Overfitting means the model has learned the noise and specific patterns of training data so well that it cannot generalize, resulting in high training accuracy but poor test accuracy.
The algorithm that adjusts model weights by computing gradients with respect to the loss is called ________.
Show answer
Answer: gradient descent
Gradient descent computes the gradient of the loss with respect to each weight and updates weights in the opposite direction, progressively minimizing the loss.
Which evaluation metric is the harmonic mean of precision and recall?
- Accuracy
- AUC-ROC
- F1-score
- Mean Squared Error
Show answer
Answer: F1-score
F1-score = 2 x (precision x recall) / (precision + recall); as a harmonic mean it penalizes models that sacrifice one metric for the other.
K-means clustering requires the number of clusters k to be specified before training.
Show answer
Answer: True
K-means is a parametric algorithm — the user must specify k (the desired number of clusters) as a hyperparameter before the algorithm begins.
Get a personalized course on Machine Learning Concepts built around your child.