**2. Pattern recognition in the complex spectral database – Example of fluorescence spectroscopy used in forensic medicine**

One of the limitations of conventional methods to determine the Postmortem Interval (PMI) of an individual is the fact that the measurements cannot be performed in real time and *in situ*. Several factors, environmental and body conditions influence the tissue decomposition and the time evolution, resulting in a poor resolution. Considering this limitation to determine the PMI, a possible solution is a new more objective method based on a tissue characterization of the degradation phases through optical information using fluorescence spectroscopy. If proven sensitive enough, this method shows a main advantage over conventional methods: less inter-variance and quantitative tissue information. These characteristics are relevant because they are less influenced by individual skills.[6]

During the decomposition process a wide variety of organic materials are consumed by natural micro-organisms and other unknown compounds produced by them. Using an objective method based on the tissue characterization of the stages of degradation by means of optical information using ultraviolet-visible fluorescence spectroscopy, followed by a statistical method based on PCA (Principal Component Analysis) made it possible to identify well features with time progression. The characteristic pattern of time evolution presented a high correlation coefficient, indicating that the chosen pattern presented a direct linear relationship with the time evolution. The results show the potential of fluorescence spectroscopy to determine the PMI, with at least a similar resolution compared to conventional methods.[6]

484 Advanced Aspects of Spectroscopy

with any parameter of interest. [3-5]

Spectroscopic techniques in this range of the electromagnetic spectrum have shown applications in different areas, from analytical chemistry to the diagnosis of some types of cancer, detection of citrus diseases and of dental caries, with a high sensitivity and good specificity rates. This is possible because the analyzed systems are composed of different types and concentrations of molecules. Thus, the spectrum of samples obtained under different conditions will also be different. It is therefore possible to identify and also quantify different compounds. However, the spectral variation can be characterized and correlated only with difficulty. This is mainly due to the fact that other phenomena, such as scattering and/or absorption, happen with the emitted light. In some cases, there may be other molecules in the sample presenting absorption bands that overlap in the same spectral region of the compound of interest, this mainly happens for absorption spectroscopy. In other cases, as in the case of fluorescence spectroscopy, the excitation and emitted light can be absorbed by other molecules making the signal too weak to be detected. A solution to this problem may be statistical procedures applied where the spectral information is correlated

A new application of a statistical method to process multi-layer spectroscopy information will be presented in this chapter. A brief review of the mathematical methods to analyze these spectroscopy data will be shown here, followed by two distinct examples. The first example is UV-VIS fluorescence spectroscopy, applied to detect the postmortem interval (PMI) in an animal model. The spectroscopy and statistical methods of analysis presented can be extended to other samples, like food and beverage. Here, a MIR absorption spectroscopy of liquid samples will be presented to detect and quantify certain compounds during the production of beer. Another system to measure liquid samples, which consists of a sample holder, will also be presented. This system offers a cheaper technique with a better

signal compared to techniques used to analyze liquid samples in the MIR region.

**fluorescence spectroscopy used in forensic medicine** 

**2. Pattern recognition in the complex spectral database – Example of** 

characteristics are relevant because they are less influenced by individual skills.[6]

One of the limitations of conventional methods to determine the Postmortem Interval (PMI) of an individual is the fact that the measurements cannot be performed in real time and *in situ*. Several factors, environmental and body conditions influence the tissue decomposition and the time evolution, resulting in a poor resolution. Considering this limitation to determine the PMI, a possible solution is a new more objective method based on a tissue characterization of the degradation phases through optical information using fluorescence spectroscopy. If proven sensitive enough, this method shows a main advantage over conventional methods: less inter-variance and quantitative tissue information. These

During the decomposition process a wide variety of organic materials are consumed by natural micro-organisms and other unknown compounds produced by them. Using an objective method based on the tissue characterization of the stages of degradation by means of optical information using ultraviolet-visible fluorescence spectroscopy, followed by a Another attractive feature of optical technologies is the fact that in situ information is achieved through a noninvasive and nondestructive interrogation with a fast response. Conventional laboratory techniques to determine PMI are time consuming and also require the cadaver removal from the location where it was found to a forensic lab facility. This operation already introduces additional changes to the analysis.

