Skip to content
ml-recall

#voting-classifier

1 question from Decision Trees & Ensembles

Timed test

1 question · 1 min · score and explanations at the end

Take a test
Q 1 / 1Score 0 / 0

Question 1: Single choice

mediumAI-checkedDecision Trees & Ensembles

What happens when this code runs?

from sklearn.datasets import make_moons
from sklearn.ensemble import VotingClassifier
from sklearn.linear_model import LogisticRegression
from sklearn.svm import SVC

X, y = make_moons(n_samples=100, noise=0.2, random_state=0)
vote = VotingClassifier([("lr", LogisticRegression()), ("svc", SVC())],
                        voting="soft")
vote.fit(X, y)
print(vote.predict(X[:3]))
Choose one option