0% found this document useful (0 votes)
26 views4 pages

Module 2 Quiz: Regression Techniques

This document summarizes a student's attempt at a module 2 quiz on linear and logistic regression. The student answered 11 multiple choice questions and received full credit on 9 questions and partial credit on 2 questions, achieving an overall score of 80%.

Uploaded by

anjibalaji52
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views4 pages

Module 2 Quiz: Regression Techniques

This document summarizes a student's attempt at a module 2 quiz on linear and logistic regression. The student answered 11 multiple choice questions and received full credit on 9 questions and partial credit on 2 questions, achieving an overall score of 80%.

Uploaded by

anjibalaji52
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

7/13/22, 11:13 PM Module 2 Quiz: Attempt review

d Summer CSC 7333 for Jianhua Chen / Module 2: Linear Regression and Logistic Regression / Module 2 Quiz

Started on Wednesday, July 13, 2022, 10:58 PM


State Finished
Completed on Wednesday, July 13, 2022, 11:13 PM
Time taken 15 mins 6 secs
Grade 80.00 out of 80.00 (100%)

Question 1
Correct 5.00 points out of 5.00

The objective function for linear regression measures the mean squared errors between predicted y
value and the desired target y value, and thus should be minimized.

Select one:
A. True 
B. False

Question 2
Correct 10.00 points out of 10.00

Select ALL statements below that are true for linear regression:

Select one or more:


A. Linear regression handles classification problems instead of regression problems.
B. In linear regression, the optimal hypothesis hθ can be obtained analytically without gradient descent search. 
C. Linear regression can model a non-linear function of the original input variables by using polynomial features. 
D. If we use mean squared error as the loss function for training a linear regression model, the loss function is convex. 

E. The output of a linear regression model should always be in the interval [0, 1].

Question 3
Correct 10.00 points out of 10.00

When doing gradient descent to learn the best to minimize loss in linear regression, which of the
following is the correct formula for the update of j? Here > 0 is the learning rate.

Select one:
A. ∂J
θj ← θj + η ∗
∂θj
B. ∂J 
θj ← θj − η ∗
∂θj
C. ∂J
θj ← θj +
∂θj
D. θj ← (1−η)∗θj

[Link] 1/4
7/13/22, 11:13 PM Module 2 Quiz: Attempt review

Question 4
Correct 5.00 points out of 5.00

In the training data for logistic regression, the desired target variable y value is continuous-valued.

Select one:
A. True
B. False 

Question 5
Correct 10.00 points out of 10.00

Select ALL statements below that are true for logistic regression:

Select one or more:


A. One can solve for the optimal hypothesis h analytically without using gradient descent.
B. Logistic regression handles classification problems instead of regression problems. 
C. The sigmoid function used in logistic regression is a non-linear function. 
D. If we use mean squared error as the loss function for training a logistic regression model, the loss function is convex
E. The output of a logistic regression model can be interpreted as a probability. 

Question 6
Correct 10.00 points out of 10.00

Select ALL scenarios below such that regularization would help avoid overfitting when doing gradient
descent for linear (or logistic) regression:

Select one or more:


A. There are many input variables, and possibly not all of them are relevant to the target variable. 
B. There are many training data points.
C. We are using polynomial features with a polynomial of high degree. 
D. There are few input variables.

Question 7
Correct 5.00 points out of 5.00

When we scale/normalize the features for regression, we would scale/normalize ALL features,
including the dummy input variable x0 = 1.

Select one:
A. True
B. False 

[Link] 2/4
7/13/22, 11:13 PM Module 2 Quiz: Attempt review

Question 8
Correct 5.00 points out of 5.00

When applying regularization for logistic regression, regularization is applied to ALL parameters
j , including the parameter 0

Select one:
A. True
B. False 

Question 9
Correct 10.00 points out of 10.00

You are running gradient descent (with learning rate = 0.1) for linear regression with mean square
error as the loss function. You have tested the loss function implementation and are pretty sure that
the loss function is implemented correctly. You plot the loss function curve for the first 30 epochs and
found that the loss is increasing with the number of epochs.

What is your explanation of this scenario?

Select one:
A. The gradient descent procedure is working fine, nothing wrong here.
B. The learning rate is too small and should be increased.
C. The learning rate is probably too high and should be reduced. 

D. The data is noisy and nothing can be done here.

Question 10
Correct 5.00 points out of 5.00

When applying regularization for linear (or logistic) regression, the value for the parameter λ needs to
be selected. If λ value is set too big, what can happen?

Select one:
A. It can cause the resulting model h to overfit the training data
B. It would make gradient descent converge faster
C. It would cause the resulting model h to underfit – i.e., the model performs poorly on both the training and testing data 
D. It would not cause any problem

[Link] 3/4
7/13/22, 11:13 PM Module 2 Quiz: Attempt review

Question 11
Correct 5.00 points out of 5.00

When we have multiple input variables or using polynomial features in linear (or logistic) regression, it
is beneficial to scale/normalize the features, so that gradient descent would run well.

Select one:
A. True 
B. False

Jump to...

[Link] 4/4

Common questions

Powered by AI

Regularization is useful in conditions where there are many input variables, possibly including irrelevant ones, or when using polynomial features of high degree. Both scenarios can lead to a model with high variance, which fits noise rather than the underlying data distribution, thus regularization helps by penalizing large coefficients to promote simpler models .

Using polynomial features with a high degree can lead to overfitting, as the model may become too complex to generalize well on unseen data. Regularization helps to mitigate this by penalizing the magnitude of the coefficients, thus encouraging simpler models that generalize better .

A very large regularization parameter λ can cause the model to underfit the training data. This happens because the penalty on the size of coefficients is so strong that the model becomes overly simplistic, failing to capture the underlying patterns in the data, leading to poor performance on both training and testing datasets .

Interpreting the output of a logistic regression model as a probability implies that the model predicts the likelihood that a given input belongs to a particular class. The sigmoid function outputs values between 0 and 1, which can be directly treated as the probability of the input instance being in the positive class .

The convexity of the mean squared error loss function ensures that there is a single global minimum, making it easier for the optimization algorithm, such as gradient descent, to find this minimum. This property leads to stable convergence .

When the learning rate is too high, the updates to the parameters are excessively large, potentially causing the cost function to increase instead of decreasing over iterations. This happens because the algorithm overshoots the minimum of the cost function, failing to converge properly .

Normalizing features ensures that all input variables are on the same scale, which helps in accelerating the convergence of the gradient descent algorithm. When features are on vastly different scales, the cost function can become elongated, potentially causing gradient descent to take inefficient paths while searching for the minimum .

Applying regularization to the intercept parameter is typically incorrect because the intercept doesn't contribute to the model complexity in the same way as the weights for the other input variables do. Regularizing it can thus distort the model's bias term and lead to suboptimal fit .

Scaling or normalizing the dummy input variable x=1 is unnecessary and technically incorrect, as it is meant to always equal one and thus acts as a baseline for the intercept term in the model .

In logistic regression, it handles classification problems rather than regression problems. The sigmoid function, which is used in logistic regression, is non-linear, and the output of the model can be interpreted as a probability .

You might also like