Introduction

An important task in wood technology is the correct identification of different wood species. This is considered a difficult activity mainly because of the complex structure of this material. In addition, this task is usually very costly because it requires highly qualified personnel. Thus, the application of automatic statistical models for recognition of wood samples is useful and justified. There are some papers addressing the problem of wood identification using different databases obtained with image-based and spectrum-based processing systems, and applying pattern recognition techniques. Non-supervised classification was developed using Fourier transform Raman (FTR) spectroscopy and Neural networks (NN) [1]. Yang et al. [2] applied NN to FTR spectra to distinguish temperate woods from tropical woods. Other supervised classification methods, such as \(k\) nearest neighbor (\(k\)-NN), linear and quadratic discrimination, and support vectors machines (SVM), were employed to classify fluorescence spectra corresponding to wood of different species [3]. The studies of Mallik et al. [4], on the one hand, and Bremananth et al. [5] and Wang et al. [6], on the other hand, represent interesting alternatives based on image segmentation and image textural analysis, respectively. Recently, Rojas et al. [7] used the information provided by stress-wave sounds.

In the context of historical and archeological studies, thermal analysis techniques and kinetic model applications have been recently used to identify wood species from a non-automatic point of view [8, 9]. Using automatic statistical methods, other alternative approaches to image and spectrum processing systems, consisting on applying multivariate and functional statistical techniques to thermogravimetric (TG) and pressure differential scanning calorimetric (PDSC) curves, have been proposed to solve the identification problem [1012]. However, the possibility of using the derivatives of the TG curves (previously estimated using the local polynomial regression estimator) as a source of data for statistical classification of wood species has not been studied yet. Thermogravimetry involves analysis of mass or mass percentage versus temperature, and also analysis of mass loss rate versus temperature (DTG). The observation of the DTG curves usually enhances the resolution [13]. This means that DTG curves are useful to distinguish overlapped mass loss events, to identify trend and maximum rate of mass loss processes, and also to identify small mass loss steps [14]. These features could make the DTG curves a successful tool to classify materials such as wood, with degradation processes of its main components (cellulose, hemicellulose, and lignin) strongly overlapped [10, 11, 1517]. However, the process of differentiation applied to obtain the DTG curves normally produces an increase of noise. Therefore, data are usually preprocessed (by smoothing or fitting a parametric or a nonparametric model) to estimate the corresponding derivative [13]. In the present research, we tackle this problem, focusing not only on the first TG derivative (DTG), but also on the second (2DTG) and third (3DTG) ones. Specifically, the present work should give an answer to the following questions: Is it possible to observe differences among wood species in the mass loss rate of wood samples? and Is it possible to classify woods from the differences present in the TG curve derivatives?

Wood degradation in an inert atmosphere is dominated by the degradation behavior of its three main components [18]: cellulose, lignin, and hemicellulose [16, 1824]. Cellulose represents about 40–60 % in the mass of dry wood (being 23–33 % in the case of softwoods), about 23–33 % is lignin in softwoods, being 16–25 % in the case of hardwoods, and finally 25–35 % is hemicellulose (more in hardwoods than in softwoods) [1, 22, 25]. The TG or the DTG curves, describing the pyrolysis of wood, nearly coincide with the sum of its constituent degradation [19, 24]. Moreover, the proportion of each wood component varies, to a greater or lesser extent, depending on the species [16, 20, 22, 23]. Therefore, we can guess the potential of these curves to classify different wood species. In this framework, we can stress the work of Dai et al. [26], where a procedure for the kinetic analysis on the decomposition of lignocellulosic materials is proposed.

