Which matplotlib function is commonly used to plot the regression line along with the scatter plot of the data?
hist()
scatter()
show()
plot()
How does the Mean Squared Error (MSE) penalize larger errors compared to smaller errors?
It doesn't; all errors are penalized equally.
It uses a logarithmic scale to compress larger errors.
It squares the errors, giving more weight to larger deviations.
It takes the absolute value of the errors, ignoring the sign.
Why is normality of errors an important assumption in linear regression?
It guarantees the homoscedasticity of the errors
It is necessary for the calculation of the regression coefficients
It ensures the linearity of the relationship between variables
It validates the use of hypothesis testing for the model's coefficients
Which of the following is NOT an assumption of linear regression?
Normality of residuals
Multicollinearity
Linearity
Homoscedasticity
If the coefficient of determination (R-squared) for a linear regression model is 0.8, what does this indicate?
20% of the variation in the dependent variable is explained by the independent variable.
80% of the variation in the dependent variable is explained by the independent variable.
There is a weak relationship between the independent and dependent variables.
The model is a poor fit for the data.
What is the main difference between forward selection and backward elimination in linear regression?
Forward selection is used for classification, while backward elimination is used for regression.
There is no difference; both techniques achieve the same outcome.
Forward selection starts with no features and adds one by one, while backward elimination starts with all features and removes one by one.
Forward selection starts with all features and removes one by one, while backward elimination starts with no features and adds one by one.
What does a pattern in the residual plot suggest?
The residuals are normally distributed.
There is no relationship between the independent and dependent variables.
The linear model is not a good fit for the data, and a non-linear model may be more appropriate.
The linear model is a good fit for the data.
Which of the following is NOT a benefit of feature selection in linear regression?
Increased risk of overfitting
Reduced computational cost
Improved model interpretability
Potential for better generalization to new data
Which assumption of linear regression ensures that the relationship between the independent and dependent variables is linear?
Normality of errors
Independence
What function from scikit-learn is used to perform Linear Regression?
model_selection.train_test_split()
preprocessing.StandardScaler()
linear_model.LinearRegression()
linear_model.LogisticRegression()