Machine Learning Supervised
118 flashcards · Computer Science · by Sarah Zoe Koch
What is the generalization error (GE)?
The GE is the expected loss on future data for a given model
Give the definition (formula) of the GE:
In practice, we want to minimize the empirical risk RempR_{emp}Remp on our data set (Empirical Risk Minimization. Give the definition of RempR_{emp}Remp :
For what do we need our data to be independent and identically distributed (i.i.d.)?
For estimating the generalization error via the empirical risk
T/F: A good estimation of the generalization error via the empirical risk generally requires a large number of samples
True
T/F: A good estimation of the generalization error via the empirical risk generally requires use of a differentiable loss function
False
T/F: A good estimation of the generalization error via the empirical risk generally requires that data points are uniformly distributed
False
What are ROC curves used for?
shows the performance of a binary classifier model (can be used for multi class classification) at varying threshold values
What does the ROC curve plot?
The ROC curve is the plot of the true positive rate (TPR) against the false positive rate (FPR) at each threshold setting
T/F: Cross validation can help to optimize model hyperparameters
True
T/F: Having a small training error but a large test error indicates the problem of underfitting
False, this indicates the problem of overfitting
How does the model variance behave with increasing model class complexity?
The model variance typically increases
T/F: Bias typically decreases with increasing model class complexity
True
T/F: Bias typically increases with increasing model class complexity
False, it decreases
How does the unavoidable error behave when training a model poorly?
It stays the same
How does the unavoidable error behave when training a model "perfectly"?
It stays the same
Give a short description of Bayes Optimal Classifier:
BOC is a probabilistic model that makes the most probable prediction for a new sample
T/F: Supervised machine learning uses explicit knowledge to design models deductively
False, this is True for explicit models. Supervised machine learning uses previously observed data to create a model inductively
Considering KNNs. Is it Underfitting or Overfitting: k=1
Overfitting
What do KNNs use a distance measure for?
For measuring closeness
T/F: KNN can also be used for regression
True
T/F: KNN can work with unlabeled data
False
T/F: KNN can work with labeled data
True
T/F: Support vector regression only uses the sign of the discriminant function.
False. The support vector regression uses the magnitude and not only the sign of the discriminant function
Which value does the Lagrange parameter αi{\alpha}_iαi need for a sample fxif{x}_ifxi to be a support vector?
the corresponding lagrange parameter αi{\alpha}_iαi needs to be strictly larger than 0
T/F: Kernels allow to transform data into a lower-dimensional space where separability can be easier achieved
False
T/F: The mathematical problem (constrained convex optimization) has a global solution
True
T/F: The mathematical problem (constrained convex optimization) does not have a global solution
False
Give the form of the Gaussian Kernel:
Give the form of the Polynomial Kernel:
Give the form of the Sigmoid Kernel:
T/F: SVMs work effectively if the number of dimensions (features) ddd is much smaller than the number of samples lll
False. It works most effectively when the number of dimensions is greater than the number of samples
T/F: SVMs work effectively if the number of dimensions (features) ddd is bigger than the number of samples lll
True
Multi-class classification with SVMs: T/F: Training pairwise classifiers is usually more time costly due to smaller training sets
False, it is less time costly
Multi-class classification with SVMs: T/F: Training pairwise classifiers is usually less time costly due to bigger training sets
False, due to smaller training sets
Multi-class classification with SVMs: T/F: Training pairwise classifiers is usually more time costly due to smaller training sets
True
Multi-class classification with SVMs: How many classifiers (SVMs) are trained in the 1 vs 1 approach?
M(M−1)2\frac{M(M-1)}{2}2M(M−1)
Multi-class classification with SVMs: T/F: In the 1 vs all approach there are M−1M-1M−1 classifiers (SVMs)
False
Multi-class classification with SVMs: T/F: In the one-versus-all approach, the final classification is done by majority vote
False
Multi-class classification with SVMs: T/F: In the one-versus-one approach, the final classification is done by choosing the class which produces the largest value of all classifiers
False
Multi-class classification with SVMs: T/F: In SVM-based multi-class classification, a multi-class problem is divided into many binary classifications tasks
True
Multi-class classification with SVMs: T/F: In SVM-based multi-class classification, a multi-class problem is divided into two binary classifications tasks
False, they are divided into two binary classification tasks
Multi-class classification with SVMs: T/F: In SVM-based multi-class classification, a single-class problem is divided into many binary classifications tasks
False, a multi-class problem is divided into many binary classification tasks
Give the explanation of a decision tree:
= is a predictive model to go from observations about an item (represented in the branches) to conclusions about the item's target value (represented in the leaves)
What do the leaves represent in a decision tree?
the item's target value
What do the branches represent in a decision tree?
the observations of an item
Why does Decision Tree Learning part the training data hierarchically?
Such that leaf nodes are homogeneous in terms of the target class
T/F: Classification Trees are mainly designed for continuous data.
False, for categorical data
T/F: Classification Trees are mainly designed for categorical data.
True
T/F: Regression Trees can be applied to numerical features.
True
T/F: Regression Trees can be applied to classification features.
False
Decision Trees: What do we use the Stopping criterion and Pruning for?
They are relevant for adjusting the complexity of decision trees
Decision Trees: What does the Stopping Criterion do?
It tells when to stop further growing of the tree
Decision Trees: What does Pruning do?
Tells us whether/how to collapse unnecessarily deep sub-trees
Decision Trees: Binary splits: T/F: The number of leaf nodes in a tree cannot be larger than 2S2^S2S with SSS being the number of splits
True
Decision trees: What does a split maximize and what is the result of this? What is the criterion for the produced subsets?
A split maximizes the information gain if the produced subsets are completely homogeneous
Decision Trees: T/F: Decision tree learning algorithms recursively split the training set into subsets
True
Decision Trees: T/F: Decision tree learning algorithms recursively split the test set into subsets
False, it splits the training set
Give an explanation of the Gini Impurity:
it gives the probability of incorrectly classifying randomly chosen element in a dataset if it were randomly labeled according to the class distribution in the dataset
What is the maximal and minimal Gini Impurity of a data set with MMM classes ?
max: (1−1M)(1-\frac{1}{M})(1−M1) if classes are uniformly distributed in the set min: 000 if all samples of the set belong to one single class
When is the Gini Impurity equal to 0 ?
If all samples of the set belong to one single class
T/F: Decision trees can be applied to categorical, but not to numerical features
False, They can be applied to both. Regression Trees for numerical features
T/F: The decision tree complexity is adjusted via the stopping criterion and via pruning
True
T/F: Information gain is a common splitting criterion for regression.
False, for Classification
What is a common splitting criterion for Regression?
Variance Reduction
Besides Information Gain, what is a common splitting criterion for Classification?
Gini Impurity
Decision Trees: non-binary splits: T/F: The number of leaf nodes in a tree cannot be larger than 2S2^S2S with SSS being the number of splits
False, this is only True for binary splits
What is a common measure of variable importance in random forests?
The mean decrease in Gini Impurity
T/F: A random forest in general has smaller bias than the individual trees
False
T/F: In AdaBoost, the less accurate the weak classifiers are, the higher the influence they are given for the classification output
False
T/F: In a random forest, each individual decision tree is built upon a random bootstrap subsample of the original data set
True
T/F: Gradient Boosted Trees are generally easier to tune compared to Random Forests
False
What is forward stagewise additive modelling?
A robust boosting method which can be applied to different loss functions
T/F: In Boosting, the main idea is that those samples which led to a small error (i.e. were classified well) in an iteration get a larger weight in the next iteration.
False
T/F: In general, ensemble methods aim at reducing the bias and increasing the variance.
False
In Logistic Regression: Can the loss function be minimized by gradient descent?
Yes
Shortly, explain what gradient descent is:
Gradient descent is an optimization algorithm for finding a local minimum of a differentiable function. It is used to find the values of the parameters which minimize the loss function
T/F: Logistic Regression is a non-convex problem as can be seen by the positive-semidefiniteness of the Hesse matrix
False
Which form does the sigmoid function have?
σ(x)=11+e−x\sigma(x) = \frac{1}{1+e^{-x}}σ(x)=1+e−x1
The sigmoid function has the form: 1−x−11-x^{-1}1−x−1
False, it has the form 11+e−x\frac{1}{1+e^{-x}}1+e−x1
T/F: Assume that yyy data are generated around a function g(x)g(x)g(x) with Gaussian noise. Maximizing the negative log-likelihood of observing the data is equivalent to minimizing the squared error between yyy and g(x)g(x)g(x) .
False
T/F: The momentum term in gradient descent is particularly helpful in flat regions of the loss function
True
T/F: The momentum term in gradient descent is particularly helpful in hilly regions of the loss function
False, in flat regions
T/F: Logistic regression has no closed-form solution
True
T/F: Logistic regression has a closed-form solution
False
Which function is also known as the Boltzmann distribution?
The softmax function
For which classification tasks is the softmax function suitable?
For multi-class classification tasks
If g(xi;w,ϕ)=0g(x_{i}; w, \phi) = 0g(xi;w,ϕ)=0 and yi=1y_{i} = 1yi=1 what is the update rule for the weight vector?
w:=w+ηxiw := w+\eta x_{i}w:=w+ηxi
T/F: If the data set is not linearly separable, then there exists a stopping criterion such that with probability 1 the perceptron learning algorithm will terminate and solve the learning task
False, only if the data set is linearly seperable
T/F: If the data set is linearly separable, then there exists a stopping criterion such that with probability 1 the perceptron learning algorithm will terminate and solve the learning task
True
T/F: If g(xi;w,ϕ)=1g(x_{i}; w, \phi) = 1 g(xi;w,ϕ)=1 and yi=0y_i = 0yi=0 then the update rule for the threshold is: ϕ=ϕ−η\phi = \phi-\etaϕ=ϕ−η
False
T/F: A perceptron can solve the XOR problem, but only in certain instances (i.e. not with probability 1) when the algorithm terminates.
False
T/F: The final solution (values of the and ) of the perceptron learning algorithm is always unique
False
T/F: The final solution (values of the and ) of the perceptron learning algorithm is not always unique
True
T/F: The perceptron is a simple linear threshold unit
True
What is Double descent?
As model complexity increases, the test error decreases, increases and decreases again (overfitting in the end)
T/F: Double descent is the phenomenon that the test risk first decreases with increasing number of parameters, then increases up to the interpolation threshold, and then decreases again. The final decrease takes place in the so-called over-parametrized regime, where there are more data points than parameters
False
T/F: Multi-layer perceptrons are equivalent to fully connected feed-forward neural networks
True
T/F: Multi-layer perceptrons are almost equivalent to fully connected feed-forward neural networks
False, they are equivalent
What is the gradient descent update rule?
wnew=wold−ηδwRw_{new} = w_{old} - \eta \delta_{w}Rwnew=wold−ηδwR