It is important to note that there are no studies about wood supervised classification using the derivatives of the TG curves (in many cases, more informative and useful than the TG curves). In fact, thermal analysis techniques are not usual in automatic classification tasks. One of the most important reasons is the relative difficulty to deal with the information given by a curve of infinite dimension. The most common way to overcome this difficulty (present in many problems, corresponding to diverse science fields) is the reduction of the curve dimension. However, following this approach, a new problem arises; What features are actually representative of each curve? In the present study and regarding the DTG curves, a nonlinear regression model, related to logistic mixture regression [10], is proposed to explain the mass loss rate with respect to the increasing temperature. It consists of four components, derivatives of the generalized logistic function, one per principal constituent of wood (hemicellulose, cellulose, and lignin), and one corresponding to the water mass lost rate of the sample. The obtained regression parameters (four for each component, 16 altogether) are used as a vector of features, summarizing properly the information given by each curve. Using this procedure, it is possible to apply multivariate supervised classification methods, such as linear discriminant analysis (LDA), Logistic Regression, Naïve Bayes (NBC), \(k\)-NN, SVM, or NN.

Some statistical techniques designed to be applied to functional data (named functional data analysis (FDA) techniques) have been studied in the last years. They allow to work with infinite dimensional data (curves or functions) without having to reduce their dimension. The interest in FDA methods has increased considerably, because the technological progress allows collecting observations of infinite dimensional objects. Some references describing some of the most popular functional data analysis approaches are [2736]. In the present study, we compare nonparametric functional data analysis (NPFDA), functional generalized additive models (GAM), and classical multivariate statistical approaches to classify wood samples from their TG derivatives (TG curves and their derivatives up to order three). Considering the functional nature of the curves used here and the generally good performance of the statistical nonparametric and semiparametric methods in other fields, it is expected that NPFDA and GAM procedures will provide good results in this framework.

Accordingly, the objectives of this study are

  1. 1.

    Evaluating the potential of the first DTG curves, second and third TG derivatives as a source of information for wood classification tasks.

  2. 2.

    Introducing and applying a reliable smoothing method to overcome the problem of noise in the TG derivative estimation: the local polynomial regression estimator.

  3. 3.

    Implementing and evaluating the behavior of functional classification techniques. Special attention is paid to GAM models, because they represent a novel alternative that enables the use of more than one type of curves (e.g., TG and DTG curves simultaneously) to preform wood classification.

  4. 4.

    Comparing the results obtained by NPFDA and GAM supervised classification techniques with those obtained using multivariate methods, when the TG and the DTG curves are used. For this last purpose, a parametric regression model to summarize a curve information (infinite dimension) using 16 parameters (finite dimension) was proposed.

  5. 5.

    Finding the temperature intervals where the highest probability of correct classification is reached, when using the NPFDA technique with the DTG curves and their first and second derivatives. Relating these results with the degradation temperature ranges corresponding to the main wood constituents.

Experimental

Seven samples corresponding to seven different wood species of industrial interest are tested: five hardwoods (beech or Fagus sylvatica, chestnut or Castanea sativa, european oak or Quercus robur, jatobá or Hymenaea courbaril, and Eucalyptus globulus) and two softwoods (Scots pine or Pinus sylvestris and insignis pine or Pinus radiata). Seven samples per each species are selected. They are obtained from wood in the inner part of the trunk of different commercial planks. The sample mass tested is between 6 and 8 mg. Although the sample size used in this experiment is not very large, from our previous experience, we can deduce that if the samples are obtained from inside the trunk and are well dried (as it is the case here), the results are very similar independently from other possible factors. Therefore, we can assume that the samples considered in the present research represent quite well the species. The aim of this sampling process is to obtain a compromise between capturing the existing variability and minimizing the time of experimentation. The thermogravimetric tests were performed in a TA SDT 2960 TA Instruments simultaneous analyzer. The experimental setup consisted of a 20 °C min−1 linear heating from room temperature to 600 °C. Open alumina crucibles were used, and a 50 mL min−1 flow of nitrogen was kept along the experiments. The nitrogen was purged for 10 min, before starting the heating program for establishing an inert environment. That high heating rate is implemented to obtain a no time-consuming classification procedure, and also to test the classification methodologies in the worst conditions.

Statistical analysis: classification and regression methods

