Question 15
Consider the following code:
from sklearn.datasets import make_regressionfrom sklearn.datasets import make_classificationfrom sklearn.linear_model import LinearRegressionfrom sklearn.linear_model import LogisticRegression
X_r, y_r = make_regression()lr = LinearRegression()lr.fit(X_r, y_r)score1 = lr.score(X_r, y_r)
X_c, y_c = make_classification()logr = LogisticRegression()logr.fit(X_c, y_c)score2 = logr.score(X_c, y_c)
print(score1)print(score2)Which metrics will be contained in score1 and score2 respectively?
Accuracy, Accuracy
R2 score, R2 score
Accuracy, R2 score
R2 score, Accuracy
F1 score, Precision
Precision, Recall
MAE, MSE
The code will result in an error.