SlideShare a Scribd company logo
1 of 3
Download to read offline
Assignment 2
Introduction to Machine Learning
Prof. B. Ravindran
1. The parameters obtained in linear regression
(a) can take any value in the real space
(b) are strictly integers
(c) always lie in the range [0,1]
(d) can take only non-zero values
Sol. (a)
2. Suppose that we have N independent variables (X1, X2, . . . Xn) and the dependent variable
is Y . Now imagine that you are applying linear regression by fitting the best fit line using
the least square error on this data. You found that the correlation coefficient for one of its
variables (Say X1) with Y is -0.005.
(a) Regressing Y on X1 mostly does not explain away Y .
(b) Regressing Y on X1 explains away Y .
(c) The given data is insufficient to determine if regressing Y on X1 explains away Y or not.
Sol. (a)
The absolute value of the correlation coefficient denotes the strength of the relationship. Since
absolute correlation is significantly less, regressing Y on X1 mostly does not explain away Y .
3. (2 marks) Consider the following five training examples
x y
2 7
3 8.6
4 3
5 11.5
6 22
We want to learn a function f(x) of the form f(x) = ax + b which is parameterised by (a, b).
Using mean squared error as the loss function, which of the following parameters would you
use to model this function to get a solution with the minimum loss?
(a) (4, 3)
(b) (1, 4)
(c) (4, 1)
(d) (3, 4)
Sol. (b)
1
4. The relation between studying time (in hours) and grade on the final examination (0-100) in
a random sample of students in the Introduction to Machine Learning Class was found to be:
Grade = 30.5 + 15.2 (h)
How will a student’s grade be affected if she studies for four hours?
(a) It will go down by 30.4 points.
(b) It will go down by 30.4 points.
(c) It will go up by 60.8 points.
(d) The grade will remain unchanged.
(e) It cannot be determined from the information given
Sol. (c)
The slope of the regression line gives the average increase in grade for every hour increase in
studying. So, if studying is increased by four hours, the grade will increase by 4(15.2) = 60.8.
5. Which of the statements is/are True?
(a) Ridge has sparsity constraint, and it will drive coefficients with low values to 0.
(b) Lasso has a closed form solution for the optimization problem, but this is not the case
for Ridge.
(c) Ridge regression does not reduce the number of variables since it never leads a coefficient
to zero but only minimizes it.
(d) If there are two or more highly collinear variables, Lasso will select one of them randomly.
Sol. (c),(d)
Refer to the lecture
6. Consider the following statements:
Assertion(A): Orthogonalization is applied to the dimensions in linear regression.
Reason(R): Orthogonalization makes univariate regression possible in each orthogonal dimen-
sion separately to produce the coefficients.
(a) Both A and R are true, and R is the correct explanation of A.
(b) Both A and R are true, but R is not the correct explanation of A.
(c) A is true, but R is false.
(d) A is false, but R is true.
(e) Both A and R are false.
Sol. (a)
Refer to the lecture
7. Consider the following statements:
Statement A: In Forward stepwise selection, in each step, that variable is chosen which has the
maximum correlation with the residual, then the residual is regressed on that variable, and it
is added to the predictor.
Statement B: In Forward stagewise selection, the variables are added one by one to the previ-
ously selected variables to produce the best fit till then
2
(a) Both the statements are True.
(b) Statement A is True, and Statement B is False
(c) Statement A if False and Statement B is True
(d) Both the statements are False.
Sol. (d)
Refer to the lecture
8. (2 Marks) The linear regression model y = a0 + a1x1 + a2x2 + ... + apxp is to be fitted to a
set of N training data points having p attributes each. Let X be N × (p + 1) vectors of input
values (augmented by 1‘s), Y be N × 1 vector of target values, and θ be (p + 1) × 1 vector of
parameter values (a0, a1, a2, ..., ap). If the sum squared error is minimized for obtaining the
optimal regression model, which of the following equation holds?
(a) XT
X = XY
(b) Xθ = XT
Y
(c) XT
Xθ = Y
(d) XT
Xθ = XT
Y
Sol. (d)
This comes from minimizing the sum of the least squares.
RSS(θ) = (Y − XθT
)(Y − Xθ) (in matrix form)
If we take the derivative and equate it to 0, then we get,
XT
(Y − Xθ) = 0
So,
XT
Xθ = XT
Y, θ = (XT
X)−1
XT
Y.
3