Supervised classification can be defined as a procedure assigning an instance (a finite dimension vector or a infinite dimension curve) to a certain group out of several possible alternatives. This is a process with multiple applications in industry, chemometrics, and materials science in general. The proposed classification methods try to find a relationship between the explanatory variables (multidimensional vectors or functional data, if it is the case) and a class indicator or group. The aim is to predict correctly the class of a new sample. This paper addresses this problem from two perspectives: functional and multivariate analysis (see Fig. 1). The free statistical software R [37] was employed to implement the multivariate and the nonparametric functional methods used in the present paper.

Fig. 1
figure 1

Classification methods and datasets

NPFDA classification methods

A nonparametric functional technique based on kernel methods (K-NPFDA) is applied to construct a classification rule to discriminate between the different wood species [32]. A sample of 49 thermal analysis curves, including the TG curves and, in general, their derivatives up to order 3 are used for this task. Using this approach, a curve is classified as belonging to the species or the group to which the highest posterior probability is obtained. The functional Nadaraya-Watson kernel nonparametric method, shown in (1), is applied. Given a new curve, \(x=x(t)\), obtained from a material (wood, in this case) to classify, the estimator of the posterior probability of belonging to a class \(g\), with \(g \in \{0,1,\dots ,G\}\), is given by

$$ \hat{r} _{\text{h}}^{{\text{g}}} (x) =\frac{\sum \nolimits _{i=1}^{n}I_{\left\{ Y_{\text{i =g}}\right\} } K\left( \frac{\left\| x-X_{\text{i}} \right\| }{h} \right) }{\sum \nolimits _{i=1}^{n}K\left( \frac{\left\| x-X_{\text{i}} \right\| }{h} \right) }, $$
(1)

where the observed curves, \(X_{\text{i}} =X_{\text{i}} (t)\), are a sample of explanatory variables, while the response sample consists of the observations \(Y_{\text{i}}\) of a discrete random variable taking values in the set {0, 1, ..., \(G\)}, the different classes. Note that in the present study, the sample \(X_{\text{i}},\; i=1,\ldots , n\), can represent the TG curves or their first (DTG), second, or third derivatives.

In our research, the Gaussian kernel, \(K\), is used. On the other hand, the smoothing parameter, \(h\), is chosen as the value that minimizes the probability of misclassifying a future observation, and it is selected according to the cross-validation method. This method consists in minimizing the cross-validation function:

$$ {\mathrm{CV}(h)}=n^{-1} \sum \limits _{i=1}^{n}I_{\left\{ Y_{\text{i}}\, \ne\,d_{\text{h}}^{-{\text{i}}} (X_{\text{i}})\right\} }, $$

where \(d_{\text{h}}^{-{\text{i}}}\) is the classification rule built up without the \(i\)-th observation:

$$ d_{\text{h}} (x)={\mathrm{{argmax}}}_{{0\le j\le G}} \left\{ \hat{r} _{\text{h}}^{(\text j)}\right\} $$

As pointed out previously, several scripts using the free statistical software R were written implementing these nonparametric approaches. Additionally, some functions belonging to fda.usc and fda R libraries [37, 38] were also used.

Functional GAM classification method

This classification is one of the most recent classification methods developed in the FDA field. Thus, this is the first time that it is applied to materials science and thermal analysis.

The categorical response variable \(y\) is estimated through a sum of \(k\) smooth functions of the covariates \( {\varvec{X}}\) and a \(g\) link function [39].

$$ E(y) = \mu = g^{-1}\left( \beta _0+\sum \limits _{j=1}^{k}f_{\text{j}}(X_{\text{j}})\right) , $$

with \(X_{\text{j}}\) the columns of \( \bf{X}\) and \(E\big (f_{\text{j}} (X_{\text{j}} )\big ) = 0\) The estimation of the model parameters is performed using the IRLS algorithm with backfitting steps [40]. The \(\beta \) parameters and functions of the covariates, \(f_{\text{j}}(X_{\text{j}})\), are expressed using \(b\)-splines basis. For more information, consult the work of Febrero-Bande and González-Manteiga [39].

