Question 1
Consider the following code and its output:
Code:
from sklearn.datasets import load_irisfrom sklearn.linear_model import LogisticRegression
X, y = load_iris(return_X_y=True)clf = LogisticRegression(random_state=0).fit(X, y)
print(y[70:80])print(clf.predict(X[70:80, :]))Output:
[1 1 1 1 1 1 1 1 1 1][2 1 1 1 1 1 1 2 1 1]What will be the output of the following code? Enter your answer correct to one decimal place.
print(clf.score(X[70:80, :], y[70:80]))