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.
- What are the roles of
Xandy?Xholds features;yis the target. Their rows must stay paired. - What do
fit,predictandscoredo?Learn on training rows, produce outputs for new rows, and summarize performance under the estimator's default metric.
- Why start with a dummy estimator?
It shows what a simple rule achieves on the same data and metric, so improvement has a reference.
- What is learned during
StandardScaler.fit? - How is a hyperparameter different from a learned attribute?
- Why does scaling change k-NN's result?
- Why make scaling part of a pipeline?
- What does one CV score represent?
- Is the largest accuracy always the best business choice?