In the present case, the \(y\)-variable represents the wood species, and the \(X_{\text{j}}\)-covariates can be the TG, DTG, 2DTG, and 3DTG curves. More than one covariate or type of curves can be used simultaneously in the model to estimate the wood class.

As in the case of the K-NPFDA method, we have written some code in R to implement this procedure, also using functions of the fda.usc R library.

Multivariate classification techniques

An alternative approach to the functional method described in the previous section consisted in discretizing the curves, selecting some features of them, and applying a multivariate classification technique. Following these lines, classical multivariate methods and machine learning approaches were used to classify the wood samples. To perform this analysis, we focused on the DTG curves. A new technique for DTG curve discretization was considered. This discretization was done using the parameters resulting from the fit of a nonlinear parametric model to the DTG curves. The model proposed to fit the experimental data consisted of a four term mixture of the first derivative of a generalized logistic function. These terms are related to the main wood components: cellulose, hemicellulose, lignin, and water:

$$ x(t)=\sum _{{\text{i}}=1}^{\text{n}}\frac{c_{\text{i}}\,\times \, b_{\text{i}}\,\times \, \exp \big ( -b_{\text{i}}\,\times \,( t-m_{\text{i}}) \big ) }{\left[ 1+\tau _{\text{i}}\,\times \, \exp \big ( -b_{\text{i}}\,\times \, ( t-m_{\text{i}}) \big ) \right] ^{\left( 1+\tau _{\text{i}}\right) /\tau _{\text{i}}}}, $$
(2)

where the \(c\) parameter represents the mass involved in the degradation process, \(b\) is related to the decomposition rate or rate of change, \(\tau \) accounts for the asymmetry, \(m\) represents the temperature at the maximum rate of change, and \(t\) is the temperature. The optimal fits were obtained by minimizing the average squared error (ASE). Once these fits and the discretization process were carried out, several multivariate classification methods, such as LDA, Logistic Regression, NBC, \(k\)-NN, SVM and NN, were applied. Next, a brief description of these approaches is presented.

The first multivariate classification technique, LDA, was proposed by Fisher [41]. This method assumes multivariate normality and equal covariance matrices between groups. In the context of wood classification, LDA was applied in [4].

The logistic model can be employed when the basic LDA assumptions are not fulfilled [42]. In the context of the present paper, it is important not to confuse the Logistic Regression classifier with the regression model composed of four logistic terms used to characterize the DTG curves.

The logit model is generalized to more than two populations, i.e., for qualitative response with more than two possible levels. Denoting by \(G\) the number of different populations, and \(p_{\text{ig}}\) the posterior probability that an observation \(i\) belongs to the class \(g\), then

$$ p_{\text{ig}}=\frac{\exp (\beta _{0g}+\beta '_{1g}x_{\text{i}})}{1+\sum ^{G-1}_{j=1} \exp (-\beta _{0}{_{\text{j}}}-\beta '_{1}{_{\text{j}}}x_{\text{i}})} $$

The NBC classifier is based on the Bayes rule. This method selects the event class or the sample as that corresponding to the largest posterior obtained probability (that is, the probability that a sample, \(X = \{x_1, \quad x_2,\ldots , x_{\text{d}}\}\), belongs to a particular class, \(C_{\text{j}}\), from a group of possible classes \(C = \{C_1,C_2,\ldots ,C_{\text{k}}\}\)). Note that assuming independence of the variables, the posterior probabilities are the following:

$$ p(C_{\text{j}}|X)\propto p(C_{\text{j}}) \prod p(x_{\text{k}} | C_{\text{j}})$$

The \(k\)-NN procedure is a well-known multivariate nonparametric supervised classification method [43]. Any parametric assumption has to be supposed for its application. A description of this approach can be found in [10].

SVM is a machine learning multivariate method, where the classification is done by constructing hyperplanes in a multidimensional space that separates the cases with different class labels [44]. See, for example, [10] for a description of this method.

NN is a nonlinear machine learning model based on the structure and performance of biological neural networks [45]. It consists of an interconnected group of artificial neurons grouped in layers that process information. In the special case of supervised classification, the mapping implied by the data is inferred and the cost function, related to the mismatch between the developed mapping and the data, is calculated.

