Flashcard Deck · 25 cards · Public

Stanford CS229 - Machine Learning Fundamentals

Master the core algorithms and mathematical principles of machine learning, from linear regression to neural networks, as taught in Stanford's renowned CS229 course. This high-yield deck covers essential concepts, algorithms, and evaluation metrics to solidify your ML foundation.

Cards in this deck

(25 cards)

Preview terms and definitions before starting your study session.

#1
Term
What is Machine Learning?
Definition
Machine Learning is a field of study that gives computers the ability to learn without being explicitly programmed. It focuses on developing algorithms that allow systems to learn from data, identify patterns, and make decisions or predictions with minimal human intervention.
#2
Term
Differentiate between Supervised and Unsupervised Learning.
Definition
1. Supervised Learning: Uses labeled data (input-output pairs) to learn a mapping function from inputs to outputs. The goal is to predict an output given new input data. Examples: Regression (predicting continuous values), Classification (predicting discrete labels).
2. Unsupervised Learning: Works with unlabeled data to find hidden patterns, structures, or relationships within the data. The goal is to model the underlying structure or distribution of the data. Examples: Clustering, Dimensionality Reduction.
#3
Term
What is the hypothesis function for Linear Regression?
Definition
The hypothesis function, often denoted as , predicts a continuous output. For a single feature, it's . For multiple features, it's expressed in vector form as , where is the vector of parameters (weights) and is the vector of features (with for the intercept term).
#4
Term
What is the Mean Squared Error (MSE) cost function for Linear Regression?
Definition
The Mean Squared Error (MSE) cost function, , measures the average squared difference between the predicted values and the actual target values. It is defined as:

where is the number of training examples, is the prediction for the -th example, and is the actual target value. The term is included for mathematical convenience, simplifying the derivative during gradient descent.
#5
Term
Explain the purpose of Gradient Descent and its update rule.
Definition
Gradient Descent is an iterative optimization algorithm used to find the minimum of a function (e.g., a cost function). It repeatedly adjusts the model's parameters () in the direction opposite to the gradient of the cost function, which is the direction of steepest descent.
The update rule for each parameter is:

where is the learning rate and is the partial derivative of the cost function with respect to .
#6
Term
What is the role of the learning rate () in Gradient Descent?
Definition
The learning rate () is a hyperparameter in Gradient Descent that controls the step size taken during each iteration. It determines how much the parameters are adjusted in the direction of the negative gradient.
  • If is too small, convergence to the minimum will be very slow.
  • If is too large, Gradient Descent might overshoot the minimum, oscillate, or even diverge, failing to converge to an optimal solution.
#7
Term
Why is Feature Scaling important in Machine Learning?
Definition
Feature scaling (e.g., normalization or standardization) transforms features to a similar scale. It is crucial for algorithms sensitive to feature magnitudes (like Gradient Descent, SVMs, K-Nearest Neighbors) because it helps to:
1. Speed up convergence: Prevents oscillations and allows Gradient Descent to converge much faster.
2. Prevent dominance: Ensures that features with larger numerical ranges do not disproportionately influence the cost function or distance calculations, allowing all features to contribute equally to the model's learning process.
A common method is Min-Max scaling: .
#8
Term
Differentiate between Overfitting and Underfitting.
Definition
1. Overfitting: Occurs when a model learns the training data too well, capturing noise and specific patterns unique to the training set. This leads to excellent performance on training data but poor generalization and high error on unseen data (high variance, low bias).
2. Underfitting: Occurs when a model is too simple to capture the underlying patterns in the training data. It performs poorly on both training and unseen data, indicating that the model has not learned enough from the data (high bias, low variance).
Showing 8 of 25 cards in this deck.
Study All Now