
Linear Regression in Python – Quiz 1

Quiz
•
Computers
•
University
•
Medium
Emily Anne
Used 1+ times
FREE Resource
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the main purpose of linear regression?
To classify data into categories
To cluster data into groups
To find a linear relationship between the features and the dependent variable
To reduce the dimensionality of data
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the .fit() method do in LinearRegression()?
Plots the regression line
Evaluates the model accuracy
Trains the model on the given data
Predicts values using the trained model
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function is used to make predictions once the model is trained?
model.evaluate()
model.transform()
model.predict()
model.prediction()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you access the coefficient (slope) of the regression line in a trained model?
model.bias_
model.weights_
model.coef_
model.slope_
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the model.intercept_ attribute represent?
The root mean square error
The slope of the regression line
The predicted value
The y-intercept of the regression line
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What metric is commonly used to evaluate the performance of a linear regression model?
Confusion Matrix
R-squared (R²) Score
F1 Score
Recall
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a correct way to visualize a simple linear regression result?
sns.heatmap()
plt.scatter() + plt.plot()
plt.hist()
sns.pairplot()
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will happen if the input features are not reshaped before fitting in scikit-learn (e.g., 1D array)?
Nothing, it will work
A warning will be shown
An error will occur because X must be 2D
The model will ignore the shape
Similar Resources on Wayground
10 questions
MPB Week 6

Quiz
•
University
7 questions
Data Mining

Quiz
•
University
6 questions
Data Preparation - Forecasting the price of a house

Quiz
•
University
10 questions
Machine learning Quiz 3

Quiz
•
University
10 questions
Machine Learning Internal Examination

Quiz
•
University
13 questions
OOP and Data Management Quiz

Quiz
•
University
5 questions
SOFTWARE TESTING TEST-5

Quiz
•
University
10 questions
Intro to Machine Learning Quiz

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University