In our study, some functions belonging to e1071, nnet, MASS, and kknn R libraries [37] were used to implement the previous multivariate classification methods.

Results and discussion

This section presents the application of the methods described in Sects. NPFDA clasification methods, Functional GAM classification method, and Multivariate classification techniques. Different thermal analysis curves of a sample of 49 wood items to classify them in different species were used. The procedure applied to validate the proposed classification methods was a double leave-one-out cross-validation technique. It works by leaving out one curve; then a model is trained with the 48 remaining curves (using another leave-one-out process), and finally, the model obtained is used for classifying the curve left out. This is repeated until all the curves have been left out once [32, 46]. Finally, the proportion of success or probability of correct classification corresponding to each classification method is calculated (overall and for each species). The leave-one-out cross-validation procedure is specially suitable when the number of samples is small. This validation procedure can be consulted in [10] or in [47].

Figure 2 shows the 49 TG traces corresponding to the seven different species, seven per species, after smoothing these curves with the nonparametric local linear estimator [48]. Note that each legend in this figure refers to the seven TG curves of each species. The local linear estimator is a particular case of the more general local polynomial estimator. This is a well-known nonparametric procedure used to estimate the mean function (or the trend) in a regression problem. In the framework of the present paper, denoting by \(\{ ( t_{\text{k}},Y_{\text{k}}) \}_{k=1}^{n}\), the observed values of a specific TG curve, \(Y_{\text{k}}\), for several temperature levels, \(t_{\text{k}}\), with \(k=1,2,\ldots ,n\), the following regression model could be formulated:

$$ Y_{\text{k}}=m({t}_{\text{k}})+\varepsilon _{\text{k}},\quad 1\le k\le n, $$
(3)

where \(\varepsilon _{k}\) are random errors. Our aim is “smoothing the data” or, in other words, estimating the mean function \(m(\cdot )\). With this smoothing process, we seek to eliminate the noise of the experiment, i.e., all the variability present in the curve that does not correspond to the experimental conditions scheduled. Thus, the TG curves become an almost functional relationship between mass and temperature.

The local polynomial regression estimator consists in locally fitting a \(p\)-degree polynomial to the observed sample, \(\{(t_{\text{k}},Y_{\text{k}})\} _{{\text{k=1}}}^{\text{n}}\), and it can be written as

$$ \hat{m}_{\text{h}}(t) = {e}_1' \left( {{X}}_{\text{t}}' {{W}}_{\text{t}} {{X}}_{\text{t}}\right) ^{-1} {\hbox {X}}_{\text{t}}' {{W}}_{\text{t}} {{Y}} $$
(4)

where \({e}_1 = (1,0,\ldots ,0)',\; {{Y}}=(Y_{1},\ldots ,Y_{\text{n}})'\),

$$\begin{aligned} {\hbox {X}}_{\text {t}} = \left[\begin{array}{cccc} 1 &{} t_1-t &{} \ldots &{}(t_1-t)^p \\ \vdots &{} \vdots &{} &{} \vdots \\ 1&{} t_{\text{n}}-t &{} \ldots &{} ({t}_{\text{n}}-t)^p\end{array} \right] ,\end{aligned}$$

and \({{W}}_t = \hbox {diag}\Big \{K((t_1-t)/h),\ldots ,K\big ((t_{\text{n}}-t)/h\big )\Big \}\), with \(K(\cdot )\) a kernel function, \(p\) the degree of the local polynomial (the local linear estimator corresponds to the case of \(p=1\)), and \(h\) the bandwidth. Similarly to the estimator given in (1), the bandwidth \(h\) is a very important parameter to be selected by the user in order to obtain reliable estimators. In Fig.  2, the corresponding bandwidth \(h\) was selected using a direct plug-in method [49].

Fig. 2
figure 2

The 49 smoothed TG curves using the linear local polynomial estimator, corresponding to the 49 samples tested, seven per species (each legend refers to the seven TG curves of each species)

