scikit-learn interview question

What do fit, transform, fit_transform and predict do in scikit-learn?

Definition Asked in Machine Learning Engineer interviews

Members can save this page, take notes and track progress. See membership · Sign in

Summary

fit learns from data (a scaler learns means, a model learns weights). transform applies what was learned to data. fit_transform does both on the same data (training data only). predict (and predict_proba) uses a fitted estimator to produce outputs for new rows.

Keep reading with a membership

The full answer with examples, key points and comparisons is part of the membership, along with every other interview answer, progress tracking and Daily Review. Most-asked answers stay free to read.

See plans and free trial Already a member? Sign in

More scikit-learn questions

← All scikit-learn questions

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake