🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: ML and Regression: all 10 questions

Quiz: ML and Regression · Question 5 of 10

In scikit-learn, which call trains a model?

In scikit-learn, which call trains a model?

  1. A.model.predict(X_train)
  2. B.model.fit(X_train, y_train)
  3. C.model.score()
  4. D.train_test_split(model)
Answer & explanation

Correct answer: model.fit(X_train, y_train)

fit learns; predict applies what was learned.

Can you get the rest right without peeking?

Take the timed Quiz: ML and Regression quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →