Loading topic
fit and predict on a scikit-learn model, and that you can use NumPy arrays and pandas DataFrames. It covers the three most common kinds of preprocessing step and the rules they all follow.3 min readtrain_test_split, fit a scikit-learn model, and call fit and transform on a scaler. It explains what data leakage is, how it enters through preprocessing, and why the next chapter's Pipeline prevents it.2 min readfit and predict, split data into train and test sets, and read basic pandas and NumPy code. You should also know why a scaler learns its statistics from data (the previous chapters covered transformers and leakage).3 min readColumnTransformer applies a separate preprocessing chain to each group of columns and passes the combined result to a model.3 min readPipeline or make_pipeline object, and that you know what a train/test split and fit/predict do. You will see how cross-validation treats a pipeline as one estimator, and why that keeps validation scores honest.2 min readPipeline, and that you know what cross-validation and a train/test split do. You will tune settings that live inside different pipeline steps, using one search object.3 min readPipeline and a ColumnTransformer, and that you know fitted attributes in scikit-learn end with 2 min readPipeline and know the fit/transform split from earlier chapters. You also need basic NumPy. Built-in transformers cover most preprocessing. Sometimes you need a step they don't offer, such as a domain-specific feature or a log transform. A custom transforme2 min readPipeline, fit it, and call predict. It covers how to save a fitted pipeline to disk with joblib, load it later, and avoid the common mistakes that break a saved model.3 min readPipeline, use make_pipeline, and address step parameters with step__param names. It also assumes you know what fit and transform do. If not, review the earlier chapters on pipelines and cross-validation first.2 min readPipeline, run GridSearchCV with step__param names, and read cross-validation scores. It shows how to stop a search from refitting the same preprocessing step over and over.3 min read