An important advantage of the local polynomial regression estimator is that estimators of the derivatives of the mean function can by directly obtained [48]. For example, Fig.  3 presents the estimators of the first derivative of the TG curves (or DTG curves), calculated using the nonparametric local polynomial model, with a second degree polynomial, applied to the TG data. It can be observed in Fig. 3 that the DTG signal noise, usually much higher when numerical derivation is used than that in the TG signal, has been attenuated to a large extent. Additionally, estimators of the DTG first and second derivatives, obtained from the nonparametric model, are shown in Figs. 4 and 5, respectively. Local polynomials of degrees 3 and 4, respectively, were used to perform these fits. Similarly in Fig. 2, each legend in Figs. 3, 4, and 5 refers to the corresponding derivatives of the seven TG curves of each species.

Fig. 3
figure 3

Estimations of the 49 DTG curves or TG derivatives, using the linear local polynomial estimator, corresponding to the 49 samples tested, seven per species (each legend refers to the seven DTG curves of each species)

Fig. 4
figure 4

Estimations of the second derivatives of the 49 TG curves, using the linear local polynomial estimator, corresponding to the 49 samples tested, seven per species (each legend refers to the seven 2DTG curves of each species)

Fig. 5
figure 5

Estimations of the third derivatives of the 49 TG curves, using the linear local polynomial estimator, corresponding to the 49 samples tested, seven per species (each legend refers to the seven 3DTG curves of each species)

In a first step, the estimated DTG curves were used to classify the wood species, applying FDA classification methods (K-NPFDA and GAM models), described in Sects.  NPFDA clasification methods and Functional GAM classification method, respectively, and the multivariate approaches, presented in Sect. Multivariate classification techniques. Regarding the K-NPFDA technique, we have observed that a prior smoothing of the data (with the local linear estimator and an optimal bandwidth) to estimate the DTG curves led to a better correct classification percentage than that obtained when the DTG curves directly provided by the analyzer were used. Specifically, a probability of correct classification of 78 %, using the rough data, and a 82 %, using the estimated DTG curves. On the other hand, regarding the multivariate classification, after adjusting the parametric model consisting of the mixture of the first derivatives of four generalized logistic components, the resulting parameters were scaled, that is, each column of the feature matrix was centered and divided by its standard deviation for matching the feature variabilities. Then, the metric multidimensional scaling (MDS) technique was applied to obtain descriptive information about the multivariate data [42]. The MDS method calculates the distance matrix between samples. The information provided by this matrix can be approximated by two principal coordinates corresponding to the two largest eigenvalues of the matrix [42]. In Fig.  6, the data structure is plotted using two coordinates. It shows that the samples belonging to the same species tend to be closer than the samples belonging to different ones. All the species samples are grouped. The results seem good, but there is some confusion between Scots pine and insignis pine and between oak and beech. At a first glance, it seems that the parameters properly summarize the information of each curve, being useful to identify and classify these wood species. However, this descriptive study has to be corroborated with the results provided by the supervised multivariate classification methods.

Fig. 6
figure 6

Samples from different wood species, using MDS with two principal coordinates

Tables 1 and 2 show the percentages of correct classification when the different approaches are used. Table 1 is referred to the FDA classification methods (K-NPFDA and GAM models), and Table 2 shows the results of the multivariate classification procedures. Note that when classifying among the seven wood species with the estimated DTG curves, using both functional and multivariate methods, the results are excellent. However, the multivariate methods seem to perform better than the functional approaches, especially SVM using a Gaussian kernel (0.92), Logistic Regression (0.92), LDA (0.90), and NN (0.90). In general, results in Table 2 show that it is possible to classify among the seven studied species using these 16 parameters, obtained from the parametric fits as original multivariate data, jointly with the proposed classification methods. We can say that there are differences in the mass loss rate of the wood species and that the 16 parameters corresponding to each DTG curve summarize correctly these differences. It is important to note that LDA and Logistic Regression methods require a shorter computing time.