Fluorescence spectroscopy has been presented as a sensitive technique to biochemical and structural changes of tissues. The investigation of biological tissues is quite complex. Photons interact with biomolecules in several ways, and depending on the type of the interactions, they can be classified into three groups. The absorbers are the biomolecules that absorb photon energy. The fluorophores are biomolecules that absorb and emit fluorescent light. The scatterers are biomolecules that do not absorb the photons but change their direction. Several endogenous cromophores contribute and modify the final tissue spectrum. Distinct fluorophores emit light but the collected spectrum will be modified depending on the presence of absorbers and scatterers in the microenvironment on the path of the emitted photons and the probe interrogator. Taking into account all these light interactions that occur within the biological tissues, it is important to keep in mind that a tissue fluorescence spectrum is a result of the combination of all these processes occurring in the pathway between excitation and collection: excitation absorption and scattering, fluorescence emission, and fluorescence absorption and scattering.[5, 7]

Tissue changes begin to take place in the cadaver as soon as there is cessation of life. Optical characteristics change, and these changes may be detected using fluorescence spectroscopy. With the cessation of the metabolic reactions, tissue modifications are induced by several distinct factors, e.g. lack of oxygen and adenosine triphosphate, and intestinal microorganism proliferation. In this type of analyses, we first aimed to establish a proof of concept that fluorescence spectral variations for distinct PMIs are higher than the variance observed within each PMI. If the results are positive, a spectral time behavior can then be determined, i.e. fluorescence spectral changes identifying each PMI. This proposed method can be used to determine an unknown PMI based on a comparative analysis of a spectral database pattern. There is a potential correlation of the tissue fluorescence changes and the PMI, even though the same limitations concerning the time course variability of the cadaveric phenomena are also present, the optical spectra information can provide a more objective estimation.

Taking into account the resolution limitation to determine PMI in biological tissues, where the degradation process is non-homogenous and influenced by environment and cadaver intrinsic factors, the optical techniques may show a better PMI prediction when compared to current techniques.

The process using the principal component analysis is necessary to change the space analysis. For any type of spectroscopy, where space is determined by an analysis of light intensity in wavelengths of absorption or fluorescence, a change of base can be accomplished, where the variables become the variance of the dataset. We can explore this idea mathematically using a practical example. The set of spectra shown in figure 1 is a typical result of multiple samples.

**Figure 1.** Fluorescence spectra of different samples.

In this case, we are dealing with intensities as a function of the wavelength, presented in a graphic form. These same curves can be represented in a matrix, as shown in table 1. In this form, each row corresponds to a single measurement, i.e., spectrum of a sample, and each column is the value of the wavelength considered, which makes up this spectrum. Thus, each array element is the intensity measured at a wavelength specific to a spectrum.


**Table 1.** Fluorescence spectra in a matrix.

The next procedure to be performed after inserting the data set into this matrix representation is the centralization of the data around their average value. By fixing one column (wavelength) at a time we can calculate the average value for all lines (samples). Table 2 shows the mean values obtained.


**Table 2.** Matrix of mean values for each wavelength.

486 Advanced Aspects of Spectroscopy

typical result of multiple samples.

**0**

**Table 1.** Fluorescence spectra in a matrix.

Table 2 shows the mean values obtained.

**Figure 1.** Fluorescence spectra of different samples.

**500**

**1000**

**1500**

**2000**

**2500**

**Fluorescence Intensity (arb. unit)**

**3000**

**3500**

The process using the principal component analysis is necessary to change the space analysis. For any type of spectroscopy, where space is determined by an analysis of light intensity in wavelengths of absorption or fluorescence, a change of base can be accomplished, where the variables become the variance of the dataset. We can explore this idea mathematically using a practical example. The set of spectra shown in figure 1 is a

**<sup>4000</sup> Sample 1**

 **Sample 2 Sample 3 Sample 4 Sample 5**

**500 550 600 650 700 750**

**Wavelength (nm)**

In this case, we are dealing with intensities as a function of the wavelength, presented in a graphic form. These same curves can be represented in a matrix, as shown in table 1. In this form, each row corresponds to a single measurement, i.e., spectrum of a sample, and each column is the value of the wavelength considered, which makes up this spectrum. Thus,

**Wavelength (nm) 540 541 542 543 ... ... 749 750 Intensity Sample1** 27.5 30.6 33.9 37.7 ... ... 199.9 198.4 **Intensity Sample2** 25.5 26.7 29.6 35.9 ... ... 180.5 186.3

**Intensity SampleN** 24.1 25.3 27.9 30.2 ... ... 176.8 180.6

The next procedure to be performed after inserting the data set into this matrix representation is the centralization of the data around their average value. By fixing one column (wavelength) at a time we can calculate the average value for all lines (samples).

**...** ... ... ... ... ... ... ... ...

each array element is the intensity measured at a wavelength specific to a spectrum.

In the next step, each of the intensity values of each sample should be subtracted from this average value in the respective wavelength. The results for our example are shown in table 3.


**Table 3.** Normalized fluorescence spectra.

