ORDER SORTER
1.8 IDENTIFICATION METHOD DEVELOPMENT
1.8.4 Derivatives
Derivatives are one o f the most common and effective mathematical pre-treatm ents
available. Derivatisation o f spectra can increase spectral resolution and suppress
constant background effects. A first derivative removes any constant offset in the spectrum and is given by the slope at every point in the spectrum. A second derivative can be achieved by repeating the action o f the first derivative transformation. The
second derivative spectrum has the added advantage o f removing a sloping
background. Third and fourth derivatives are rarely, if ever, used since enough
resolution can normally be seen in the lower derivatives.
There are two common methods for calculating derivative spectra; the segment/gap method and the Savitzky-Golay method.
The segment/gap method requires two parameters, a gap size and a segment size. Figure 1.17.
^---V--- ^ '---- V---- ' 4 '---- y---- '-- ^--- V---^
Segment Gap Gap Segment
Figure 1.17 Derivative segments and gaps.
The segment and gap size are important because they affect smoothing. Too large a segment or gap can result in loss o f important features while too small a segment and gap can introduce significant noise.
A first derivative at wavelength _y, may be calculated as:
y r ' ' = ÿ s a - ÿ s , Equation 1.31
where is the mean absorbance o f the segment after wavelength y,- and is the
mean absorbance o f the segment before wavelength}/,. The second derivative may be calculated as:
^2.,Der _ - ^ Equation 1.32
3.0 0.08 2.5 0 .0 6 2.0 1.5 CO 1.0 0.5 0.0 < -0.5 1.0 -0.02 1.5 •2.0 -0 .0 4 1100 1 3 0 0 1 5 0 0 1 7 0 0 19 0 0 2100 2 3 0 0 2 5 0 0 W a v e le n g th n m
Figure 1.18 Comparison of pre-treatments. Original absorbance
spectrum, blue, SNV, red, C* derivative, green, and 2"^ derivative, purple.
A peak maximum in the original speetrum becom es a zero crossing points for the first derivative spectrum and a peak minimum for a second derivative spectrum.
It should be noted that a number o f data points (segment plus gap size) will be lost at the beginning and end o f each speetrum when a derivative is calculated. The effect o f segment size and its smoothing affect is shown in Figure 1.19. Resolution o f smaller peaks is lost as the segment size increases.
An alternative method for calculating derivatives is to use a Savitzky-G olay filter. In effect a polynomial o f specified order is fitted by least-squares to the data using a specified number o f data points before and after the point where the derivative is
required. The estimated derivative is then the derivatives o f the resulting fitted
polynomial. The process is repeated across the whole spectrum, m oving one data
point each time. All these least-squares fits would be laborious and very time
consuming, however, providing the data points are all equally spaced this can be very efficiently achieved using a S avitzky-G olay filter.
i
1100 1200 1300 1400 1500 1600 1700 1600 1900 2000 2100 2200 2300 2400 2500 2000 2100 2200 2300 1100 1200 1300 1400 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 2100 2200 2300 2400 2500 Wav®lenglh nm 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 2100 2200 2300 2400 2500Figure 1.19 Second derivative pre-treated spectra showing the effect of
segment size increases, a) segment size 4, b) segment size 8, c) segment size 16 and d) segment size 20. It should be noted that the gap size for each pre-treatment is zero.
There is little difference between the derivatives calculated using the segment/gap or the S avitzky-G olay methods. However, the drawback o f any differentiation process is the am plification o f noise.
Fearn recently published a short com munication in answer to the question “Are two
pre-treatm ents better than one?” . It was clearly illustrated that the use o f a
derivative followed by SNV gave a better reduction in unwanted sources o f variation than using each either independently or in fact using SNV before applying the derivative.
It must always be remembered that when applying pre-treatm ents developm ent and optim isation is vital. Although the objective is to remove variation unrelated to the analyte o f interest it is inevitable that small amounts o f ‘useful’ inform ation may be
become blinded by the fact that the final spectrum is neater and only apply treatments that are most appropriate.
1.8.5 Identification Algorithms
Once an appropriate array o f spectra is present in the library a chemometric algorithm is used to mathematically distinguish between the spectra. It must be established prior to construction what the expectations o f the library are, i.e. to merely identify different chemical entities or qualify compounds that differ in physical properties, for example particle size, product grade or source o f supplier.
Prior knowledge concerning the nature o f the library entries provides a considerable advantage when selecting the identification algorithm and the complexity o f the required predictions.
There are two types o f learning algorithm, supervised and non-supervised. The type o f method depends on whether the spectra are known to belong to specific groups or class o f compound.
Supervised methods work on the basis that they are trained beforehand. They can be either discriminate and split the region or space into classes or groups creating thresholds shared by the space. Alternatively, they could be modelling methods in which each group is set a different threshold depending on its characteristics.
Non-supervised methods identify by clustering in multidimensional space without prior knowledge to which groups the unknovm sample spectrum belongs to.
Identification can operate in either wavelength space or in dimension reduced factor space.
The identification algorithms that will be discussed in further detail include: Correlation in Wavelength Space, M aximum Distance in Wavelength Space, Peak Positioning and Soft Independent Modelling o f Class Analogies (SIMCA). These have
been selected as the most popular (with common applications in a variety o f commercial software packages) and are accepted within regulatory guidelines.
1.8.6 Correlation in Wavelength Space
Correlation in Wavelength Space is one o f the simplest methods for identification although it is regularly overlooked in favour o f more sophisticated and complex
methods. Blanco and Romero recommended it as the best method for identification
and illustrated its suitability with the construction o f a large library o f 125 raw materials. They highlighted the following advantages:
• independent o f the number o f compounds included in the library
• can be used with few spectra
• scarcely sensitive to slight instrument fluctuations
• can be expanded with new entries or additional samples for existing
entries in order to include additional variability in a rapid manner.
In addition Candolfl and M assait suggested that the model updating was
considerably more straightforward compared to that o f Principal Component Analysis (PCA).
Disadvantages exist in the fact that it is not a highly discriminating method when applied to different grades o f the same material.
If the ordinate values (absorbance, second derivative value etc.) o f two spectra change
in perfect synchronisation as you move across the spectrum then they can be considered as perfectly correlated. In practice a variable such as noise will mean two otherwise identical spectra will not have a perfect correlation. A plot o f ordinate value for one spectrum against the corresponding ordinate value for the other spectrum will give a straight line for correlated spectra.
A numerical measure o f correlation can be obtained by calculating either the product moment coefficient, Equation 1.33, or the dot product moment correlation coefficient. Equation 1.34.
r =
Yj^yryj){yk -yt)
- J E
~ ÿ k ŸEquation 1.33
r = r Equation 1.34
yj and yk are the measured ordinate values at the same wavelength for the library
spectrum and the unknown spectrum, ÿ j and are the average ordinate values
across the whole spectrum for the library compound and the unknown respectively.
Both equations give almost identical results, especially when second derivative spectra are used. The dot product correlation coefficient represents the cosine o f the angle between the two vectors representative o f the spectrum. For this study the product moment correlation coefficient was used.
A correlation o f 1 corresponds to a perfect match. A value o f 1 is rarely (never) observed because o f the random noise associated with any spectral measurements. A threshold value o f greater than 0.97 is commonly employed, if the correlation value is above this then it is said that there is sufficient similarity between two spectra to assume that they share the same characteristics. The next closest correlation match to a library entry is rarely, if ever, mentioned, although this is an important parameter. If the next closest match is particularly close e.g. within 0.05 then the possibility o f small instrument fluctuations over time may cause shift in the spectra that would change the correlation by as much as this and result in false positive or negative identifications.