Table 1 Prediction probabilities for seven different classes obtained by each FDA classification method, using the smoothed TG curves, and their estimated derivatives up to order 3
Table 2 Prediction probabilities for seven different classes obtained by each multivariate classification method. The multivariate methods are applied using the extracted features from the TG and the DTG curves

Tables 1 and 2 also show, in the first column, the results when the smoothed TG curves were used. The best results were obtained with the K-NPFDA and the GAM methods (0.78, in both cases), slightly worse than using the estimated DTG curves with these techniques (0.82 and 0.80, for the K-NPFDA and the GAM procedures, respectively). In this case, to apply the multivariate classification approaches, the expression of the model of generalized logistic derivatives, given in (2), was integrated, obtaining a parametric model for the smoothed TG curves. In view of the results presented in Tables 1 and 2, the probabilities of correct classification using the DTG curves are always significantly higher than those obtained for the TG curves. In fact, as above mentioned, the DTG curves can provide higher resolution than TG curves and thus more information to classify the different wood species.

Functional data classification can also be done from the successive derivatives of the DTG curves (see Table 1). The probability of correct classification obtained from the estimated DTG second derivatives, applying the K-NPFDA method, is particularly high (0.90) and competitive with the results obtained using the multivariate methods with the DTG curves. It is interesting to observe that, in this case, the 3DTG or mass loss acceleration rate resulted more informative (0.90) than the DTG curves and their first derivatives (0.82 and 0.84, respectively). In addition, the 2DTG or mass loss acceleration is more informative than the DTG curve, while the DTG curves give more information about the wood species than the TG curves in this classification problem.

Functional techniques present the advantage of not having to perform any regression model to obtain the corresponding parameters. Note that we have not adjusted parametric models to the first and second derivatives of the DTG curves due to the increasing difficulty in terms of physical interpretation and the required number of components.

The results in Tables 1 and 2 are an indication of the potential interest that may have the study of mass loss acceleration and mass loss acceleration rate curves in the field of thermal analysis; in particular, in the case of material identification. The use of the local polynomial regression estimator to smooth the data allows to estimate the derivatives of the TG curves avoiding numerical derivation. As a result, much of the uncontrolled variability or noise, characteristic of the successive derivatives of TG curves, can be removed.

The analysis of the K-NPFDA method was completed detecting the intervals of the temperature range where this method provided better results. To do this, 1,280 intervals of temperatures were considered and the K-NPFDA procedure was applied in each one of them. The highest probabilities of correct classification were obtained in the temperature ranges of 209.1–305.1, 139.6–331.4, and 163.6–307.5 °C, when using the estimated DTG curves, and their estimated first and the second derivatives, respectively. The hemicellulose, cellulose, and lignin, the three main wood components, decompose at temperatures ranging between 200–260, 240–350, and  280–500 °C, respectively [16, 18, 20, 22, 23, 25]. Therefore, it can be observed that the referenced temperature ranges corresponding to the decomposition of hemicellulose and cellulose are the ranges where more differences among species were found, when using the estimated DTG curves and their first and second derivatives.

Regarding the functional GAM model, as previously mentioned, this is a very recent FDA classification method that can perform identification of materials using more than one type of curves. This is the only method that is able to work with more than one type of curves or functional covariates, in addition to the functional generalized linear model (GLM) approach [39]. Table 3 shows the results for the GAM method when it is applied to the curve pairs TG-DTG, TG-2DTG, TG-3DTG, and DTG-2DTG in the interval between 200 and 400 °C. The best results are highlighted in bold in Table 3. This is the range corresponding to the hemicellulose and cellulose thermal degradation.

Table 3 Prediction probabilities for seven different classes obtained by each GAM classification method, using the smoothed TG curves, and their estimated derivatives up to order 3

