Data Science

A Journey Of Discovery

December 1, 2024
  •  
3 minutes
George Hill
Sagitto Ltd

This blog post illustrates the importance of continually seeking improvement when building calibration models. Every step of the process deserves scrutiny. Are we using the best method of sample preparation? Is our reference data accurate and reliable?

Sample Preparation -  Hops

NIR spectroscopy and an accurate calibration model, hop growers can measure dry matter in a matter of seconds

For centuries,  flowers of the hop plant Humulus lupulus have been used to flavour and preserve beer. Hop 'cones' comprise up to 80% water before harvest. The non-water component - the 'dry matter' - gradually increases as hop cones reach maturity. Measuring the percentage dry matter in fresh hop cones is therefore a very important management tool for hop growers, to determine the optimum time to harvest.

The conventional method for measuring hop cone dry matter involves drying samples in an oven for many hours.... just when time is at its most precious for the grower. But with NIR spectroscopy and an accurate calibration model, hop growers can measure dry matter in a matter of seconds, not hours.

Recently Sagitto helped one of its customers to develop a calibration model for dry matter in fresh hop cones, using FT-NIR spectroscopy. The following plot shows how the accuracy of this model evolved over the 6 week harvest period (with each blue spot representing a new build of the model).

Fresh hops dry matter predictions
Mean Absolute Error of calibration model for dry matter, plotting each model building iteration

As expected, as the harvest progressed and we gathered more training data, the accuracy of the model gradually improved. However note the sudden jump in performance, from a MAE of 0.9% to 0.5% This step-change in accuracy was entirely due to a change in sample preparation : from scanning whole, intact cones to scanning fresh hop cones that had been coarsely chopped in a food processor.

FT-NIR absorbance spectra not Honigs Regression
Absorbance spectra for fresh, whole hop cones
FT-NIR  spectra not Honigs Regression
Absorbance spectra for fresh hop cones, coarsely chopped

If we compare the spectra of the two methods, we see that the change in sample preparation method did not alter the overall shape of the spectra but it reduced the variability considerably. This change in sample preparation increased the homogeneity of the samples, and enabled us to greatly improve the accuracy of our customer's calibration model.

Reference Data : Could It Be Better?

Sagitto is focused on creating machine learning models that allow our customers to enjoy the speed and efficiency of NIR spectroscopy, while achieving levels of accuracy as good as if they had used the conventional 'wet chemistry' reference methods of measurement. The reference method results are a target that we aim to get as close as possible to.

Sometimes our progress becomes stalled. Try as we might, we are unable to achieve the level of accuracy that we know is possible with NIR spectroscopy. In these cases, we work with our customers to explore possible issues with the reference chemistry results.

A Case Study : ASBC Hops α-Acids

Alpha acids are a major contributor to the bittering power of hops in beer. Most hops that are traded worldwide include a measurement of their total alpha acids using the UV-Vis spectrometry reference method defined by the American Society of Brewing Chemists (ASBC). First released in 1959, this method is widely used and accepted.

We are also aware that this method can be challenging to implement, as we found with Customer A. The ASBC Alpha Acids model for Customer A consistently had a Root Mean Squared Error (RMSE) of 0.66%. This was more than twice the error of models that we had achieved for several other hops customers using exactly the same type of FT-NIR spectrometer. The ASBC Alpha Acids model for Customer B, for example, had a RMSE of 0.29%. Looking at the wide spread of errors between the reference and NIR results for Customer A, we wondered if the cause might be partly due to issues with their reference values.

Sagitto regression not Percal Plus Honigs Regression

In talking with experienced laboratory managers, we learned that common issues with this particular reference method include :

  • Use of lower grade reagents instead of spectrometry-grade toluene and alkaline methanol.
  • Aged reagent stocks. The method relies on an alkaline methanol solution, and it is tempting to make a large batch, which is then used over a long period of time, losing alkalinity as time passes. A better analytical outcome is achieved with more frequent preparation of small batches of alkaline solution.
  • Poor laboratory temperature control. The reagents change volume dramatically with temperature, so labs must run at 20C, and have volume calibration systems to monitor solvent volumes.
  • Low reproducibility/accuracy of volumetric delivery. The ASBC procedure requires delivery of a 5 ml dose of the toluene extract into 100ml of alkaline methanol. Getting this ratio right is a whole method in itself.
  • Poor control of workflows. Hop UV-Vis (and NIR) samples should not be batch ground – this part of the process must be performed on a sample by sample basis.
  • Calibration processes are required for balances, volumetric apparatus, and spectrophotometers. It is important to have the UV-VIS spectrometer serviced regularly, including checking lamp energy and stability.

Customer A agreed that their reference results were worthy of closer attention, and in fact they had already identified and addressed several areas for improvement. Even though their model is sub-optimal, they are delighted with the speed and cost savings that using FT-NIR is giving them. Its especially satisfying for them to know that their model(s) will now become even more accurate.

Conclusion

The above are just two examples that emphasise that successful calibration modelling for NIR spectroscopy cannot be done in isolation, but needs to be done in the context of the customer's operations.

References
  1. American Society of Brewing Chemists (ASBC), ASBC Methods of Analysis, online. Hops-6, α- and β-Acids in Hops and Hop Pellets by spectrophotometry
  2. Analysis Methods for the Brewery Industry , pages 14 and 15 (α and β Acids, spectrophotometric - hops / hop pellets(ASBC method))

Subscribe to Sagitto's Blog

Get industry insights that you won't delete, straight in your inbox.
We use contact information you provide to us to contact you about our relevant content, products, and services. You may unsubscribe from these communications at any time. For information, check out our Privacy Policy.
George Hill
Sagitto Ltd
Sagitto's founder, George Hill, first started working with artificial intelligence during the 1980s, while developing 'expert systems' within Bank of America in London. On returning to New Zealand, he undertook part-time study with the University of Waikato's Machine Learning Group while working for Hill Laboratories, a well-known New Zealand commercial testing laboratory. This led to the formation of Sagitto Limited, dedicated to combining the power of artificial intelligence and machine learning with spectroscopy.

More news

Authentication

Is This Pure Silk?

Silk has been a premium fibre for textiles for millennia. Sagitto provides a rapid and non-destructive way of determining whether a textile is genuine pure silk, a blend of silk with another fibre, or made entirely from another fibre. This is especially valuable for collectors of antique clothing or rugs, and buyers of premium label garments.

Read Article
Vendor Lockin

You Should Be Free To Leave

We believe that our customers should subscribe to our services willingly, because of the value that they receive and not because they are locked in to using us. That is why we take particular care to provide a smooth pathway, should our corporate customers decide to no longer use Sagitto's services.

Read Article
Authentication

Know Your Lavender Oil

'English lavender' oil is extracted from the flowers of Lavandula angustifolia, while 'Lavandin' oil is made from Lavandula x. intermedia, a hybrid cross between Lavandula angustifolia and Lavandula latifolia (Spike Lavender). Near infrared spectroscopy not only gives a very rapid and inexpensive method to tell the difference between these two types of oil, but also allows the composition of oils to be accurately measured.

Read Article