More Related Content

Similar to Assignment2.pdf

Correlation & Regression for Statistics Social Science
Correlation & Regression for Statistics Social ScienceCorrelation & Regression for Statistics Social Science
Correlation & Regression for Statistics Social Sciencessuser71ac73
 
BUS 305 SOLUTIONS TOPRACTICE PROBLEMS EXAM 21) B2) B3.docx
BUS 305 SOLUTIONS TOPRACTICE PROBLEMS EXAM 21) B2) B3.docxBUS 305 SOLUTIONS TOPRACTICE PROBLEMS EXAM 21) B2) B3.docx
BUS 305 SOLUTIONS TOPRACTICE PROBLEMS EXAM 21) B2) B3.docxhartrobert670
 
Econ 103 Homework 2Manu NavjeevanAugust 15, 2022S
Econ 103 Homework 2Manu NavjeevanAugust 15, 2022SEcon 103 Homework 2Manu NavjeevanAugust 15, 2022S
Econ 103 Homework 2Manu NavjeevanAugust 15, 2022SEvonCanales257
 
Page 1 of 18Part A Multiple Choice (1–11)______1. Using.docx
Page 1 of 18Part A Multiple Choice (1–11)______1. Using.docxPage 1 of 18Part A Multiple Choice (1–11)______1. Using.docx
Page 1 of 18Part A Multiple Choice (1–11)______1. Using.docxalfred4lewis58146
 
Lecture 07 graphing linear equations
Lecture 07 graphing linear equationsLecture 07 graphing linear equations
Lecture 07 graphing linear equationsHazel Joy Chong
 
ISI MSQE Entrance Question Paper (2011)
ISI MSQE Entrance Question Paper (2011)ISI MSQE Entrance Question Paper (2011)
ISI MSQE Entrance Question Paper (2011)CrackDSE
 
Correlation by Neeraj Bhandari ( Surkhet.Nepal )
Correlation by Neeraj Bhandari ( Surkhet.Nepal )Correlation by Neeraj Bhandari ( Surkhet.Nepal )
Correlation by Neeraj Bhandari ( Surkhet.Nepal )Neeraj Bhandari
 
Lecture 7 determinants cramers spaces - section 3-2 3-3 and 4-1
Lecture 7   determinants cramers spaces - section 3-2 3-3 and 4-1Lecture 7   determinants cramers spaces - section 3-2 3-3 and 4-1
Lecture 7 determinants cramers spaces - section 3-2 3-3 and 4-1njit-ronbrown
 
IIT JAM MATH 2018 Question Paper | Sourav Sir's Classes
IIT JAM MATH 2018 Question Paper | Sourav Sir's ClassesIIT JAM MATH 2018 Question Paper | Sourav Sir's Classes
IIT JAM MATH 2018 Question Paper | Sourav Sir's ClassesSOURAV DAS
 
ML-UNIT-IV complete notes download here
ML-UNIT-IV  complete notes download hereML-UNIT-IV  complete notes download here
ML-UNIT-IV complete notes download herekeerthanakshatriya20
 
Jam 2006 Test Papers Mathematical Statistics
Jam 2006 Test Papers Mathematical StatisticsJam 2006 Test Papers Mathematical Statistics
Jam 2006 Test Papers Mathematical Statisticsashu29
 
5HBC: How to Graph Implicit Relations Intro Packet!
5HBC: How to Graph Implicit Relations Intro Packet!5HBC: How to Graph Implicit Relations Intro Packet!
5HBC: How to Graph Implicit Relations Intro Packet!A Jorge Garcia
 

Similar to Assignment2.pdf (20)