Comparing the results in Tables 2 and 3, it can be observed that higher proportions of good classification are obtained for the GAM approach when two types of curves are used. Thus, the TG derivatives actually add information that the TG curves did not provide. Due to the limited degrees of freedom (49 curves), the use, as covariates, of three or more type of curves is not possible. It is important to note that the GAM model provides the highest proportion of correct classification, 0.92, using the TG and DTG as covariates. The addition of DTG functional covariate increases in almost \(15\,\%\) the proportion of good classification. When the pair DTG-2DTG is used, the results are slightly lower because of the increasing of noise in derivative estimation. The application of functional GAM classification models could be even more useful when applied to larger databases. This method is strongly recommended for timber classification.

Table 4 shows the confusion matrix corresponding to the seven species, using the best multivariate and functional methods. Looking at the diagonal of this table, all the particular class probabilities are very high. There is only a little of confusion between oak and beech, and between Scots and insignis pine, possibly because the physical properties of these two pairs of wood are very similar. In the case of K-NPFDA method, the confusion between beech and oak is relatively high, but, apart from this case, there is almost no confusion. In the case of functional GAM, SVM, and Logistic Regression methods, the largest confusion occurs between the two types of pine species, although this is relatively small. This confusion obeys to its similar thermal degradation.

Table 4 Confusion matrix or probabilities of correct classification in seven groups, obtained with the second derivatives of the estimated DTG curves when applying the K-NPFDA method, and using the parameters extracted from the nonlinear fitting model of the estimated DTG curves when applying SVM and Logistic regression. The confusion matrix obtained applying the functional GAM method to the TG and DTG curves simultaneously is also presented

Conclusions

The obtained probabilities of correct classification show that it is possible to observe differences among wood species studying thermal stability tested by DTG. Thus, DTG is an appropriate technique for classifying wood species.

The functional GAM model is a flexible and useful proposal to classify wood species. The highest proportion of correct classification, 0.92, is obtained by this method. This is a high value compared to the results provided by other methodologies in the wood identification field. The GAM model permits to work simultaneously with TG curves and their derivatives. This represents an advance with respect to other approaches.

The functional nonparametric K-NPFDA classification method has also been successfully applied to discriminate among wood species. The best results were obtained when the second derivatives of the DTG curves (0.90), related to the wood mass loss rate, were used.

The application of local polynomial smoothing with an optimal bandwidth significantly improved the correct classification percentages. It removed much of the uncontrolled variability or characteristic noise of the successive TG curve derivatives. As a consequence of this, we observed that the DTG second derivative or mass loss acceleration rate provided more information than the rest of the thermogravimetric curves considered for classification purposes. In addition, the DTG first derivative or mass loss acceleration was more informative than the DTG curves, while the DTG curves gave more information than the TG traces, in this supervised classification problem.

Mainly, the referenced temperature intervals corresponding to the decomposition of hemicellulose and cellulose were the ranges where more differences among species were found, using the DTG curves and their first and second derivatives, when the K-NPFDA method was used.

A parametric regression model consisting of the mixture of the first derivatives of four generalized logistic components to fit the DTG curves and to extract some features of these curves was proposed, obtaining very good performance. The model is justified on the basis that there are mainly four different degradation processes. Using these features (represented by 16-dimensional vectors), multivariate classifiers such as SVM with Gaussian kernel (0.92), NN (0.90) and Logistic Regression (0.92) produced slightly better probabilities of correct classification than functional methods when the DTG curves were used. However, the K-NPFDA approach was able to give similar results (with a shorter computing time) when the estimated DTG second derivatives were employed.

In summary, functional nonparametric and semiparametric classification techniques (GAM and K-NPFDA) are competitive if they are compared with traditional and machine learning multivariate procedures. FDA methods use all the information provided by the thermal curves and can be run more quickly, avoiding the data dimension reduction process. This makes GAM and K-NPFDA functional methods appropriate techniques to classify wood species using thermogravimetric data.

This paper shows a first approximation to classify wood species using the derivatives of the TG curves and FDA techniques. Although the sample size employed is not very large, we can assume (based on our previous experience) that the samples considered represent quite well the species. Of course, in a future research, a more intensive sampling would be possible to study the influence of several factors on the intra-species variability. Additionally, this work establishes a starting point that opens the possibility of applying these procedures to other materials.