WorksheetsML
Total questions: 30
Worksheet time: 16mins
A computer program is said to learn from experience E with
respect to some task T and some performance measure P if its
performance on T, as measured by P, improves with experience E.
Suppose we feed a learning algorithm a lot of historical weather
data, and have it learn to predict weather. In this setting, what is the task T?
The weather prediction
The process of the algorithm examining a large amount of historical weather data
The probability of it correctly predicting future weather
None of the above
What does a classification algorithm do?
Predicts real number responses such as changes in temperature, date, or time
Assigns data to a predefined category
Clusters responses in groups based on similarity, to find patterns
Compares predicted data classifications to the actual class labels in the data
Suppose you are working on weather prediction, and your weather station makes one of three predictions for each day's weather:
Sunny, Cloudy or Rainy. You'd like to use a learning algorithm to predict tomorrow's weather.
Would you treat this as a classification or a regression problem?
Regression
Classification
In a typical machine learning problem, what's the right order for the following decisions:
1- Choose a hypothesis function
2- Choose a cost function
3- Choose an optimization algorithm
1- Choose an optimization algorithm
2- Choose a cost function
3- Choose a hypothesis function
1- Choose a cost function
2- Choose an optimization algorithm
3- Choose a hypothesis function
1- Choose a cost function
2- Choose a hypothesis function
3- Choose an optimization algorithm
The gradient descent is:
A cost function
An hypothesis function
An optimization algorithm
What is overfitting?
When a predictive model is accurate but takes too long to run
When you apply a powerful deep learning algorithm to a simple machine learning problem
When the model learns specifics of the training data that can’t be generalized to a larger data set
When you perform hyperparameter tuning and performance degrades
What kind of table compares classifications predicted by the model with the actual class labels?
Chaos table
Prediction plot
Confusion matrix
Residual plot
The goal of the gradient descent is:
To find the set of parameters that minimizes the cost function
To find the set of parameters that maximizes the cost function
The Learning Rate is an hyper parameter in Gradient Descent used to update the parameters in the optimisation problem, which of the following is true?
If it's too small, the convergence will be slower
If it's too small, the convergence will be quicker
If it's too large, we are sure to find the local optimum
If it's too large, we may overshoot the local optimum
In logistic regression, the output of the model is:
A probability between 0 and 1
Either 0 or 1
Any real number
Which of the following is true:
In linear regression, we use the Least Square function as a cost function.
In linear regression, we use the Log Loss function as a cost function.
In logistic regression, we use the Least Square function as a cost function.
In logistic regression, we use the Log Loss function as a cost function.
The log loss function is defined as:
Decision Trees Algorithm can be used for
Regression only
Classification only
Both
The technique in which we grow a tree to its maximum size, then remove some of its sub-nodes is called
Un-Splitting
De-Splitting
Pruning
The R2 score is better suited for:
Regression tasks
Classification tasks
In classification, a False Positive is when:
The model predicts TRUE and the real observation is TRUE
The model predicts TRUE and the real observation is FALSE
The model predicts FALSE and the real observation is TRUE
The model predicts FALSE and the real observation is FALSE
If we are building a cancer detection model (predict TRUE if cancer, FALSE if not), we would rather want to minimize:
The false positive errors (Type 1 errors)
The false negative errors (Type 2 errors)
If we are building a spam detection model (predict TRUE if spam, FALSE if not), we would rather want to minimize:
The false positive errors (Type 1 errors)
The false negative errors (Type 2 errors)
If we are dealing with a highly unbalanced dataset (0.01% of TRUE labels) we should prefer:
The accuracy (Number of correct predictions / total)
The recall (Number of correctly predicted positives / total of actual positives)
Question 2
Suppose you ran regularized logistic regression twice, once with λ=0 , and once with λ=1 . You get two different θ parameters: θ1=[74.81 , 45.05] and
Which one corresponds to λ=1 ?
θ1=[74.81 , 45.05]
θ2=[1.37 , 0.51]
In which one of the following figures do you think the hypothesis has overfit the training set?
In which one of the following figures do you think the hypothesis has underfit the training set?
Which one is true ?
The more complex a model is, the lower its Bias and the higher its Variance.
The more complex a model is, the higher its Bias and the lower its Variance.
Which of the following diagrams represents the high bias, low variance situation?
Which of the following diagrams represents the low bias, high variance situation?
Regularization helps:
To decrease the model's bias
To decrease the model's variance
To decrease the model's complexity
What's the difference between the model's parameters and the model's hyper-parameteres?
The model's parameters are learned during the training and the model's hyperparameters are specified outside of the training
The model's parameters are learned outside of the training and the model's hyperparameters are specified during the training
Which of the following feature engineering techniques are used for continuous variables?
Binarization
One-hot encoding
Quantization
Min-max scaling
Bin counting
Which of the following feature engineering techniques are used for categorical variables?
Binarization
One-hot encoding
Quantization
Min-max scaling
Bin counting
Which one of these two techniques is more scalable/efficient?
One-hot encoding
Feature hashing