Correlation & Regression for Statistics Social Science
Correlation & Regression for Statistics Social ScienceCorrelation & Regression for Statistics Social Science
Correlation & Regression for Statistics Social Science
 
BUS 305 SOLUTIONS TOPRACTICE PROBLEMS EXAM 21) B2) B3.docx
BUS 305 SOLUTIONS TOPRACTICE PROBLEMS EXAM 21) B2) B3.docxBUS 305 SOLUTIONS TOPRACTICE PROBLEMS EXAM 21) B2) B3.docx
BUS 305 SOLUTIONS TOPRACTICE PROBLEMS EXAM 21) B2) B3.docx
 
Econ 103 Homework 2Manu NavjeevanAugust 15, 2022S
Econ 103 Homework 2Manu NavjeevanAugust 15, 2022SEcon 103 Homework 2Manu NavjeevanAugust 15, 2022S
Econ 103 Homework 2Manu NavjeevanAugust 15, 2022S
 
Page 1 of 18Part A Multiple Choice (1–11)______1. Using.docx
Page 1 of 18Part A Multiple Choice (1–11)______1. Using.docxPage 1 of 18Part A Multiple Choice (1–11)______1. Using.docx
Page 1 of 18Part A Multiple Choice (1–11)______1. Using.docx
 
Lecture 07 graphing linear equations
Lecture 07 graphing linear equationsLecture 07 graphing linear equations
Lecture 07 graphing linear equations
 
ISI MSQE Entrance Question Paper (2011)
ISI MSQE Entrance Question Paper (2011)ISI MSQE Entrance Question Paper (2011)
ISI MSQE Entrance Question Paper (2011)
 
Correlation by Neeraj Bhandari ( Surkhet.Nepal )
Correlation by Neeraj Bhandari ( Surkhet.Nepal )Correlation by Neeraj Bhandari ( Surkhet.Nepal )
Correlation by Neeraj Bhandari ( Surkhet.Nepal )
 
Lecture 7 determinants cramers spaces - section 3-2 3-3 and 4-1
Lecture 7   determinants cramers spaces - section 3-2 3-3 and 4-1Lecture 7   determinants cramers spaces - section 3-2 3-3 and 4-1
Lecture 7 determinants cramers spaces - section 3-2 3-3 and 4-1
 
Corr And Regress
Corr And RegressCorr And Regress
Corr And Regress
 
IIT JAM MATH 2018 Question Paper | Sourav Sir's Classes
IIT JAM MATH 2018 Question Paper | Sourav Sir's ClassesIIT JAM MATH 2018 Question Paper | Sourav Sir's Classes
IIT JAM MATH 2018 Question Paper | Sourav Sir's Classes
 
Regression
RegressionRegression
Regression
 
stats_ch12.pdf
stats_ch12.pdfstats_ch12.pdf
stats_ch12.pdf
 
Linear Algebra Assignment help
Linear Algebra Assignment helpLinear Algebra Assignment help
Linear Algebra Assignment help
 
ML-UNIT-IV complete notes download here
ML-UNIT-IV  complete notes download hereML-UNIT-IV  complete notes download here
ML-UNIT-IV complete notes download here
 
4 correlation
4 correlation4 correlation
4 correlation
 
Jam 2006 Test Papers Mathematical Statistics
Jam 2006 Test Papers Mathematical StatisticsJam 2006 Test Papers Mathematical Statistics
Jam 2006 Test Papers Mathematical Statistics
 
5HBC: How to Graph Implicit Relations Intro Packet!
5HBC: How to Graph Implicit Relations Intro Packet!5HBC: How to Graph Implicit Relations Intro Packet!
5HBC: How to Graph Implicit Relations Intro Packet!
 
Chapter 14 Part I
Chapter 14 Part IChapter 14 Part I
Chapter 14 Part I
 
Solution 3.
Solution 3.Solution 3.
Solution 3.
 
pml.pdf
pml.pdfpml.pdf
pml.pdf
 

Recently uploaded

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Recently uploaded (20)

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 

