









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










How do bias and variance relate to sources of error we discussed earlier in the course? - Answer>>> Variance includes optimization and estimation error, while bias includes modelling error
How does HAC work? - Answer>>> Initialize each point as its own cluster. While more than one cluster remains, merge the two closest clusters.
How do you measure distance between different clusters? - Answer>>> Apply a link function to the two clusters of interest
How are decision trees trained? - Answer>>> Taking a dataset and splitting on certain variables. Variables to split on are selected with information gain (highest IG of all the given splits, selected greedily)
Does the DT training algorithm find the optimal tree every time? - Answer>>> NO, it's greedy though and should get a decently good one.
What does multiclass logistic regression learn? - Answer>>> Multiple linear (piecewise) decision boundaries in input space, where the max probability is taken as the class label
What is multiclass logistic regression? - Answer>>> Take the maximum entry (corresponding to class c) for the vector of probabilities. This is a single layer of neurons with softmax activation.
Why should decision tree learning not terminate whenever all all attributes result in zero information gain? - Answer>>> Many functions (like XOR) may not show any information gain in initial variables but be able to be usefully split later only after multiple variables have been considered.
Tasks in unsupervised learning - Answer>>> Density estimation, clustering, and dimensionality reduction
Single-Link function - Answer>>> Able to generate very long clusters because it only considers the minimum distance between points in two clusters for merging.
The height of a joint in a Dendrogram - Answer>>> The distance between two merged clusters.
What other methods can do multiclass classification directly? - Answer>>> kNN, neural networks, multiclass SVMs, multiclass perceptrons, decision trees, naive Baye
What is a neuron? - Answer>>> A linear function of its input followed by a (typically) nonlinear activation function producing output.
What are the hyperparameter(s) of a single neuron? - Answer>>> The activation function, σ
What learnable parameters does a single neuron have? - Answer>>> w ∈ R^d and b ∈ R
What do we do to form a neural network? - Answer>>> Stack multiple layers of neurons together
What type of neural network did we study in depth? - Answer>>> Multilayer, feedforward neural networks
What activation do we use in the output layer for regression? - Answer>>> Linear activation
What activation do we use in the output layer for classification? - Answer>>> Sigmoid or softmax
How do we compute the output for a single neuron? - Answer>>> Take the activation function of the summed, weighted input plus bias. Thus, simply compute σ( Σi (wi*xj) + bi)
How do we train a NN? - Answer>>> Forward pass, backward pass, then update.
What happens in a forward pass? - Answer>>> For each training example, (i) compute and store all activations, then (ii) compute loss
What happens in a backward pass? - Answer>>> Compute gradient of the loss w.r.t. all network parameters. Perform this efficiently using backpropagation
What happens during the update step? - Answer>>> A step of gradient descent is performed to minimize loss
Why is initialization important in neural network training? - Answer>>> Depending on the activation, init might make the gradient == 0, so now you aren't training!
How does training behavior change with different levels of learning rate? - Answer>>> Maximum training optimality at an intermediate learning rate. Too low, learning becomes very slow. Too high, system jumps around and cannot fall into minima
How do we perform discrete convolutions? - Answer>>> For an Nd system, take an up-to-Nd filter/kernel and slide it around the system, recording features such as the sum of filter product elements, etc. Can also do this across the time domain to compute the activation for that feature
What assumptions do convolutional kernels make? - Answer>>> 1) Locality: only need to look at certain blocks of the input to find the cat face, and 2) Translational invariance: Doesn't matter where it occurs: it will look the same
What type of computation do RNNs model? - Answer>>> Memory retention about a problem
What do internal nodes do in a decision tree? - Answer>>> Perform tests against a single input feature value.
What does each branch from an internal node represent? - Answer>>> A splitting by feature values or ranges of feature values
What is the function of leaf nodes in decision trees? - Answer>>> Predicts output: either class or continuous outputs
What are some benefits of decision trees? - Answer>>> Their resulting models are highly human-interprable, they can fit arbitratily complex functions, and they can use a mix of discrete and continuous inputs
How many features can DTs use? - Answer>>> Up to all of the input features, although not all features must be included in the DT
May a single feature appear in multiple DT branches? - Answer>>> Yes, this is possible if a feature is split incompletely or on continous values. Repeatedly splitting on discrete features does nothing, though
Are DTs unique? - Answer>>> No, many trees represent the same logical equation, but they may not have the same size. Thus, it's best to select the smallest possible DT with proper logical separation, although this is NP-hard
Why do we want a small decision tree? - Answer>>> Small trees embody the prior of simplicity, and thus they're less likely to overfit
Apart from NP-hard implementations, what should we do? - Answer>>> Build the tree greedily!
What heuristic should we use when greedily constructing a decision tree? - Answer>>> Information gain on conditional splits on labels
How do we deal with splits on continuous features? - Answer>>> There are INFINITELY-many such splits. IG only changes when a threshold crosses at a datapoint. Thus, we sort the dataset values and consider thresholds between consecutive datapoints. we compute IG for each threshold and select the threshold with maximum IG
How do we avoid overfitting on DTs? - Answer>>> 1) Add hyperparameters to control tree size (depth, #nodes, min_split_number), 2) Stop early based on validation performance (when validation saturates), 3) Post pruning
How does post pruning work for DTs? - Answer>>> Grow the full DT on the training set, then consider the impact of removing each node on validation performance. Greedily prune the node that improves validation performance the most
Why are decision boundaries composed of axis-aligned segments? - Answer>>> Decision trees separate based on single variables, not functions of multiple variables.
What is the maximum depth of a decision tree? - Answer>>> The number of unique splits
When would a leaf of a fully-expanded DT have more than one datapoint in the leaf? - Answer>>> If Bayes error is NOT zero; need to add another variable to split on!
What is entropy? - Answer>>> A measure of inhomogeneity of class labels in a dataset
What is conditional entropy? - Answer>>> A measure of inhomogeneity of class labels in a dataset when splitting the dataset based on a variable, with respect to the variable that is being split on
When do ensemble methods work well? - Answer>>> When each individual member of the ensemble is (i) accurate (better than chance) and (ii) diverse (uncorrelated errors on new examples)
How does bagging work? - Answer>>> Tries to reduce variance in strong learners. For uncorrelated errors, expected error goes down, and on average they do better than a single classifier
How does boosting work? - Answer>>> Tries to reduce bias in weak learners. Each model is good at different parts of input space, and on average they do better than a single classifier
How do we do bagging? - Answer>>> Given a dataset of N points, sample N training points with replacement and train a model. Repeat this M times
How does bagging work with regression? - Answer>>> At test time, run each model and average their output
How does bagging work with classification? - Answer>>> Take the majority vote
When should we use bagging? - Answer>>> When your strong learners overfit the dataset, and when you have a reasonably-sized dataset
What's a convenient implementation idea unique to bagging? - Answer>>> Each ensemble member can be trained in parallel, rather than in sequence. Boosting requires sequential training
How do random forests work? - Answer>>> 1) Train an ensemble of decision trees with bagging. 2) During learning, at each split only consider a random subset of attributes/thresholds when selecting what to split on (√d features used often). 3.) Select majority vote from forest
How do we re-weight training data when boosting? - Answer>>> Assign importance values, inversely proportional to the weighted sum of distances to points which are not fit well as you add new models.
How do we weight models in the "committee" when boosting? - Answer>>> Weight each model based on the error rate (really, classifier quality)
Does bagging help reduce bias or variance? - Answer>>> Bagging reduces variance, especially in strong learners
How does the correlation between model outputs effect the performance of a bagged ensemble? - Answer>>> As correlation goes down, ensemble performance increase goes up
Why would we want to introduce additional randomness in Random Forests? - Answer>>> The greedy decision tree learning algorithm will likely use the same attributes early on, despite resampling.
Does boosting help reduce bias or variance? - Answer>>> Boosting reduces bias, especially in weak learners
How does L2 boosting work? - Answer>>> We search for the models and weights that minimize error over the final model
How does Adaboost work? - Answer>>> Initialize importance weights to 1. For each model,{ train the classifier to minimize weighted exponential loss. Then compute the weighted error of the classifier, and the classifier quality. Update weights }
What two characteristics describe clustering techniques? - Answer>>> Grouping all given examples (exhaustive) into disjoint clusters (partitional) such that within-cluster examples are similar and without-cluster examples are different
What are partition algorithms? - Answer>>> "Flat" clusterings, whereby each point belongs to exactly one cluster. E.g.: k-means, k-medioids, Gaussian mixture models (GMMs)
What are hierarchical algorithms for clustering? - Answer>>> "Hilly" clusterings, where by each point often belongs to more than one cluster, and local internal clustering is common. Bottom-up is agglomerative, and top-down is divisive
What is the k-means clustering algorithm? - Answer>>> Initialize k centroids randomly. While the algorithm hasn't converged, take the average position of all the points in each centroid, and assign this point to be the new centroid center. Then, return the centroids and associations
How do we choose k for k-means? - Answer>>> Look for the elbow/knee on a graph of SSE vs k
What is a disadvantage of k-means? - Answer>>> It's highly initialization-dependent
What is the identifiability problem for GMMs? - Answer>>> Log-likelihood in GMMs has multiple identical maxima. No easy fix, but of limited harm, although it may slow convergence.
How does EM behave when constructing GMMs? - Answer>>> Guaranteed to converge to a local maxima in finitely many steps, although may be slow. Not guaranteed to find global optima.
How do we deal with nonoptimality in GMMs? - Answer>>> Restart multiple times, and choose the one with the highest log-likelihood
How do we interpret GMMs? - Answer>>> They produce a full density model of the data, so you can sample new synthetic data or evaluate the probability at an untested point
How do we get from GMMs to k-means? - Answer>>> 1) Assume a hard-assignment frather than fractional/probabilistic, and 2) assume all gaussians have the same isotropic covariance matrix
What is clustering? - Answer>>> An unsupervised method for roughly separating probable classes by groupings in input space
What is k-means? - Answer>>> An algorithm for performing unsupervised clustering
How is k-means implemented? - Answer>>> Initialize k centroids. Iterate through centroids, taking the mean of the data assigned to each as the new, updated position for each centroid ci. Continue until no updates to labels.
What does k-means optimize? - Answer>>> Sum of squared error for a given number of clusters, k
How is coordinate descent related to the k-means algorithm? - Answer>>> Coordinate descent optimizes two variables by switching between them and performing gradient ascent for log likelihood.
Is the k-means algorithm guaranteed to converge? If so, to local or global optima? - Answer>>> Yes, in finitely-many steps, but to a local minimum.
How do we pick hyperparameters for k-means? - Answer>>> By observing the "elbow" on the SSE-vs-k graph
Is k-means sensitive to outliers? - Answer>>> Yes, very much so!
Is k-means sensitive to initialization? - Answer>>> Yes, to find an optimal clustering, run multiple times and find the one with lowest SSE
What types of clusters does k-means work best for? - Answer>>> Isotropic, nonoverlapping spherical clusters
What sort of model does GMM assume generated the data? - Answer>>> Gaussian model! Not necessarily isotropic, and not necessarily the same size
What can GMM do that k-means can't? - Answer>>> Model wide/long distributions, model a collection of distributions of different sizes/radii
Why is maximum marginal likelihood difficult to optimize? - Answer>>> Exact solutions are only known for a small class of distributions, so numerical integration techniques are often needed
What is the Expectation Maximization algorithm do at a broad level? - Answer>>> Attempts to search for the global maximum of log likelihood for generating the data that's provided according to some mixture of gaussians
What are some challenges in GMM optimization? - Answer>>> Identical distributions can create a very challenging optimization
What assumptions must be made in GMM in order to recover the k-means algorithm? - Answer>>> Isotropic distributions, spherical distributions
What is a "link function"? - Answer>>> A class of functions which measures the distance between multiple clusters. Examples are single-link, complete-link, centroid, and average-link. Average link is most robust and most often used
How do the different link functions behave? - Answer>>> Single link tends to make long, snaky clusters. Complete link tends to ??? Centroid works well with spherically-shaped data. Average link is highly robust, and thus most commonly used
What is a dendrogram? - Answer>>> A visualization of a clustering process using hierarchical agglomerative clustering.
What sort of relationships can PCA not identify? - Answer>>> Parallel relationships where data points have labels
Why might applying PCA as a preprocessing step lead to issue? - Answer>>> It may reduce variance of interest in the dataset, because it was not examined by a person beforehand
What is a sequential decision process and how does it differ from standard machine learning problems? - Answer>>> Sequential decision making tasks' outputs changes the next input that is received.
What is a Markov Decision Process? - Answer>>> A MDS is a decision process defined by a set of possible states S, a set of possible actions A, a reward function R:S→ℝ, and a transition function T:SxA→Ω_S. It is defined by the Markov assumption
What is a state in a MDS? - Answer>>> A place where the learning agent can exist or occupy in its environment
What is an action in a MDS? - Answer>>> A possible decision the agent can take, not necessarily but frequently impacting the environment and the success or failure of the agent
What is a transition function in a MDS? - Answer>>> A mapping between state-action pairs and a distribution over next states
What is a reward function in a MDS? - Answer>>> A mapping between states and rewards
What is a behavior policy in a MDS? - Answer>>> A mapping from states to actions (or distributions over actions)
What is model-free vs model-based reinforcement learning? - Answer>>> Model-free directly learns a policy, while model-based learns the transition function and reward function from observation and then use these to find best policy
What is the principal behind policy-gradient methods like REINFORCE? - Answer>>> If trajectory reward is positive, push up the probabilities of all the actions leading to that trajectory. If negative, push down those action probabilities
What is imitation learning and how does it differ from reinforcement learning? - Answer>>> Rather than using feedback from the environment, IL attempts to mimic an expert demonstration of a trajectory set
What is behavior cloning and what are its drawbacks? - Answer>>> A type of imitation learning. Very simple, and works well when minimizing one-step deviation is sufficient. Unfortunately, errors compound and data distribution mismatch can interfere with training
When should behavior cloning be used? - Answer>>> When the state space is well-covered by the demonstrator, when recovering from 1-step deviations is easy, and to pre-train before doing a full RL approach
Methods that can turn any binary classifier into a multiclass classifier - Answer>>> One-vs-all, all-vs-all, and tree classifier. While general, this can require training quite a few models.
Softmax function - Answer>>> Takes in a d-dimensional vector of exponentiated activations which contains the activation for each of d classes, with each class activation divided by the sum of all d activations. This outputs a normalized d-dimensional vector such that all elements sum to one.
In multiclass logistic regression, the total number of learned weight vectors for a C class problem. - Answer>>> C or C-
Artificial neurons - Answer>>> Behave very differently than their biological counterpart
Capability of single-activation neuron - Answer>>> Can represent non-linear boundaries in classification problems.
ReLUs - Answer>>> Tends to converge fast because they do not saturate for positive inputs like Sigmoid.
Loss function - Answer>>> Measures how big an error predicted by a network is from the ground truth. Generally decreases when plotted versus number of epochs when training a neural network.
Jacobian - Answer>>> A matrix filled with partial derivatives of each dimension of vector v with respect to each dimension of vector u. Thus, it's a high-dimensional gradient.
How is an all-vs-all classifier used to make predictions? - Answer>>> Run all models on a new input and see which class is predicted the most frequently.
What are pros of all-vs-all classifiers? - Answer>>> Simple to implement, and rarely ties between classes.
What are cons of all-vs-all classifiers? - Answer>>> Weaker error bound than one-vs-all classifiers, and you have to learn and run many classifiers.
What is a tree classifier? - Answer>>> Train half-vs-half classifiers to form a binary tree of decision boundaries. Follow the decision path to classify a new input
What are pros of tree classifiers? - Answer>>> Strong error bound (log_2 K)*ε, and not too many classifiers to learn
What are cons of tree classifiers? - Answer>>> Have to select splits somehow (good or bad)