Linear Regression in Machine Learning Questions and Answers

This set of Machine Learning Multiple Choice Questions & Answers (MCQs) focuses on “Linear Regression”.

1. In which category does linear regression belong to?
a) Neither supervised nor unsupervised learning
b) Both supervised and unsupervised learning
c) Unsupervised learning
d) Supervised learning
View Answer

Answer: d
Explanation: In linear regression, the dataset is given to the learner. The classification is already done in the training data, from which the learner can learn. Hence, it is supervised learning.

2. The learner is trying to predict housing prices based on the size of each house. What type of regression is this?
a) Multivariate Logistic Regression
b) Logistic Regression
c) Linear Regression
d) Multivariate Linear Regression
View Answer

Answer: c
Explanation: Learner is trying to predict a discrete number instead of binary output (yes or no / 0 or 1, etc.). Hence, it is a linear regression and not a logistic regression. Since there is only one independent variable, it is not multivariate linear regression.

3. The learner is trying to predict housing prices based on the size of each house. The variable “size” is ___________
a) dependent variable
b) label set variable
c) independent variable
d) target variable
View Answer

Answer: c
Explanation: The variable “size” is not dependent on the price of the house. So, it is an independent variable. The variable “price” is dependent on size.
advertisement
advertisement

4. The target variable is represented along ____________
a) Y axis
b) X axis
c) Either Y-axis or X-axis, it doesn’t matter
d) Depends on the dataset
View Answer

Answer: a
Explanation: The target variable is dependent on the other variables. So, it is represented as a function of the independent variable. Thus, it is plotted along the y-axis, after its value is calculated using the function.

5. The learner is trying to predict the cost of papaya based on its size. The variable “cost” is __________
a) independent variable
b) target Variable
c) ranked variable
d) categorical variable
View Answer

Answer: b
Explanation: The cost is dependent on the size of the papaya. It is measured as a function of the size. The learner’s goal is to predict the price of the papaya. Hence, it is the target variable. It is represented along y-axis.

6. The independent variable is represented along _________
a) Either X-axis or Y-axis, it doesn’t matter
b) Y axis
c) X axis
d) Depends on the dataset
View Answer

Answer: c
Explanation: As the name suggests, the independent variable is not dependent on other variables. The target variable’s value is predicted using the value of the independent variable. Thus, it is represented along the x-axis.

7. How many variables are required to represent a linear regression model?
a) 3
b) 2
c) 1
d) 4
View Answer

Answer: a
Explanation: Three variables are required. They are: – 1) m = the number of training examples, 2) x = the independent variable, y = the target variable.
advertisement

8. What does (x(5), y(5)) represent or imply?
a) There are 5 training examples
b) The values of x and y are 5
c) The fourth training example
d) The fifth training example
View Answer

Answer: d
Explanation: In a linear regression model, the set (x(i), y(i)) represents the ith example in the training set. x(i) gives the value of ith x, y(i) gives the ith value of y.

9. Hypothesis h maps from x (independent variable) to y (dependent variable).
a) True
b) False
View Answer

Answer: a
Explanation: The hypothesis is developed by the learner to predict y. It reads the value of x and then uses the mapping function to calculate the value of y for the given value of x.
advertisement

10. Learning algorithm outputs the hypothesis.
a) False
b) True
View Answer

Answer: b
Explanation: The learning algorithm iterates through the training dataset, develops a function with minimal error to predict the value of the target variable based on the value of the independent variable.

More MCQs on Linear Regression:

Sanfoundry Global Education & Learning Series – Machine Learning.

To practice all areas of Machine Learning, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.