ML Fundementals

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/89

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 1:58 AM on 5/11/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

90 Terms

1
New cards
"What is the main difference between supervised and unsupervised learning?"
"Supervised learning trains on labeled data
2
New cards
"Why would you use unsupervised learning instead of supervised learning?"
"You use unsupervised learning when labeled outcomes are unavailable
3
New cards
"What does it mean for a model to generalize well?"
"A model generalizes well when it performs well on unseen data
4
New cards
"Why does overfitting happen?"
"Overfitting happens when a model learns noise
5
New cards
"Why does underfitting happen?"
"Underfitting happens when a model is too simple to capture the true relationship in the data. It performs poorly on both training and test data."
6
New cards
"What is the bias-variance tradeoff?"
"The bias-variance tradeoff describes the balance between error from overly simple assumptions and error from being too sensitive to the training data. A good model minimizes both as much as possible."
7
New cards
"What happens to bias and variance as model complexity increases?"
"As model complexity increases
8
New cards
"Why can training error keep decreasing while test error starts increasing?"
"Training error decreases because a more complex model can fit the training data better. Test error increases when the model starts fitting noise instead of generalizable patterns."
9
New cards
"Why do we use a validation set instead of choosing the model based on test performance?"
"A validation set is used to tune models and hyperparameters without contaminating the final test evaluation. The test set should only be used once for an unbiased estimate of final performance."
10
New cards
"Why is cross-validation useful for estimating model performance?"
"Cross-validation evaluates a model across multiple train-validation splits
11
New cards
"How does K-fold cross-validation work?"
"The data is split into K folds. The model trains on K-1 folds and validates on the remaining fold
12
New cards
"What is the difference between K-fold cross-validation and leave-one-out cross-validation?"
"K-fold uses groups of data as validation sets
13
New cards
"If LOOCV uses almost all the data for training
why not always use it?"
14
New cards
"How does regularization help prevent overfitting?"
"Regularization adds a penalty for model complexity
15
New cards
"How can you diagnose overfitting and underfitting using training and validation performance?"
"If training error is low but validation error is high
16
New cards
"What is the goal of gradient descent in machine learning?"
"Gradient descent minimizes a loss function by repeatedly updating model parameters in the direction that most reduces the loss."
17
New cards
"How does batch gradient descent update model parameters?"
"Batch gradient descent computes the gradient using the entire training dataset before making one parameter update."
18
New cards
"How does stochastic gradient descent differ from batch gradient descent?"
"Stochastic gradient descent updates parameters using one training example at a time
19
New cards
"Why is mini-batch gradient descent commonly used in practice?"
"Mini-batch gradient descent updates parameters using small groups of examples
20
New cards
"What is the tradeoff between batch
stochastic
21
New cards
"Why is the learning rate important in gradient descent?"
"The learning rate controls how large each parameter update is. If it is too small
22
New cards
"What happens when the learning rate is too high?"
"The loss may bounce around
23
New cards
"What happens when the learning rate is too low?"
"Training becomes very slow and may appear stuck because each update changes the parameters only slightly."
24
New cards
"When is mean squared error commonly used as a loss function?"
"Mean squared error is commonly used for regression problems where the goal is to predict continuous numerical values."
25
New cards
"Why is cross-entropy loss used for classification?"
"Cross-entropy measures how far the predicted probability distribution is from the true class distribution. It strongly penalizes confident wrong predictions."
26
New cards
"What is hinge loss used for?"
"Hinge loss is commonly used in support vector machines. It penalizes predictions that are wrong or not confidently correct by enforcing a margin between classes."
27
New cards
"Why do we add regularization to a model?"
"Regularization penalizes model complexity to reduce overfitting and improve generalization on unseen data."
28
New cards
"What is L1 regularization
and why does it lead to sparsity?"
29
New cards
"What is L2 regularization
and how does it affect model weights?"
30
New cards
"What is the geometric difference between L1 and L2 regularization
and why does L1 produce sparse solutions?"
31
New cards
"What is the main goal of linear regression?"
"Linear regression estimates a continuous target variable by fitting a linear relationship between input features and the output."
32
New cards
"What are the key assumptions of linear regression?"
"Linear regression assumes linearity
33
New cards
"Why does linear regression assume linearity?"
"It assumes the expected value of the target can be represented as a weighted sum of the features; if the true relationship is highly nonlinear
34
New cards
"What does homoscedasticity mean in linear regression?"
"Homoscedasticity means the variance of the residuals is roughly constant across all predicted values."
35
New cards
"Why is multicollinearity a problem in linear regression?"
"Multicollinearity makes coefficient estimates unstable because highly correlated predictors make it difficult to separate each feature’s individual effect."
36
New cards
"What is logistic regression used for?"
"Logistic regression is used for classification
37
New cards
"What is the link function in logistic regression?"
"Logistic regression uses the logit link function
38
New cards
"Why does logistic regression use a sigmoid function?"
"The sigmoid function converts linear model outputs into probabilities between 0 and 1
39
New cards
"How does a decision tree choose splits?"
"A decision tree chooses splits that increase class purity
40
New cards
"What is the difference between entropy and Gini impurity in decision trees?"
"Entropy measures impurity using information theory and is used in information gain
41
New cards
"Why can decision trees easily overfit?"
"Decision trees can keep splitting until they memorize small patterns or noise in the training data
42
New cards
"What is KNN’s main assumption?"
"KNN assumes that similar data points are close together in feature space
43
New cards
"Why does KNN suffer from the curse of dimensionality?"
"In high-dimensional spaces
44
New cards
"What is the difference between precision
recall
45
New cards
"When should you prefer a PR-Curve over ROC-AUC for imbalanced datasets?"
"A PR-Curve is usually more informative when the positive class is rare because it focuses directly on precision and recall for the positive class. ROC-AUC can look overly optimistic on imbalanced data because the false positive rate may remain small when there are many true negatives."
46
New cards
"Why do many machine learning models require feature scaling?"
"Scaling makes features comparable in magnitude so that one large-scale feature does not dominate the learning process. It is especially important for distance-based models
47
New cards
"What is the difference between normalization and standardization?"
"Normalization usually rescales values to a fixed range
48
New cards
"When would you prefer normalization over standardization?"
"Normalization is useful when features need to be bounded
49
New cards
"When would you prefer standardization over normalization?"
"Standardization is often preferred for models that assume or benefit from centered data
50
New cards
"What are common strategies for handling missing data?"
"Common approaches include deletion
51
New cards
"Why is it important to understand why data is missing?"
"The reason data is missing affects the correct handling strategy. Missing completely at random is less concerning
52
New cards
"When should you use median imputation instead of mean imputation?"
"Median imputation is usually better when the feature has outliers or a skewed distribution because the median is more robust than the mean."
53
New cards
"What is one-hot encoding
and when is it appropriate?"
54
New cards
"What is a major downside of one-hot encoding?"
"It can create many columns when a categorical variable has high cardinality. This increases memory usage
55
New cards
"What is target encoding?"
"Target encoding replaces each category with a statistic based on the target
56
New cards
"When would you choose target encoding over one-hot encoding?"
"Target encoding is useful when a categorical variable has many unique levels and one-hot encoding would create too many sparse columns. However
57
New cards
"What is PCA used for in machine learning?"
"PCA reduces dimensionality by projecting data onto new orthogonal directions that capture the most variance. It is often used for compression
58
New cards
"Why is PCA considered a lossy transformation?"
"PCA is lossy when you keep only a subset of principal components because some variance from the original data is discarded. The transformed data no longer contains all original information."
59
New cards
"What is data leakage?"
"Data leakage occurs when information from outside the training process is used to build the model
60
New cards
"How can data leakage occur during cross-validation?"
"Leakage occurs when preprocessing steps like scaling
61
New cards
"What is the core difference between bagging and boosting?"
"Bagging trains many models independently on different bootstrapped samples and averages their predictions. Boosting trains models sequentially
62
New cards
"Why is Random Forest considered a bagging method?"
"Random Forest trains many decision trees on bootstrapped datasets and averages their outputs. It also randomly samples features at each split
63
New cards
"Why does bagging require diversity among base models?"
"Bagging works best when individual models make different errors. If all trees are highly correlated
64
New cards
"Why does bagging reduce variance?"
"Averaging multiple noisy models cancels out some individual errors
65
New cards
"What is the main idea behind boosting?"
"Boosting builds an ensemble sequentially
66
New cards
"How does boosting optimize an objective function?"
"Boosting minimizes an objective made of a loss term plus a regularization term. Each new learner is added to reduce the current ensemble’s loss; in gradient boosting
67
New cards
"Why do people say boosting focuses on residuals?"
"In regression
68
New cards
"What is the practical difference between XGBoost and LightGBM?"
"XGBoost is a highly optimized gradient boosting framework known for regularization and strong performance. LightGBM is often faster on large datasets because it uses histogram-based splitting and leaf-wise tree growth."
69
New cards
"What is out-of-bag error in bagging?"
"Out-of-bag error estimates validation performance using samples that were not included in a tree’s bootstrap training set. Each tree predicts on its unused samples
70
New cards
"Why can out-of-bag error act like a validation score?"
"Each bootstrap sample leaves out some training observations
71
New cards
"What is stacking in ensemble learning?"
"Stacking combines multiple different base models by training a meta-model on their predictions. The meta-model learns how to best combine the strengths of each base learner."
72
New cards
"Why must stacking use out-of-fold predictions for training the meta-model?"
"If the meta-model is trained on predictions from base models that were trained on the same data
73
New cards
"What is Gini feature importance in tree-based models?"
"Gini importance measures how much a feature reduces impurity across all splits where it is used. Features that create strong purity improvements receive higher importance scores."
74
New cards
"What is permutation feature importance?"
"Permutation importance measures how much model performance drops when a feature’s values are randomly shuffled. If performance drops a lot
75
New cards
"When should you prefer permutation importance over Gini importance?"
"Use permutation importance when you want a performance-based measure of feature usefulness
76
New cards
"What is Naive Bayes used for in machine learning?"
"Naive Bayes is a probabilistic classifier that predicts the class with the highest posterior probability using Bayes’ theorem. It is commonly used for text classification
77
New cards
"What is the naive assumption in Naive Bayes?"
"The naive assumption is that all features are conditionally independent given the class label. In other words
78
New cards
"Why does Naive Bayes often perform well even when the independence assumption is false?"
"Naive Bayes can still classify well because it only needs the correct class to receive the highest score
79
New cards
"How does Naive Bayes use Bayes’ theorem for classification?"
"It estimates the probability of each class given the observed features
80
New cards
"Why is smoothing used in Naive Bayes?"
"Smoothing prevents zero probabilities when a feature value appears in the test set but was not seen with a class during training. Without smoothing
81
New cards
"How does K-Means clustering work?"
"K-Means partitions data into K clusters by assigning each point to the nearest centroid
82
New cards
"What assumptions does K-Means make about clusters?"
"K-Means assumes clusters are roughly spherical
83
New cards
"Why is K-Means sensitive to outliers?"
"K-Means uses the mean as the cluster center
84
New cards
"What is the main difference between K-Means and hierarchical clustering?"
"K-Means requires choosing K beforehand and produces a flat clustering. Hierarchical clustering builds a tree-like structure of nested clusters
85
New cards
"What is the difference between agglomerative and divisive hierarchical clustering?"
"Agglomerative clustering starts with each point as its own cluster and repeatedly merges the closest clusters. Divisive clustering starts with all points in one cluster and recursively splits them."
86
New cards
"What is a dendrogram in hierarchical clustering?"
"A dendrogram is a tree diagram that shows how clusters merge or split at different distance levels. It helps decide how many clusters may be reasonable."
87
New cards
"What is the purpose of the Expectation-Maximization algorithm?"
"EM is used to estimate model parameters when there are hidden or latent variables. It alternates between estimating hidden assignments and updating parameters to maximize likelihood."
88
New cards
"How is EM for Gaussian Mixture Models different from K-Means?"
"K-Means uses hard assignments
89
New cards
"What is the difference between Euclidean and Manhattan distance?"
"Euclidean distance measures straight-line distance
90
New cards
"When is cosine similarity better than Euclidean distance?"
"Cosine similarity is better when the direction of vectors matters more than their magnitude. It is commonly used for text embeddings