SchoolWhool
Quizzes and saved progress, freeSign in freeSign in
Data Tools · Module 4Module material

scikit-learn interview questions

9 questions interviewers ask on the scikit-learn api, from first principles to the follow-ups. The first 3 model answers are free to read; Pro opens the rest.

  1. What are the roles of X and y?

    X holds features; y is the target. Their rows must stay paired.

  2. What do fit, predict and score do?

    Learn on training rows, produce outputs for new rows, and summarize performance under the estimator's default metric.

  3. Why start with a dummy estimator?

    It shows what a simple rule achieves on the same data and metric, so improvement has a reference.

  4. What is learned during StandardScaler.fit?
  5. How is a hyperparameter different from a learned attribute?
  6. Why does scaling change k-NN's result?
  7. Why make scaling part of a pipeline?
  8. What does one CV score represent?
  9. Is the largest accuracy always the best business choice?