Back to Machine Learning

~/blog/tutorials/machine-learning

Feature Engineering

Feature Engineering

This section covers how to transform raw data into features that let your models learn effectively. Every technique is demonstrated on a concrete anchor dataset small enough to hand-trace.

Topics Covered

  1. Missing Values and Outliers — MCAR/MAR/MNAR, deletion, mean/KNN imputation, IQR/z-score/Isolation Forest, winsorizing, log transform
  2. Handling Imbalanced Datasets — the baseline trap, why accuracy lies, evaluation protocol, stratified k-fold
  3. Categorical Encoding — label encoding (false ordinal trap), one-hot encoding, ordinal encoding, frequency/target encoding, hashing trick
  4. SMOTE and Oversampling Variants — SMOTE interpolation math, Borderline-SMOTE, ADASYN, SMOTE-Tomek, SMOTE-ENN
  5. Handling Outliers — IQR/z-score/Isolation Forest detection, remove/cap/log/keep strategies

Prerequisites

  • Basic Python and pandas
  • Descriptive statistics (mean, median, standard deviation, quantiles)
  • Train/test split concept

Series Flow

This is part of the ML Engineering series. If you are new to ML fundamentals, start with EDA and descriptive statistics before diving into feature engineering.