What does the 'fit_intercept' parameter in 'LinearRegression()' control?
Whether to normalize the data before fitting.
Whether to calculate the intercept (bias) of the line.
Whether to use gradient descent for optimization.
Whether to calculate the slope of the line.
If the coefficient of determination (R-squared) for a linear regression model is 0.8, what does this indicate?
There is a weak relationship between the independent and dependent variables.
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.
The model is a poor fit for the data.
What does the linearity assumption in linear regression imply?
The relationship between the dependent and independent variables can be best represented by a straight line.
The data points are evenly distributed around the regression line.
The dependent variable must have a normal distribution.
The independent variables are unrelated to each other.
What is the purpose of the coefficient of determination (R-squared) in linear regression?
To identify the presence of outliers in the data.
To determine the statistical significance of the model.
To measure the proportion of variation in the dependent variable explained by the independent variable(s).
To assess the linearity assumption of the model.
Feature selection in linear regression primarily aims to:
Ensure that all features have a statistically significant p-value
Improve model performance and generalization by focusing on the most relevant predictors
Increase the number of features used for prediction
Make the model more complex and harder to interpret
What does a residual represent in linear regression?
The intercept of the regression line.
The difference between the actual and predicted values of the dependent variable.
The slope of the regression line.
The predicted value of the dependent variable.
What distinguishes simple linear regression from multiple linear regression?
There is no difference; the terms are interchangeable.
Simple linear regression analyzes categorical data, while multiple linear regression analyzes numerical data.
Simple linear regression has one independent variable, while multiple linear regression has two or more.
Simple linear regression uses a curved line, while multiple linear regression uses a straight line.
Which matplotlib function is commonly used to plot the regression line along with the scatter plot of the data?
hist()
plot()
scatter()
show()
What is the primary goal of feature selection in linear regression?
Increase the complexity of the model
Improve the model's interpretability and reduce overfitting
Introduce bias into the model
Maximize the number of features used in the model
Which of the following is NOT a benefit of feature selection in linear regression?
Potential for better generalization to new data
Increased risk of overfitting
Improved model interpretability
Reduced computational cost