← 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?
- A.model.predict(X_train)
- B.model.fit(X_train, y_train)
- C.model.score()
- 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 →