Aunir Glossary - GH and NH

GH and NH values = Global and Neighbourhood Distances

GH values are used to determine outliers or samples with unique characteristics that are different from the majority (average) of the samples used to build an NIR equation. GH is widely used to flag warnings about unknown or wrongly labelled samples. As a rule of thumb a GH value more than 3 should be handled with care but remember that this is highly calibration and product dependent. A very high GH can dramatically reduce the confidence in the NIR predicted values as it indicates an overstretching of the model's extrapolation ability.

NH values (or in-lier value) are used to determine if the scanned samples have similar samples (i.e. neighbours) in the database. A low NH increases our confidence in NIR results. A high NH indicates a hole in the calibration database where there are not enough samples of similar nature. The default NH threshold is normally set to 1.

Both GH and NH values are valuable tools in identifying appropriate samples for expanding or updating an NIR database which in turn can help in reducing the cost of performing reference chemistry by way of removing redundant samples.


The H in GH and NH stands for Hat (matrix) which is used to calculate Mahalanobis distance (also called M or H distance). GH and NH are modified (scaled) versions of M distance.

GH is predominately used in relation to WinISI software and Foss NIR products.

GH value is associated (but not identical) with the following terms in other vendor's software suites: Mahalanobis or M distance, Leverage value, Hotelling (T or T2) and Global Distance (GD).