liveBook · Manning

Standardization

As explained in Knowledge Graphs and LLMs in Action

Feature standardization transforms numerical features so that they have a specified mean and scale, commonly zero mean and unit variance.

Feature standardization transforms numerical features to zero mean and unit variance, preventing large-scale measurements from dominating model decisions. section 9.3.1

Apply standardization as a consistent training and prediction pipeline:

  • Fit StandardScaler on the training feature vectors. section 9.3.1
  • Transform the training vectors before fitting logistic regression. section 9.3.1
  • Reuse the fitted scaler to transform test or prediction vectors. section 9.3.1

Node features on different scales

Node degree may range from 1 to 1,000 while centrality measures range from 0 to 1. Scaling both features prevents degree from overwhelming centrality in distance-based calculations. section 9.3.1

Figure 9.7 Training flow for node classification and link prediction. A critical step is the featurization of nodes and relationships. When this process is finished, the vectors can be passed to a classic algorithm. Both node classification and link prediction can be seen as classification tasks.
figure

Use the training flow to locate standardization between node and relationship featurization and the downstream classifier. section 9.3.1

How Knowledge Graphs and LLMs in Action covers it

How deep it goes
Demonstrates fitting and reusing StandardScaler, but does not derive the transformation mathematically.
Examples
Uses node degree, centrality measures, graph embeddings, and the karate club network as concrete feature examples.
What it assumes
Assumes numerical feature vectors and a downstream machine-learning classifier.
What you can do after
Apply it via StandardScaler to align training and prediction features before fitting and evaluating a classifier.
How it connects
Connects feature scaling with embeddings, Euclidean distance, logistic regression, and node classification.

Also explained in

Compare how 5 books explain standardization →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Knowledge Graphs and LLMs in Action. The section links point to the parts of the book it draws on.