
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
Graficas con matlab y pandas
Quiz
•
University
12 questions
6. الشبكة وتوصيلاتها
Quiz
•
University
10 questions
C++ Array Quiz
Quiz
•
University
11 questions
Rekayasa Perangkat Lunak Review
Quiz
•
University
10 questions
Weekly Contest #10 - TechXNinjas
Quiz
•
University
10 questions
Node.js
Quiz
•
University
10 questions
Web Programming Quiz 1
Quiz
•
University
10 questions
Software Testing
Quiz
•
University
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
11 questions
NEASC Extended Advisory
Lesson
•
9th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
Discover more resources for Computers
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
22 questions
FYS 2024 Midterm Review
Quiz
•
University
20 questions
Physical or Chemical Change/Phases
Quiz
•
8th Grade - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
12 questions
1 Times Tables
Quiz
•
KG - University
20 questions
Disney Trivia
Quiz
•
University
38 questions
Unit 6 Key Terms
Quiz
•
11th Grade - University