Question 3
Assume train data (X_train, y_train) and test data (X_test) is given as numpy array and you build and train a LogisticRegression model. Which of the following options might possibly be the predicted class of first two samples(rows) of the test data according to the code given below?
>>> from sklearn.linear_model import LogisticRegression>>> log_reg = LogisticRegression()>>> log_reg.fit(X_train,y_train)
>>> print(log_reg.classes_)[0,1,2] #output of above code
>>> print(log_reg.predict_proba(X_test[[0]]))[[2.73e-45, 1.21e-51, 1.00e+00]] #output of above code
>>> print(log_reg.predict_proba(X_test[[1]]))[[7.09e-29, 1.00e+00, 2.02e-36]] #output of above code
>>> print(log_reg.predict(X_test[0:2]))