Feature Mapping
Some patterns are hard to separate in the raw input space: two classes might be tangled together no matter what straight line you draw. Feature mapping is the idea of transforming your original inputs into a new set of features where the separation (or prediction) becomes much easier.
What feature mapping means
A feature map is a function (often written as φ(x)) that takes an input vector x and outputs a new vector of derived features. In that mapped space, a model that is “linear” in the mapped features can represent non-linear relationships in the original space. For Support Vector Machines, this is the heart of how you get curved decision boundaries while still using the clean geometry of a maximum-margin hyperplane—just in the mapped space rather than the original one.
How SVMs use it (kernels)
Computing a huge mapped vector explicitly can be expensive. SVMs often avoid that by using a kernel function K(x, x'), which computes the inner product φ(x)·φ(x') without ever writing down φ(x). Common choices include:
- Polynomial kernels (interactions up to a chosen degree)
- RBF/Gaussian kernels (very flexible, local similarity)
Why it matters in practice
Feature mapping controls what patterns your model can learn. In spam detection, mapping might capture word-pair interactions; in credit scoring, it can represent non-linear risk changes with income; in disease diagnosis, it can separate patients based on complex combinations of lab values. If the mapping (or kernel) is too simple, the SVM underfits; if it’s too flexible (and not regularized), it can overfit. In scikit-learn, this shows up directly in choices like kernel="linear" vs kernel="rbf" in SVC, and parameters like C and gamma.
Feature Mapping is a transformation that converts an input vector into a new feature space, typically higher-dimensional, where relationships become easier to model with a linear predictor. In SVMs, kernels implicitly define a feature mapping without explicitly computing the mapped coordinates, enabling efficient non-linear decision boundaries. It matters because the choice of mapping (or kernel) determines the separability of classes and strongly controls model capacity and generalization.
Imagine you’re trying to sort mixed coins, but your table is messy and the coins overlap. One trick is to move them onto a different tray with grooves, so the differences become easier to see. In AI, feature mapping is like that tray: it takes the information you already have (your “features,” like words in an email or measurements from a medical test) and transforms it into a new set of features that may make patterns clearer.
This matters a lot for Support Vector Machines, which try to draw a clean dividing line between categories. With good feature mapping, data that looked tangled can become easier to separate.