It is important to note that this procedure resulted in a better match between the variables. The first values had higher intensities (approximately 8 times) than the wavelengths around 750nm in relation to values around 540 nm. If this normalization of the data had not been performed, the outcome would have had a greater influence for the longer wavelengths, as if they possessed some kind of "privilege", which would not be correct from the standpoint that all the measured variables are also important.

Since each element of the initial data array is represented by an element qij, we can consider this procedure performed using the equation 1:

$$X\_{ij} = q\_{ij} - \overline{q}\_j \tag{1}$$

Where: x ij is the element of our new data matrix; qij is the array element data corresponding to the i-th measurement variable j; *<sup>j</sup> q* is the mean value of the variable j;

As the data were previously normalized, i.e. centered on their mean values, we proceed with the construction of the correlation matrix, where we obtain information about a dataset that indicates how the variables are correlated. This is possible by calculating the product of the transposed data matrix by itself. In mathematical terms, if x is our new array of standardized data xij composed of elements, then the correlation matrix R formed by these correlation coefficients is given by:

$$\mathbf{R} = \mathbf{X}^{\mathsf{T}} \cdot \mathbf{X} \tag{2}$$

A matrix whose elements are given by:

$$r\_{\vec{j}\vec{j}^{\circ}} = \sum\_{i=1}^{n} \mathbf{x}\_{i\vec{j}} \mathbf{x}\_{i\vec{j}^{\circ}} = \sum\_{i=1}^{n} \frac{(q\_{i\vec{j}} - q\_{\vec{j}}) . (q\_{i\vec{j}^{\circ}} - q\_{\vec{j}^{\circ}})}{\sigma\_{\vec{j}^{\circ}} \sigma\_{\vec{j}^{\circ}}} \tag{3}$$

