Velocer › 플래시카드 › University of Illinois Urbana-Champaign › CS 441: Applied Machine Learning · UIUC
CS 441: Applied Machine Learning · UIUC
CS 441 flashcards for the midterm. · kams_to_karnaugh 작성 · 159개 카드
- What is data in the context of machine learning?Data is numbers that carry information; images, audio, and tables all become vectors of numbers.
- What does 'information' mean in machine learning?Information is predictive power, and much of ML involves transforming data so that information becomes easy to use.
- What is a sample?A single feature vector together with its label.
- What is a dataset?A collection of samples.
- What is the role of the training set?It is used to fit the model's parameters.
- What is the role of the validation set?It is used to select models and hyperparameters.
- What is the role of the test set?It measures the final model's performance, used only once.
- What is an alternative to using a single validation split?Cross-validation.
- What is classification?A task that maps features to a category.
- What is regression?A task that predicts a continuous value.
- How is classification error defined?The fraction of predictions that are wrong.
- What does a confusion matrix show?Which classes get confused, with rows as the true class and columns as the predicted class.
- What is the formula for RMSE?RMSE = sqrt((1/N) * sum over i of (f(X_i) - y_i)^2).
- What is the formula for R-squared?R^2 = 1 - (sum over i of (f(X_i) - y_i)^2) / (sum over i of (y_i - y_bar)^2).
- How does k-nearest neighbors classify a query point?It assigns the most common label among the K nearest training samples.
- How does k-nearest neighbors perform regression?It averages the target values of the K nearest training samples.
- What core assumption underlies k-nearest neighbors?Similar features imply similar outputs; with a plain distance, every dimension counts equally.
- What are the key design choices in k-nearest neighbors?The number of neighbors K and the distance metric.
- What are the parameters of a k-nearest neighbors model?The stored training data itself; there is no learned parametric model.
- How do L1 and L2 distances differ in how they weight coordinate differences?L2 is dominated by the largest coordinate differences more than L1 is.
- For unit-length vectors, how are L2 distance and cosine similarity related?The squared L2 distance equals 2(1 - x^T y), so cosine and L2 rank neighbors identically.
- What are the three components of test error?Test error = irreducible noise + bias² + variance.
- What is irreducible noise in the bias–variance decomposition?Error that is unavoidable given the features, regardless of the model.
- What is bias in the bias–variance decomposition?Error that remains even with infinite data, because the model cannot fit the true function.
- What is variance in the bias–variance decomposition?Error caused by limited data, since different training sets produce different models.
- How does high variance show up in the relationship between training and test error?Test error is much higher than training error.
- How do high bias or high noise show up in error measurements?As high training error.
- What happens to training error as model complexity increases?Training error always decreases.
- How does test error change as model complexity increases?Test error falls while the model is underfitting and rises once it starts overfitting.
- What effect does more training data have on the training set and the test–training gap?The training set becomes harder to fit, but the gap between test and training error shrinks, so test performance improves.
- What does distribution shift refer to as a source of remaining error?A difference between the training and test distributions that limits how well training performance carries over.
- What is Bayes-optimal error?The error of the best possible model given the features, i.e., the irreducible noise floor.
- What is retrieval in the context of machine learning?Finding the closest samples to a query. It is used in web search, nearest neighbor prediction, and k-means.
- How does brute-force retrieval work?It computes the distance between the query and every sample. It is exact but can be slow for large datasets.
- What does LSH (locality-sensitive hashing) provide?Approximate nearest neighbor answers quickly, trading some accuracy for speed.
- What is the first step of the k-means algorithm?Pick K random centers.
- After assigning points to the nearest center in k-means, what is the next step?Recompute each center as the mean of the points in its cluster.
- What distance metric does k-means typically use to assign points to centers?L2 (Euclidean) distance.
- When does the k-means loop stop?It repeats until the assignments/centers become stable.
- What is hierarchical k-means?A variant of k-means that clusters data in a hierarchy rather than a single flat set of clusters.
- What is agglomerative clustering?A clustering method that repeatedly merges the closest clusters until a stopping criterion is met.
- What is a key advantage of agglomerative clustering with a good linkage?It can follow connected (manifold) structure in the data.
- What does the projection \(w^Tx\) represent?It projects a point onto the axis defined by the vector \(w\).
- What does PCA find?Orthogonal directions of maximum variance, which are the eigenvectors of the covariance matrix.
- In PCA, what do the eigenvalues represent?The amount of explained variance along each corresponding eigenvector direction.
- How do you choose the number of dimensions to keep in PCA?By how quickly the eigenvalues decay, or by how much total variance you want to retain.
- What optimality property does PCA have?It is the best linear projection for reconstruction in mean squared error.
- What are two drawbacks of PCA?It may lose local neighborhood structure and class-discriminating information.
- What does MDS preserve between points?Pairwise distances between points.
- How does IsoMap relate to MDS?It is MDS applied to graph (geodesic) distances rather than raw pairwise distances.
- What does t-SNE focus on preserving?Neighbor probability distributions, with emphasis on the closest points.
- How does UMAP work?It builds a kNN graph and applies spectral embedding, making it fast and effective.
- What is the general goal of the embedding methods MDS, IsoMap, t-SNE, and UMAP?To preserve relationships between points in a lower-dimensional representation.
- How is the least-squares solution for linear regression computed?w* = argmin_w ||Xw - y||^2, solved by w = (X^T X)^(-1) X^T y, which is the pseudoinverse solution.
- What are common uses of linear regression?Explaining relationships between variables, predicting values, and extrapolating.
- What is the purpose of regularization in linear regression?It limits the size of the weights to reduce overfitting.
- How does L1 regularization affect the weights?It concentrates weight on the most useful features, driving many weights to zero.
- How does L2 regularization affect the weights?It spreads small weights across all features rather than zeroing many of them out.
- What role do regularization and priors play in linear regression?They encode preferences among solutions, often improving generalization and sometimes making the solution unique.
- What does logistic regression model as a linear function of the features?The log odds of the label. Its probability form is P(y|x) = 1/(1+exp(-y·θᵀx)) for y ∈ {-1, 1}.
- How is logistic regression trained?By minimizing the negative log-likelihood plus an L2 regularization term, Σᵢ -log P(yᵢ|xᵢ,θ) + λ‖θ‖, typically with gradient descent.
- What are two strengths of logistic regression?It gives good confidence estimates and performs strongly in high dimensions.
- What is the objective function of a linear SVM?Minimize λ‖w‖² + Σₙ max(0, 1 - yₙ(wᵀxₙ + b)).
- What is hinge loss and when does it charge a penalty?The term max(0, 1 - y(wᵀx + b)); it penalizes only when the margin is below 1 (i.e., when there is slack).
- Why is a wider SVM margin desirable?A wider margin means more confident predictions and boundaries that generalize better.
- How does logistic regression differ from the SVM in how it treats confidence?Logistic regression keeps pushing confidence in the correct label higher, while the SVM stops once it is confident enough (margin ≥ 1).
- In most ML pipelines, what is the final stage and where does the real difficulty lie?The last stage is usually a nearest-neighbor or linear predictor; the real difficulty is producing features that these simple predictors can use.
- What independence assumption does Naive Bayes make?It assumes features are conditionally independent given the label, so P(x,y) = P(y) * product over i of P(x_i | y).
- What are the main advantages of Naive Bayes?It is easy to estimate, fast, and less prone to overfitting when data is scarce.
- What is the main limitation of Naive Bayes?Its strong independence assumption gives it limited modeling power.
- How does Naive Bayes make a prediction?It picks the label y that maximizes P(x,y); maximizing log P is equivalent and easier to compute.
- Why maximize log probability instead of probability in Naive Bayes?Because the log is monotonic, so the maximizing y is the same, but the log turns products into sums and avoids numerical underflow.
- How can you derive parameter estimates for a distribution in Naive Bayes?Set the derivative of the log-likelihood to zero and solve; estimates for common distributions can also be looked up.
- Why add pseudo-counts when estimating Naive Bayes parameters?To smooth the estimates, avoiding zero probabilities for unseen feature values.
- What happens in the E-step of EM?It computes the likelihood (soft assignment) of each latent value given the current parameters.
- What happens in the M-step of EM?It re-estimates the parameters using the E-step likelihoods as weights.
- What is the overall structure of the EM algorithm?Alternate the E-step and M-step, repeating until convergence.
- What does the E-step produce in EM?Soft assignments: a likelihood for each possible latent value rather than a hard single choice.
- In EM, what role do the E-step likelihoods play in the M-step?They act as weights when re-estimating the parameters.
- Write the Naive Bayes factorization of the joint distribution P(x,y).P(x,y) = P(y) * product over i of P(x_i | y).
- What is a parametric probability density model?A model with a fixed functional form (e.g., Gaussian, exponential) defined by a small set of parameters. It works well when the assumed form matches the data.
- Give two examples of parametric density models.Gaussian and exponential distributions.
- What is a semi-parametric density model?A model that combines a flexible structure with a limited number of parameters, such as a mixture of Gaussians. It gives a broad fit and works best in low dimensions or for smooth densities.
- What is a mixture of Gaussians an example of?A semi-parametric density model.
- When are semi-parametric models like Gaussian mixtures most appropriate?In low dimensions or when the true density is smooth.
- What is a non-parametric density model?A model that makes few assumptions about the density's form, such as histograms or kernel density estimation. It can fit anything but struggles in high dimensions.
- Give two examples of non-parametric density estimation methods.Histograms (discretization) and kernel density estimation.
- What is a key weakness of non-parametric density estimation?It struggles in high dimensions, though it works well for 1-D data.
- What are hyperparameters in density estimation, and give examples?Settings not learned directly from the fitted parameters, such as number of bins, kernel bandwidth, and number of mixture components.
- How should hyperparameters like bin count or kernel bandwidth be chosen?By selecting the value that maximizes average log-likelihood on validation data, then refitting on the combined train and validation data.
- What happens after choosing hyperparameters via validation log-likelihood?The model is refit on the combined training and validation data.
- Which density estimation approach is best suited to 1-D data?Non-parametric methods such as histograms and kernel density estimation.
- Which density estimation approach is best when the assumed distributional form fits the data?Parametric models, such as Gaussian or exponential.
- What is the kernel bandwidth in kernel density estimation?A hyperparameter controlling the smoothness or width of the kernel used to estimate the density.
- What does the number of bins control in a histogram-based density estimate?The resolution of the discretization; it is a hyperparameter chosen via validation log-likelihood.
- Why are the median and quantiles considered robust estimators, while the mean, min, and max are not?Median and quantiles resist outliers, whereas the mean, min, and max are strongly affected by them. For example, the mean of 1, 2, 96 is 33, but the median is 2.
- Why might a moving median be preferred over a moving average for smoothing?A moving median smooths spiky noise better than a moving average because it resists outliers.
- Why is least squares not considered a robust estimation method?Least squares is not robust because large errors (outliers) are squared and thus heavily influence the fit.
- What does IRLS stand for and how does it work?IRLS is iteratively reweighted least squares: start with weights of 1, solve weighted least squares, set new weights from the residuals, and repeat. It approximates robust norms such as p=1.
- How does the RANSAC algorithm estimate a robust model?RANSAC repeatedly fits a model to a small random subset, counts the inliers, and keeps the model with the most inliers.
- What property do robust loss functions have for large errors?Robust loss functions grow slowly for large errors, limiting the influence of outliers.
- What is the key difference between the median and the mean in terms of outlier sensitivity?The median resists outliers, while the mean does not.
- In RANSAC, what determines which model is kept?The model with the most inliers is kept.
- How does a decision tree make a prediction for a new input?Descend through the threshold tests from the root to a leaf, then return that leaf's label (or value).
- What criterion is commonly used to choose a split in a decision tree?Information gain, which measures the reduction in entropy achieved by the split.
- What is the formula for entropy H(X)?H(X) = -Σ_x P(x) log₂ P(x).
- How is conditional entropy H(X|Y) defined?H(X|Y) = Σ_y P(y) H(X|Y=y), the weighted average of specific conditional entropies over values of Y.
- What is the formula for information gain I(X|Y)?I(X|Y) = H(X) - H(X|Y), the entropy of X minus its conditional entropy given Y.
- What does information gain equal when Y tells nothing about X?Zero, because H(X|Y) = H(X), so no entropy is reduced.
- What does information gain equal when Y tells everything about X?H(X), because H(X|Y) = 0, so all entropy is removed.
- What are two common stopping conditions for splitting in a decision tree?Stop when a leaf has fewer than N_min points, or when the maximum depth is reached.
- How do decision tree boundaries compare geometrically to 1-NN boundaries?Both produce piecewise-linear boundaries, but tree splits are axis-aligned while 1-NN boundaries generally are not.
- What are key advantages of decision trees?They are explainable and require no feature scaling.
- What is a main weakness of a single decision tree?It tends to overfit or underfit the data.
- What does a specific conditional entropy H(X|Y=y) represent?The entropy of X restricted to the subset of data where Y equals y.
- What is bootstrap resampling?Resampling n points with replacement many times, computing a statistic on each sample, and averaging to estimate the statistic and its variance.
- What is bagging and what does it reduce?Training M classifiers on bootstrap samples and combining them by vote; it reduces variance.
- How does a random forest work?Many deep trees are trained, each on different samples and random feature subsets; each tree is low-bias but overfit, and averaging cuts the variance.
- What is boosting and what does it reduce?Training models in sequence, each focusing on examples earlier models got wrong; it reduces bias.
- What is the key difference between bagging and boosting in terms of error?Bagging reduces variance by training models in parallel on bootstrap samples, while boosting reduces bias by training models sequentially on hard examples.
- Why does averaging many deep trees in a random forest help?Each tree is low-bias but overfits; averaging their predictions cuts the variance.
- In bagging, how are the M classifiers combined?By voting (aggregating their predictions).
- What does each tree in a random forest train on?A different bootstrap sample and a random subset of features.
- What does AdaBoost focus on?Examples that earlier models got wrong, training models in sequence to reduce bias.
- What does bootstrap estimate besides the statistic itself?Its variance.
- What direction does gradient descent step relative to the loss gradient?It steps opposite the gradient of the loss.
- Do convex models like linear/logistic regression and SVM have bad local minima?No—convex models have no bad local minima, while deep nets do.
- What is SGD (stochastic gradient descent)?An optimization method that takes a step using one example or a mini-batch at a time rather than the full dataset.
- Why are mini-batches much faster than full-batch gradient computation?A batch of size B costs O(B) to compute, but the gradient's standard error shrinks only like 1/sqrt(B), so mini-batches give large speedups and parallelize well on GPUs.
- What is an epoch in training?One full pass over the training set.
- What is the best way to order training data across epochs?Shuffle into a new random order each epoch.
- Name three common learning rate schedules.Constant, exponential decay (e.g., multiply by 0.95), and linear decay to zero.
- What two ideas does Adam combine?Momentum (a running average of gradients, beta around 0.9) and an RMSProp-style running average of squared gradients (around 0.999).
- What is a multi-layer perceptron (MLP)?A neural network that stacks fully connected layers with nonlinear activations, where hidden units encode latent concepts.
- Why do MLPs use nonlinear activation functions?Nonlinear activations let hidden layers learn latent concepts and represent nonlinear relationships; without them, stacked layers collapse into an equivalent linear model.
- What is backpropagation?A method that computes the error at the output and then passes gradients backward layer by layer using the chain rule.
- Which rule does backpropagation use to propagate gradients through layers?The chain rule of calculus.
- What is the gradient descent weight update rule used in training MLPs?w ← w − α ∂E/∂w, where α is the learning rate and ∂E/∂w is the gradient of the error with respect to the weight.
- What is the learning rate α in the weight update w ← w − α ∂E/∂w?A scalar that controls the step size of each weight update during gradient descent.
- What is a mini-batch in MLP training?A small subset of training examples used to compute gradients and update weights in one step.
- Why are training epochs typically shuffled?Shuffling the data each epoch prevents the model from learning order-dependent patterns and improves generalization.
- What role do hidden units play in an MLP?They encode latent concepts—intermediate learned features—that help the network model complex patterns.
- What are fully connected layers in an MLP?Layers where every input unit connects to every output unit, each connection having a learnable weight.
- What is an epoch in neural network training?One full pass through the entire training dataset.
- What is the error E in backpropagation?A loss function measuring the difference between the network's output and the target; its gradient with respect to each weight drives the update.
- What are the three steps in a convolutional block?A convolutional block applies learned filters, then a nonlinearity, then spatial pooling to produce feature maps.
- What typically sits at the end of a CNN architecture?An MLP (fully connected classifier) sits at the end of the network.
- Name the key ingredients of modern deep learning.ReLU activations, convolution, residual (skip) connections, BatchNorm, better SGD variants, big data, and GPUs.
- What is a residual (skip) connection?A connection that bypasses one or more layers, adding the block's input to its output so gradients can flow back easily.
- How do skip connections help training in ResNet?They let gradients flow back easily and each block only adds to the previous representation, easing optimization of deep networks.
- What does BatchNorm stand for and where is it used?Batch Normalization; it is a normalization technique used as a key ingredient in deep CNN training.
- What role does ReLU play in CNNs?ReLU is the nonlinear activation applied after convolution, enabling efficient training of deep networks.
- What is spatial pooling used for in a convolutional block?It downsamples feature maps, reducing spatial dimensions while retaining important features.
- What is a feature map in a CNN?The output produced by applying learned filters (plus nonlinearity and pooling) to an input, representing detected features.
- What is the main characteristic of the nearest neighbor method?It is instance-based with low bias and no training, but prediction is slow and it requires good features.
- What are the strengths and weaknesses of Naive Bayes?It is probabilistic with a usually linear boundary, works with little data, but has limited power.
- What type of model is logistic regression and what are its advantages?It is a probabilistic, linear model that gives good confidence and fast prediction, but needs good features.
- What is linear regression used for and what are its benefits?It fits data with a linear model, is fast, and its coefficients may be interpretable.
- How does a decision tree work and what are its pros and cons?It uses rule-based partitions, is explainable and needs no feature scaling, but single trees generalize poorly.
Velocer는 무료예요: 간격 반복과 어떤 문서에서든 만드는 나만의 카드.
PDF to flashcards · Lecture to flashcards · Practice exam · Syllabus study plan · Anki import
University of Illinois Urbana-Champaign의 다른 덱
- CS 580: Algorithmic Game Theory · UIUC
- CS 445: Computational Photography · UIUC
- CS 444: Deep Learning for Computer Vision · UIUC
- CS 440: Artificial Intelligence · UIUC
- CS 425: Distributed Systems · UIUC
- CS 421: Programming Languages and Compilers · UIUC
- CS 374: Intro to Algorithms and Models of Computation · UIUC
- CS 357: Numerical Methods I · UIUC
- CS 341: System Programming · UIUC
- CS 225: Data Structures · UIUC
- CS 173: Discrete Structures · UIUC