Computer ScienceAI & Machine LearningMedium

Feature Engineering

Also known as:Feature ExtractionFeature ConstructionFeature Selection

Feature engineering is the process of using domain knowledge to select, transform, or create input variables (features) from raw data to improve the performance of machine learning models. It bridges raw data and predictive algorithms by producing representations that algorithms can learn from more effectively. Techniques include normalization, one-hot encoding, polynomial feature creation, and dimensionality reduction.

Common Feature Engineering Techniques and Their Use Cases

TechniqueInput TypeOutputPurposeExample
NormalizationNumericalScaled [0,1]Remove magnitude biasAge: 25 → 0.25
One-Hot EncodingCategoricalBinary vectorEncode categoriesColor: Red → [1,0,0]
Log TransformSkewed numericLog-scaledReduce skewnessIncome: log(50000)
BinningContinuousOrdinal groupsDiscretize valuesAge → Young/Mid/Old
Polynomial FeaturesNumericHigher-degreeCapture nonlinearityx → x, x², x³
TF-IDFTextNumeric vectorText representationWord frequency weights

Interactive Tools

Scikit-learn Feature Engineering Guide

Open Tool

Kaggle Feature Engineering Course

Open Tool

Brilliant.org Machine Learning

Open Tool
Data pipeline diagram showing feature extraction and transformation steps

Wikimedia Commons, CC BY-SA

Related Terms

Computer Science

Decision Tree (ML)

A decision tree is a supervised machine learning model that splits data into branches based on feature values, forming a tree structure where each internal node represents a feature test, each branch represents an outcome, and each leaf node holds a prediction. Trees are trained by choosing splits that maximise information gain or minimise Gini impurity at each step. They are highly interpretable and serve as the building block for ensemble methods like random forests and gradient boosting.

Computer Science

Random Forest

A random forest is an ensemble machine learning algorithm that constructs a large number of decision trees during training and outputs the class that is the mode of the classes (classification) or mean prediction (regression) of the individual trees. Each tree is trained on a bootstrap sample of the data and uses a random subset of features at each split, introducing diversity that reduces variance and overfitting. Introduced by Leo Breiman in 2001, random forests are among the most widely used and robust general-purpose algorithms.

Computer Science

Regularization (ML)

Regularization in machine learning refers to techniques that add a penalty term to the loss function to discourage model complexity, thereby reducing overfitting and improving generalisation to unseen data. The two most common forms are L1 (Lasso) regularization, which promotes sparsity by penalising the absolute values of weights, and L2 (Ridge) regularization, which penalises the squared values, shrinking all weights toward zero. Regularization is a fundamental concept in statistical learning theory, closely tied to the bias–variance trade-off.

From Latin "feature" (factura, a making or formation) and "engineering" (from Latin ingenium, cleverness). The compound term emerged in the machine learning community in the 1990s–2000s, popularised by practitioners building early ML pipelines.

machine-learningdata-preprocessingfeature-selectionsupervised-learningdata-science