The r*jj* value is a standardized covariance between -1 and 1. It should be noted that the matrix is Hermitian (symmetric in the case of real variables, which is our case). We can also confirm that the elements along the main diagonal of the correlation matrix (elements where j = j') correspond to the variance of the variable *qj*. As noted earlier, the correlation matrix R is Hermitian and therefore its eigenvalues are real and positive and its eigenvectors are orthogonal. For this procedure, it is important to note that the values of the wavelengths themselves are not taken into account in the mathematical calculation. The data selected for the next step are the rows and columns highlighted in table 3.

After calculating all the elements of the correlation matrix, the diagonalization is necessary. The diagonalization process provides two sets of data. The first are the eigenvectors: vectors which constitute a new base having the direction and sense in which the initial data set has more tendencies to vary, i.e. the maximization of the variance. The second sets of data are the eigenvalues, which provide the weight information, i.e. the relevance of each of the directions of the eigenvectors.

The eigenvalues are represented by the matrix K and the eigenvectors by the matrix V:

$$K = \begin{bmatrix} \lambda\_1 & 0 & \dots & 0 \\ 0 & \lambda\_2 & \dots & 0 \\ \dots & \dots & \dots & 0 \\ 0 & 0 & \dots & \lambda\_n \end{bmatrix} \tag{4}$$

As the diagonalized matrix was a correlation matrix, we assume that this new base formed by the set of eigenvectors of each R represents a percentage of the total variance; and the information contained in each eigenvector are unique and exclusive, since they are mutually orthogonal. Each *λi* in the K matrix represent the weight of the specific eigenvector. Through these eigenvalues we can determine which of the principal components explains the greatest amount of data. For the simple relationship between the value of each eigenvalue divided by the sum of all eigenvalues, i.e. / *i i* , we can determine the weight (or representation) of each eigenvector.

Once we determined the basis that maximizes the variance of the data set, which should be done by "projecting" the initial data matrix in this new basis through the product between the eigenvectors and the matrix of normalized data, we obtain:

$$\mathbf{S} \mathbf{\cdot} \mathbf{V} \cdot \mathbf{Q} \tag{5}$$

This data set designed in the new base (matrix S) is known as *Score*. The transformation of the basic matrix data S into the matrix Q by the base which maximizes the variances is known as Karhunen-Loève transformation.

The matrix of scores representing the data in our new base is expressed in such a way that each column represents the projection of the initial data into one of the eigenvectors, or in other terms, in either direction variance. Each line of the S matrix still represents a measure, or spectrum, as shown in table 4.


**Table 4.** Presentation of the available data with the new basis

directions of the eigenvectors.

by the sum of all eigenvalues, i.e. / *i i*

known as Karhunen-Loève transformation.

or spectrum, as shown in table 4.

of each eigenvector.

The r*jj* value is a standardized covariance between -1 and 1. It should be noted that the matrix is Hermitian (symmetric in the case of real variables, which is our case). We can also confirm that the elements along the main diagonal of the correlation matrix (elements where j = j') correspond to the variance of the variable *qj*. As noted earlier, the correlation matrix R is Hermitian and therefore its eigenvalues are real and positive and its eigenvectors are orthogonal. For this procedure, it is important to note that the values of the wavelengths themselves are not taken into account in the mathematical calculation. The data selected for

After calculating all the elements of the correlation matrix, the diagonalization is necessary. The diagonalization process provides two sets of data. The first are the eigenvectors: vectors which constitute a new base having the direction and sense in which the initial data set has more tendencies to vary, i.e. the maximization of the variance. The second sets of data are the eigenvalues, which provide the weight information, i.e. the relevance of each of the

The eigenvalues are represented by the matrix K and the eigenvectors by the matrix V:

1

*K*

 

the eigenvectors and the matrix of normalized data, we obtain:

2

As the diagonalized matrix was a correlation matrix, we assume that this new base formed by the set of eigenvectors of each R represents a percentage of the total variance; and the information contained in each eigenvector are unique and exclusive, since they are mutually orthogonal. Each *λi* in the K matrix represent the weight of the specific eigenvector. Through these eigenvalues we can determine which of the principal components explains the greatest amount of data. For the simple relationship between the value of each eigenvalue divided

Once we determined the basis that maximizes the variance of the data set, which should be done by "projecting" the initial data matrix in this new basis through the product between

This data set designed in the new base (matrix S) is known as *Score*. The transformation of the basic matrix data S into the matrix Q by the base which maximizes the variances is

The matrix of scores representing the data in our new base is expressed in such a way that each column represents the projection of the initial data into one of the eigenvectors, or in other terms, in either direction variance. Each line of the S matrix still represents a measure,

0 ... 0 0 ... 0 ... ... ... 0 0 0 ... *<sup>n</sup>*

(4)

, we can determine the weight (or representation)

**SVQ** = (5)

the next step are the rows and columns highlighted in table 3.

Now, instead of analyzing the data obtained on the basis of the variables that were defined as the value of the intensity at each wavelength, these are considered in the space of the variances of these values. This change of base allows a significant reduction of the information in which the data are analyzed.

Spectroscopy experiments measure intensity values in hundreds or thousands of wavelengths, providing up to hundreds or thousands of variables to be analyzed. Depending on the experiment, when calculating the principal components of this system we represent around 90% of the information system, i.e. the spectra obtained in only two components of this new base. The graph of two major principal components (PC1 versus PC2) provides a much better view to then analyze these data rather than the hundreds of dimensions we had obtained before. In other words, we now work with a significantly reduced number of variables, wavelengths, with no loss of information. On this new basis, each sample, which was previously represented graphically by a curve with hundreds of points, shall be represented by a single point only. This significant reduction and simplification makes it much easier to detect spectral patterns.

We will now go back to the example of determining the postmortem interval - the set of measures shown in figure 1. Each sample is a fluorescence spectrum from different postmortem intervals. We apply the above procedure and obtain results on this new basis. For this case, the first two principal components show a representation greater than 91%. These results are shown in figure 2, where each point represents a spectrum.

Comparing data of figure 2 to those of figure 1 a temporal evolution of standard measurements becomes obvious. Based on this analysis, each region of space PC1 x PC2 is characterized by a postmortem interval. So in terms of a practical application, if we have a spectrum obtained from an unknown postmortem interval, we just design it based on this new basis and thus allow matching of the region of space to this spectrum, represented by a new point. Thus, this procedure can be used to determine a postmortem interval using fluorescence spectroscopy for situations where this value is unknown.

The present methodology and results shown by Estracanholli et al.[6, 8] demonstrated the use of fluorescence tissue spectroscopy to determine PMI as a valuable tool in forensic medicine. Two approaches were employed to associate the spectral changes with the time evolution of tissue modification. First, direct spectral changes were computed using interspectra analysis, allowing establishing a pattern of the sample distribution with a time evolution. Second, the use of a statistical method based on PCA helped to identify features over time. In both cases, the characteristic time evolution pattern presented a high correlation coefficient, indicating that the chosen pattern presented a direct linear relationship with time.

**Figure 2.** PC1 versus PC2 showing a more evident distinction between the samples.

However, other cases of application of spectroscopic techniques require a more robust processing. One such case is the other example cited above, where the goal is to quantify various compounds in a complex sample containing various interferences, and this most often occurs in the regions of overlapping absorption (or transmission and emission) of compounds of interest. For these cases, the application of artificial neural networks is a powerful solution.
