The detectives get tipsy on tips on how to calibrate an NIR model

Chapter 8
🗂 Workshop overview: The detectives join the second-part of Inspector Cornlumbo’s workshop on how to calibrate an NIR model. On the second day, the detective offers useful insights into software use for calibrations, including tips for spectral pre-treatments and how to calibrate and validate NIR models. Are the detectives left satisfied with his training? Read on to find out.

It is raining heavily, and the five private detectives shake off their wet umbrellas as they step into the office. They grab their coffees and teas and sit around, ready to continue their workshop on how to calibrate an NIR model.

Lieutenant Cornlumbo waltzes in, wearing a corn-yellow raincoat covered in sticky raindrops and carrying two heavy bags in each hand. He says it is for a little surprise after the workshop finishes . This manages to energize his colleagues and they sit up in the seats as the detective continues to make his professional recommendations on how to calibrate an NIR model.

Once he’s dried off, the private investigator reminds them that they have covered the two major steps on how to calibrate an NIR model. He has also already given his recommendations on how to select calibration samples and measure reference values when using the NIR technique .

The sleuth announces it is time for tip three.

Spectral Pre-treatments

Spectral pre-treatments are typically applied prior to calibration to improve the quality of the NIR spectra by removing baseline and scattering effects arising from physical characteristics of the sample, the lab environment and instrument noise.

For example, scatter correction treatments are used to correct multiplicative baseline shifts (picture below), or peaks that increase multiplicatively as absorption increases at longer wavelengths. This effect is typically caused by larger particle sizes and light scattering.

First and second derivative are also common methods for addressing typical NIR overlapping peaks and large baseline shifts.

The detective proceeds with tip four.

How to calibrate an NIR model

Lieutenant Cornlumbo explains that he sees a calibration as a process for obtaining a reliable NIR model that translates spectral data into information which is meaningful for the user. This information can be quantitative, or in other words, the data could be used to determine quantities of a particular property. The information could also be qualitative and used for identification of different substances or separation into different categories.

The detective suggests using a multivariate regression method, such as Partial Least Squares (PLS) to calibrate an NIR model for the NIR instrument .

Lieutenant Cornlumbo adds that the PLS models are calibrated with the goal of minimizing model inaccuracy while maximizing precision. Accuracy and precision of NIR calibration models are assessed through the mean squared error (MSE) and the coefficient of determination (R2) respectively. MSE and R2 could be estimated using a validation method.

Lieutenant Cornlumbo moves on to his final tip.

Validation of NIR calibration model

When you calibrate an NIR model, validation is necessary to verify the quality of the calibrations. For this purpose, Lieutenant Cornlumbo recommends using a small group of samples of the same nature, but independent of those used for calibration. The samples must have associated reference values, analyzed by the same lab procedures as the calibration set. The NIR model is then applied to predict the analytical value of the samples. These predictions are then compared against the reference values of the samples given by lab analysis.
The higher the similarity, the better the predictive performance of the model. Both MSE and R2 are used to judge this predictive performance.

Good models should exhibit low MSEs (close to 0) and R2 values closer to 1.

Lieutenant Cornlumbo quickly adds that predictive performance of the models can also be estimated by cross-validation where the calibration set is divided into several subsets. The number of subsets is selected by default by the NIR software package or manually by the operator. One of each of these subsets is left out for validation and calibration and sequentially developed on the remaining subsets until every group has been used for both calibration and validation. The mean error and R2 are estimated as the average of their corresponding values, estimated at each iteration. This type of validation is especially useful in cases where the number of samples is limited.

Lieutenant Cornlumbo looks around the room and notices his colleagues are getting a slightly dazed look in their eyes. He decides to wrap it up and just quickly summarize what they had covered in the two-day workshop on how to calibrate an NIR model.

Development of NIR calibration models is essential for the translation of NIR absorbance into meaningful information. To develop an effective calibration:

  • Choose the right NIR instrument for your needs
  • Keep the working environment as stable and clean as possible
  • Process and present samples in a consistent way
  • Use good quality reference values
  • Select calibration samples representative of the samples that will be routinely analyzed
  • Start with 50-100 calibration samples for initial calibration
  • Apply spectral pretreatments to improve the calibration
  • Validate the performance of the NIR model

The detective points out that they could also attend additional trainings on calibrations or even just general NIR knowledge trainings to develop their skills further.

Lieutenant Cornlumbo announces the end of the workshop on how to calibrate an NIR model. His colleagues, including Miss Mapple breathe out a sigh of relief. The topic has been challenging, but they managed to follow along. Now, they are certainly looking forward to the surprise he has in those bags for them. Lieutenant Cornlumbo pulls out several platters of fantastic Swiss cheese varieties, as he says cheese is one of the most suitable samples to analyze with NIR. The cheese is accompanied by grapes, pears, crackers and of course several bottles of wine. It was a fun evening for the detectives indeed 🧀🍷.