Assignment2.pdf

  • 1. Assignment 2 Introduction to Machine Learning Prof. B. Ravindran 1. The parameters obtained in linear regression (a) can take any value in the real space (b) are strictly integers (c) always lie in the range [0,1] (d) can take only non-zero values Sol. (a) 2. Suppose that we have N independent variables (X1, X2, . . . Xn) and the dependent variable is Y . Now imagine that you are applying linear regression by fitting the best fit line using the least square error on this data. You found that the correlation coefficient for one of its variables (Say X1) with Y is -0.005. (a) Regressing Y on X1 mostly does not explain away Y . (b) Regressing Y on X1 explains away Y . (c) The given data is insufficient to determine if regressing Y on X1 explains away Y or not. Sol. (a) The absolute value of the correlation coefficient denotes the strength of the relationship. Since absolute correlation is significantly less, regressing Y on X1 mostly does not explain away Y . 3. (2 marks) Consider the following five training examples x y 2 7 3 8.6 4 3 5 11.5 6 22 We want to learn a function f(x) of the form f(x) = ax + b which is parameterised by (a, b). Using mean squared error as the loss function, which of the following parameters would you use to model this function to get a solution with the minimum loss? (a) (4, 3) (b) (1, 4) (c) (4, 1) (d) (3, 4) Sol. (b) 1
  • 2. 4. The relation between studying time (in hours) and grade on the final examination (0-100) in a random sample of students in the Introduction to Machine Learning Class was found to be: Grade = 30.5 + 15.2 (h) How will a student’s grade be affected if she studies for four hours? (a) It will go down by 30.4 points. (b) It will go down by 30.4 points. (c) It will go up by 60.8 points. (d) The grade will remain unchanged. (e) It cannot be determined from the information given Sol. (c) The slope of the regression line gives the average increase in grade for every hour increase in studying. So, if studying is increased by four hours, the grade will increase by 4(15.2) = 60.8. 5. Which of the statements is/are True? (a) Ridge has sparsity constraint, and it will drive coefficients with low values to 0. (b) Lasso has a closed form solution for the optimization problem, but this is not the case for Ridge. (c) Ridge regression does not reduce the number of variables since it never leads a coefficient to zero but only minimizes it. (d) If there are two or more highly collinear variables, Lasso will select one of them randomly. Sol. (c),(d) Refer to the lecture 6. Consider the following statements: Assertion(A): Orthogonalization is applied to the dimensions in linear regression. Reason(R): Orthogonalization makes univariate regression possible in each orthogonal dimen- sion separately to produce the coefficients. (a) Both A and R are true, and R is the correct explanation of A. (b) Both A and R are true, but R is not the correct explanation of A. (c) A is true, but R is false. (d) A is false, but R is true. (e) Both A and R are false. Sol. (a) Refer to the lecture 7. Consider the following statements: Statement A: In Forward stepwise selection, in each step, that variable is chosen which has the maximum correlation with the residual, then the residual is regressed on that variable, and it is added to the predictor. Statement B: In Forward stagewise selection, the variables are added one by one to the previ- ously selected variables to produce the best fit till then 2
  • 3. (a) Both the statements are True. (b) Statement A is True, and Statement B is False (c) Statement A if False and Statement B is True (d) Both the statements are False. Sol. (d) Refer to the lecture 8. (2 Marks) The linear regression model y = a0 + a1x1 + a2x2 + ... + apxp is to be fitted to a set of N training data points having p attributes each. Let X be N × (p + 1) vectors of input values (augmented by 1‘s), Y be N × 1 vector of target values, and θ be (p + 1) × 1 vector of parameter values (a0, a1, a2, ..., ap). If the sum squared error is minimized for obtaining the optimal regression model, which of the following equation holds? (a) XT X = XY (b) Xθ = XT Y (c) XT Xθ = Y (d) XT Xθ = XT Y Sol. (d) This comes from minimizing the sum of the least squares. RSS(θ) = (Y − XθT )(Y − Xθ) (in matrix form) If we take the derivative and equate it to 0, then we get, XT (Y − Xθ) = 0 So, XT Xθ = XT Y, θ = (XT X)−1 XT Y. 3