Machine Learning (ML) · Intermediate level

Intermediate level · Module 1 of 6 · 16 guided hours

Feature Engineering and Pipelines

Create informative features, transform different column types correctly and combine every step into a scikit-learn pipeline.

Learning objectives

  • Scale numeric and encode categorical features with ColumnTransformer
  • Create useful features from dates, text and domain knowledge
  • Build pipelines that prevent leakage and simplify deployment

Topics

  • StandardScaler and OneHotEncoder
  • ColumnTransformer
  • date and time features
  • ratios and aggregates
  • simple text features
  • Pipeline

Lessons

  1. Lesson 1 Transforming Columns with ColumnTransformer

    Apply different preprocessing to numeric and categorical columns in one consistent step.

    StandardScalerOneHotEncoder(handle_unknown='ignore')ColumnTransformerfit vs transform

  2. Lesson 2 Creating Features

    Turn raw data into informative features using dates, ratios, aggregates and domain knowledge.

    feature engineeringdate partsrolling and grouped aggregatesdomain knowledge

  3. Lesson 3 Pipelines

    Chain preprocessing and the model into one object that is trained, evaluated, tuned and saved together.

    Pipelinemake_pipelineleakage in cross-validationone object to deploy

Practical activity

Engineer features for the agent data set (day of week, recent averages, cash-to-float ratios) and build a pipeline that prepares any new data the same way.

Expected outcomes

  • Better models through better features
  • Reproducible, leak-free preprocessing

Assessment

Practical: build a pipeline for a provided data set; marked on correctness, absence of leakage and feature reasoning.

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.