liveBook · Manning

Data transformation

As explained in Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI

A feature transformation maps input feature values to a different representation, often to simplify relationships for a model.

Data transformation changes raw feature values into representations that help a model learn. In classical machine learning, transformations extract relevant information, fit model assumptions, address nonlinear relationships, and incorporate domain knowledge. section 1.3

For gradient-boosted decision trees, transform known nonlinearities toward linear forms, bin or discretize values, and precompute interactions. These changes can reduce the number of binary splits and place splits more effectively. section 6.1.4

Use transformations to:

  • Extract informative signals while reducing irrelevant or noisy information. section 1.3
  • Convert data into a representation compatible with model assumptions and limitations. section 1.3
  • Make nonlinear feature-target relationships easier for linear models to approximate. section 1.3
  • Encode domain knowledge when business, social, economic, or physical context reveals useful features. section 1.3

Diagnosing transformations with partial dependence

Fit a model, then inspect partial dependence plots to see how predicted targets change as one feature varies. Use the resulting view to identify linearity, nonlinearity, or potential interactions before defining transformations. section 6.1.4

Figure 6.1 Comparison of predictions between a neural network and a bagged trees ensemble for a random dataset with a noisy sine function

Compare how a neural network and a bagged tree ensemble approximate a noisy nonlinear function, clarifying why model choice affects transformation needs. section 6.1.4

How Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI covers it

How deep it goes
Explains transformation purposes and several strategies, then uses partial dependence to diagnose relationships without deriving transformation mathematics.
Examples
Uses linear-form transformations, binning, discretization, precomputed interactions, partial dependence plots, and noisy nonlinear-function model comparisons.
What it assumes
Assesses data characteristics, model requirements, and relevant business or scientific domain knowledge before transforming features.
What you can do after
Diagnose nonlinearities with partial dependence plots and choose transformations that support model representation and split efficiency.
How it connects
Connects feature engineering with classical machine learning, linear models, gradient-boosted decision trees, partial dependence plots, and domain knowledge.

Also explained in

Compare how 20 books explain data transformation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI. The section links point to the parts of the book it draws on.