WHY MATHEMATICS?
Why Mathematics? | Locality Preserving Projections for Scalable Condition Monitoring: Neighbour Graphs, Generalised Eigenvectors, Linear Maps and New Sensor Data
How a neighbourhood graph and a linear projection can keep nearby operating states close, while giving every future sensor vector a direct map into a compact monitoring space.
Why mathematics is important becomes easier to see when a real decision depends on it. This guide follows the mechanism from definitions and dimensions to a worked calculation, validation, practical learning and responsible use. It keeps factual evidence separate from interpretation and treats every illustrative scenario as an example rather than a promise of results.
Choose a reading route
- Start with neighbour graphs and local geometry
- Work through the generalised eigenproblem
- Follow a new sensor vector through the linear map
- Build a leakage-safe validation and monitoring plan
Chapter map
- 1. Why local geometry matters in condition monitoring
- 2. From sensor rows to a data matrix
- 3. Constructing a neighbour graph
- 4. Turning edges into similarity weights
- 5. Degree and graph Laplacian
- 6. The locality-preserving objective
- 7. Why a constraint is essential
- 8. Solving the generalised eigenproblem
- 9. A complete four-point calculation
- 10. Centre and scale without leakage
- 11. Choosing the retained dimension
- 12. Mapping new sensor records
- 13. Turning coordinates into a monitoring rule
- 14. Reading contributions carefully
- 15. What LPP preserves and what it can distort
- 16. Comparing LPP with nearby methods
- 17. Validation for time-dependent equipment data
- 18. A student learning route
- 19. A parent and teacher guide
- 20. Deployment, monitoring and retraining
Visit the How Mathematics Works hub for the wider series and its connections to education, reasoning, science, computing, design and careers.
1. Why local geometry matters in condition monitoring
A small example makes the mechanism visible. A sensor cloud can be globally complicated while remaining locally orderly. Temperature, flow and vibration may trace a bent ribbon as load changes. LPP treats nearby samples as evidence about that ribbon instead of asking one global variance direction to explain everything.
A concrete situation
Imagine a pump observed at low, medium and high load. Adjacent loads should remain neighbours after compression even if the full cloud curves. A projection that tears low load away from its adjacent transition loses useful continuity.
What the mathematics does not license
Neighbourhood is a modelling assumption, not a fact delivered by the data. Mixed operating modes, poor scaling or a transient can make Euclidean closeness misleading. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
Sketch six operating points on a curved path. Mark the neighbours you would preserve and write the physical reason for each edge. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
2. From sensor rows to a data matrix
This is where modelling choices begin to affect evidence. Choose one orientation and keep it explicit. Here each observation is a column of X, so X has p sensor rows and n observation columns. A future vector x_new therefore has p entries and the learned projection A maps it through Aᵀx_new.
A concrete situation
With p=40 sensors, n=2,000 training observations and d=3 retained coordinates, X is 40 by 2,000 and A is 40 by 3. The monitoring score is a three-number vector rather than a 40-number record.
What the mathematics does not license
Many derivations use observations as rows. Copying a formula without transposing the surrounding matrices causes dimension errors that can look like software problems. Keeping this boundary clear makes the result easier to audit and transfer.
Try it, check it, transfer it
Write the dimensions of X, W, D, L, A and AᵀX before calculating anything. Dimension checks are a practical form of mathematical proofreading. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
3. Constructing a neighbour graph
The central mathematical idea is concrete. Create a vertex for every training observation and connect observations that count as local neighbours. Common rules are k nearest neighbours or an epsilon radius. The adjacency pattern decides which relationships the projection tries hardest to preserve.
A concrete situation
A five-neighbour graph lets every sample vote for its five closest companions. Symmetrising the graph by connecting i to j when either chooses the other avoids a directed relation in the standard undirected construction.
What the mathematics does not license
Too few neighbours can fragment the graph; too many can replace local geometry with a nearly global average. Density varies across regimes, so one k may behave differently in sparse and crowded regions. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
For several candidate k values, record connected components, isolated vertices and degree distribution. Reject a graph only after explaining what its structure means physically. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
4. Turning edges into similarity weights
Here the geometry becomes operational. Binary weights say that an edge matters. Heat-kernel weights add degree: W_ij=exp(-||x_i-x_j||²/t) for connected pairs, with zero elsewhere. Close neighbours then carry more influence than distant neighbours inside the same graph.
A concrete situation
If squared distance is 1 and t=2, the weight is exp(-0.5), about 0.6065. At squared distance 4 with the same t, it is exp(-2), about 0.1353.
What the mathematics does not license
The scale t interacts with sensor standardisation. A tiny t can make most weights negligible; a huge t makes connected neighbours nearly equal. Neither setting deserves trust without sensitivity checks. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
Compute two heat weights by hand, then change t. Describe whether the ranking changes and whether the contrast between near and far neighbours becomes stronger. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
Did You Know? In this chapter, the most important number is useful only together with its construction rule. Changing scaling, sample membership or validation design can change the numerical answer without changing the arithmetic.
5. Degree and graph Laplacian
This step deserves a careful pause. The degree matrix D is diagonal with D_ii equal to the sum of row i of W. The unnormalised graph Laplacian is L=D-W. Its quadratic form measures disagreement across connected pairs, so it turns a graph into an optimisation penalty.
A concrete situation
For a three-edge path with unit weights, degrees are 1,2,2,1. If coordinates are 0,1,2,3, the sum of squared changes across the three edges is 3.
What the mathematics does not license
A high-degree sample participates in more terms and can exert more influence. Normalised Laplacians change that balance; they are related choices rather than interchangeable notation. Keeping this boundary clear makes the result easier to audit and transfer.
Try it, check it, transfer it
Build W, D and L for four points in a path. Verify that every row of L sums to zero and explain why the constant vector has zero graph energy. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
6. The locality-preserving objective
The useful question is not only how to calculate, but what the calculation assumes. Let y_i=Aᵀx_i. LPP minimises the weighted sum of ||y_i-y_j||² over graph edges, subject to a constraint that avoids the all-zero map. The objective rewards projections that keep heavily linked observations close.
A concrete situation
The graph energy can be written with matrices, leading to X L Xᵀ in the column-observation convention. This expression connects many local comparisons to one quadratic form.
What the mathematics does not license
Low graph energy alone does not guarantee fault separability, quality prediction or causal meaning. It only says the selected coordinates vary gently over the chosen graph. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
Take one proposed projection and list which graph edges it stretches most. Those edges reveal where the representation sacrifices local fidelity. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
7. Why a constraint is essential
A small example makes the mechanism visible. Without a scale constraint, A=0 gives zero distance between every projected pair and wins trivially. LPP commonly uses AᵀXDXᵀA=I or an equivalent normalisation. This fixes scale while reflecting graph degree.
A concrete situation
For one projection vector a, the denominator aᵀXDXᵀa measures weighted projected spread. Setting it to one creates a meaningful competition between smoothness and non-collapse.
What the mathematics does not license
Singular matrices arise when sensors are redundant, p is large or data lie in a lower-dimensional subspace. Regularisation or preliminary reduction may be needed, with the choice documented. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
Explain in words why “make neighbours close” is incomplete until a non-collapse rule is added. Then check whether your software uses the same constraint as your notes. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
8. Solving the generalised eigenproblem
This is where modelling choices begin to affect evidence. Stationarity leads to XLXᵀa=λXDXᵀa. Eigenvectors with the smallest admissible eigenvalues define smooth nontrivial projection directions. Collect d such vectors as columns of A.
A concrete situation
A small eigenvalue is a ratio: little neighbour disagreement relative to degree-weighted spread. It is not a percentage of variance explained and should not be sold as one.
What the mathematics does not license
Numerical solvers can return unstable directions when eigenvalues are nearly tied. The subspace may be stable even if individual eigenvectors rotate or change sign. Keeping this boundary clear makes the result easier to audit and transfer.
Try it, check it, transfer it
Bootstrap the training observations, rebuild the graph and compare subspaces rather than raw signed columns. Report stability with principal angles or aligned correlations. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
Did You Know? In this chapter, the most important number is useful only together with its construction rule. Changing scaling, sample membership or validation design can change the numerical answer without changing the arithmetic.
9. A complete four-point calculation
The central mathematical idea is concrete. Take one-dimensional observations x=[0,1,2,3] and a path graph with unit edge weights. Using a=1 gives projected values y=[0,1,2,3]. The neighbour energy is (0-1)²+(1-2)²+(2-3)²=3.
A concrete situation
A future observation x_new=1.5 maps immediately to y_new=a x_new=1.5. This direct calculation is the practical difference between a learned linear map and a training-only embedding.
What the mathematics does not license
This toy does not fit a nontrivial multivariate LPP model; it isolates the energy and out-of-sample arithmetic. Presenting it as a fitted industrial result would be misleading. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
Change the middle observation from 2 to 8. Recalculate the edge energy and identify which two local relations now dominate the penalty. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
10. Centre and scale without leakage
Here the geometry becomes operational. Fit centring and scaling only on the training partition, then apply those stored values to validation, test and live data. The graph must also be constructed from training data when the goal is honest deployment evaluation.
A concrete situation
If pressure spans thousands of kilopascals while a vibration ratio spans tenths, raw Euclidean distance can let pressure define every neighbour. Standardisation can restore balance when that matches the monitoring question.
What the mathematics does not license
Global scaling before a time split leaks future distribution information. Robust scaling is not automatically better; it changes the geometry and may suppress a fault precursor. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
Write a preprocessing contract: included sensors, missing-value rule, centre, scale, clipping policy and the exact point at which each value is estimated. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
11. Choosing the retained dimension
This step deserves a careful pause. Retain enough LPP directions to preserve useful local structure, not simply as many as possible. Candidate dimensions can be compared by neighbour retention, trustworthiness-like diagnostics and downstream monitoring performance on untouched validation data.
A concrete situation
A two-dimensional map may show operating regimes clearly; a five-dimensional map may produce better detection. Visual appeal and operational performance answer different questions.
What the mathematics does not license
Selecting d on the final test set makes the reported result optimistic. A small eigenvalue gap is suggestive but is not, by itself, a guarantee of the best monitoring dimension. Keeping this boundary clear makes the result easier to audit and transfer.
Try it, check it, transfer it
Plot validation performance against d and include false alarms, missed detections and stability. Choose a region of robust performance rather than a single lucky point. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
12. Mapping new sensor records
The useful question is not only how to calculate, but what the calculation assumes. After training, store the scaler and A. A new record is checked, transformed with the training scaler and mapped as z_new=Aᵀx_new. The same deterministic path supports streaming use.
A concrete situation
For a 40-sensor vector and a 40-by-3 A, the result has three coordinates. A control chart, density model or distance rule can then operate in this compact space.
What the mathematics does not license
A linear map always returns numbers, even for data far outside training support. Mathematical availability is not evidence of applicability. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
Pair each projected record with input-range, nearest-neighbour distance and missingness checks. Route extreme cases to review instead of silently treating them as ordinary. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
Did You Know? In this chapter, the most important number is useful only together with its construction rule. Changing scaling, sample membership or validation design can change the numerical answer without changing the arithmetic.
13. Turning coordinates into a monitoring rule
A small example makes the mechanism visible. LPP produces a representation, not an alarm threshold. A team can fit a density, distance-to-centre statistic, one-class model or supervised classifier on the retained coordinates using healthy and, when available, labelled fault data.
A concrete situation
One option is a robust Mahalanobis distance in the LPP space with a threshold calibrated on held-out healthy periods. Another is a class-aware model when confirmed fault labels exist.
What the mathematics does not license
Thresholds inherited from Gaussian theory may fail if the embedded distribution is multimodal or autocorrelated. Empirical calibration must respect time order and maintenance episodes. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
Define the event unit before scoring: individual sample, sustained window or maintenance incident. Then estimate both sample-level and event-level false alarms. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
14. Reading contributions carefully
This is where modelling choices begin to affect evidence. Because z=Aᵀx, projection loadings show how sensors enter each coordinate. A change in a coordinate can be decomposed algebraically, but correlated sensors make unique causal attribution impossible.
A concrete situation
If two temperature sensors move together, either can carry a large coefficient depending on scaling and collinearity. Grouped contribution plots may be more stable than ranking individual channels.
What the mathematics does not license
A large loading is not proof that a sensor caused a fault. It can reflect redundancy, measurement units or the geometry needed to preserve neighbours. Keeping this boundary clear makes the result easier to audit and transfer.
Try it, check it, transfer it
Compare contribution rankings under bootstrap refits. Escalate only explanations that remain stable and agree with engineering evidence. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
15. What LPP preserves and what it can distort
The central mathematical idea is concrete. LPP explicitly favours graph-local proximity. It can distort long-range distances, cluster sizes and angles because these are not the direct objective. This is often acceptable when local continuity matters most.
A concrete situation
Two distant operating regimes may appear close if no graph edge constrains their separation. Conversely, a few bridge edges can pull regimes together.
What the mathematics does not license
A compact plot can look convincing while hiding edge violations. Visual inspection needs quantitative graph diagnostics and known event labels. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
Overlay graph edges on the embedding, colour by operating mode and inspect the longest projected edges. Each view answers a different validation question. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
16. Comparing LPP with nearby methods
Here the geometry becomes operational. PCA preserves directions of large global variance. Laplacian Eigenmaps learns training-sample coordinates from a graph. LLE preserves local reconstruction weights. Kernel PCA uses a kernel matrix for nonlinear global variance. LPP contributes an explicit linear map shaped by local adjacency.
A concrete situation
The right comparison uses identical splits, preprocessing and alert metrics. A method that wins after receiving more favourable tuning has not earned the conclusion.
What the mathematics does not license
Nonlinear methods may fit complex manifolds better but need an out-of-sample strategy. LPP may be easier to deploy and explain, yet its linear map may miss strongly curved structure. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
Create a comparison table with objective, new-point mapping, tuning parameters, computational cost, diagnostic access and failure modes. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
Did You Know? In this chapter, the most important number is useful only together with its construction rule. Changing scaling, sample membership or validation design can change the numerical answer without changing the arithmetic.
17. Validation for time-dependent equipment data
This step deserves a careful pause. Randomly shuffling highly autocorrelated sensor rows can put near-duplicates in train and test sets. Use chronological or grouped splits that keep runs, batches or assets together according to the deployment question.
A concrete situation
A realistic evaluation might train on earlier healthy runs, tune on later mixed runs and test on a final untouched period containing documented maintenance events.
What the mathematics does not license
Detection delay, false alarms per operating hour and event coverage often matter more than row accuracy. Label uncertainty should be reported rather than hidden. Keeping this boundary clear makes the result easier to audit and transfer.
Try it, check it, transfer it
Write the decision the model will support, then build the split that simulates that decision. Keep the final test period sealed until graph, d and threshold are fixed. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
18. A student learning route
The useful question is not only how to calculate, but what the calculation assumes. Start with vectors, distances and matrix multiplication. Build a small k-neighbour graph by hand, compute D and L, and evaluate one graph energy. Only then use an eigensolver and a real dataset.
A concrete situation
A spreadsheet can handle four points; Python or R can handle larger matrices. Comparing the manual result with code makes silent orientation errors visible.
What the mathematics does not license
Copying an LPP package call teaches less than explaining the objective and checking a new-point map. The mathematics becomes transferable when the learner can change assumptions deliberately. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
Keep a modelling notebook with dimensions, graph rule, scaling, eigenvalues, validation split and one failed attempt. Failure analysis is part of mathematical skill. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
19. A parent and teacher guide
A small example makes the mechanism visible. Ask the learner to explain why a graph is needed, why zero is a trivial solution and what happens to a future observation. These questions reveal conceptual understanding more reliably than memorised notation.
A concrete situation
Use examples from transport, environmental sensors or school laboratory measurements. The goal is to connect algebra, geometry, computation and responsible decision-making.
What the mathematics does not license
Do not equate a polished two-dimensional plot with intelligence or guaranteed career access. Progress comes from checking assumptions, calculations and evidence. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
Praise precise questions: Which neighbours? Which units? Which split? Which threshold? Such questions cultivate the benefits of learning mathematics as careful reasoning. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
20. Deployment, monitoring and retraining
This is where modelling choices begin to affect evidence. Version the sensor list, scaler, graph settings, projection matrix, downstream rule and threshold. Monitor missingness, input drift, graph-distance drift, alarm rate and confirmed-event performance.
A concrete situation
When equipment is refurbished, the operating manifold may change. A champion–challenger process can compare the current model with a candidate on a controlled evaluation window.
What the mathematics does not license
Automatic retraining after every drift signal can absorb an emerging fault into the healthy baseline. Human review and maintenance context protect the meaning of the reference set. Keeping this boundary clear makes the result easier to audit and transfer.
Try it, check it, transfer it
Define who investigates an alarm, who approves new training data and what evidence permits a model update. Mathematics supports governance when responsibilities are explicit. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
Did You Know? In this chapter, the most important number is useful only together with its construction rule. Changing scaling, sample membership or validation design can change the numerical answer without changing the arithmetic.
A seven-day practice lab
- Day 1: define the decision, observation unit, X variables and Y or reference condition.
- Day 2: reproduce the smallest worked example and check every dimension, unit and sign.
- Day 3: build a transparent baseline and write what it assumes.
- Day 4: fit the main method inside a training-only pipeline; record every parameter.
- Day 5: challenge one assumption with a deliberately difficult dataset or operating regime.
- Day 6: compare validation metrics with the practical workload created by errors.
- Day 7: present one supported conclusion, one unresolved uncertainty and one safe next experiment.
Questions for a student, parent or mentor
- Which part of the model is a mathematical definition, and which part is a choice?
- What small calculation would catch a sign, scale or dimension error?
- What evidence comes from training, validation and the untouched test?
- What benign condition could look like a fault or prediction failure?
- How would the answer change for another response, asset, school project or time period?
- What should a human review before acting on the score?
A method-specific audit before deployment
A locality audit begins with the graph, not the final plot. Save the neighbour rule, distance metric, symmetrisation choice, heat-kernel scale, connected-component count, degree summary and the identities of unusually long edges. These facts describe what the optimisation was asked to preserve. Overlay graph edges on the embedding and inspect bridges between operating modes against logs and raw trends. A bridge may represent a real transition, or it may reveal missing mode variables, timestamp misalignment or unsuitable scaling. Deleting it merely because it spoils a clean picture would be editing the evidence after seeing the answer.
Keep representation checks separate from alarm checks. Neighbour retention and graph energy assess whether the LPP coordinates respect the selected local geometry. False alarms, detection delay and event coverage assess whether a downstream monitoring rule helps in practice. The two can disagree: a faithful map may preserve geometry unrelated to faults, while a rougher map may work better for classification. Compare LPP with PCA and a nonlinear graph embedding on identical splits. The direct linear map may be slightly less faithful yet easier to deploy, inspect and score for new data; that is a trade-off to measure rather than hide.
Use negative controls and drift checks. Build a graph from an irrelevant variable, shuffle appropriate blocks, or randomise a sensor group and confirm that any validation advantage disappears. A method that performs equally well under a broken graph may be benefiting from leakage or from a downstream model that ignores the representation. In service, monitor each new record's distance to the training population and its operating-mode coverage. The projection matrix can remain numerically stable while the population moves beyond its evidence base. Define review, fallback and retraining rules before this happens.
Finally, rehearse an end-to-end incident. Start with a new sensor vector, apply the stored scaler, calculate its LPP coordinates, run the downstream statistic and attach graph-distance and data-quality checks. Ask which number triggers review, which evidence an engineer sees and how the outcome returns to the model record. This rehearsal exposes gaps between a successful notebook and a usable monitoring process.
Frequently asked questions
Is LPP the same as Laplacian Eigenmaps?
They share a neighbourhood graph and Laplacian idea, but LPP learns an explicit linear projection. Laplacian Eigenmaps assigns coordinates to the training samples directly; LPP can map a new vector with the learned matrix.
Why preserve local relationships?
Many processes move through curved operating regimes. Nearby observations often share physical meaning even when global Euclidean directions mix several regimes.
Does LPP prove that two close points are healthy?
No. It preserves a chosen graph geometry. Health labels, operating context and a separate monitoring rule are still needed.
How many neighbours should I use?
There is no universal number. Treat neighbourhood size as a validated modelling choice and test graph connectivity, stability and downstream performance.
Must the sensors be scaled?
Usually yes when units differ, but the scaling rule must be learned on training data and justified physically. Robust scaling may help when training data contain mild contamination.
Can LPP handle a new operating regime?
It will produce coordinates, but extrapolated coordinates may be unreliable. Add distance, leverage or applicability checks and retrain only after review.
Primary source and fact-check note
Xiaofei He and Partha Niyogi, “Locality Preserving Projections,” Advances in Neural Information Processing Systems 16 (2003). Definitions and core claims in this article were checked against this primary publication. Calculations shown here were independently recomputed. Examples are educational illustrations; they are not reported industrial performance results.
Useful next reading
Keep the options open. Mathematics education supports clearer questions, transferable problem-solving skills and informed choices across science, engineering, computing, AI, statistics, design and many other careers. It does not guarantee intelligence, income, admission or employment; those outcomes depend on far more than one subject or model.