Question 21
Consider the following block of code and mark all possible correct options.
from sklearn.linear_model import LogisticRegressionfrom sklearn.ensemble import RandomForestClassifier, VotingClassifierclf1 = LogisticRegression()clf2 = RandomForestClassifier()vote=VotingClassifier(estimators=[('lr', clf1), ('rf', clf2)], weights=None, n_jobs= 1, flatten_transform=True, verbose=False, voting='hard')vote = vote.fit(X, y)print(vote.predict(X))Given model uses majority voting rule to predict class labels.
Given model predicts the class labels based on the argmax of the sums of the predicted probabilities.
Setting flatten_transform =True with voting=’soft’ will flatten the output shape of transform.
None of these are correct