Introduction

Wood could be defined as the material composed of a set of xylem tissues that form the trunk, roots and branches of woody plants, excluding the bark. The different species of wood and even its different areas are characterized by many physical and chemical features such as the distribution, size and geometrical shape of the tracheids, the wood radios, the resin canals, vessels, pores and of course the proportion of its chemical components [1, 1618, 22, 23, 31, 32]. The different wood species can be grouped in two main sets, softwoods or conifers (gymnosperms) and hardwoods (dicot angiosperms), that also are subdivided into boreal, austral and tropical hardwood [18, 22]. However, in wood technology, there are not only differences between species, due to its high heterogeneity, but also there are significant differences in the same species and also in the same tree. That is the case of the presence of annual rings. In fact, wood growth rings or annual rings are visible in the cross section of the trunk of a tree. Annual rings appear due to new diameter growth in the vascular cambium. In temperate regions, because of the strong differences between seasons, the appearance of growth rings results from the different growth speed through the year. Inner parts of annuals rings are related to rapid wood growth. This less dense wood is named “early wood” or “spring wood.” Outer regions of growth rings are denser and correspond to the wood formed in summer or autumn, also named “late wood” [3].

There are several analytical techniques that can provide information about wood properties for classification purposes, such as spectrometry, image analysis and even acoustic data [19, 21, 26, 33, 41]. Nowadays, there are some studies that propose the TG and DTG curves to classify wood species, attending to the presence of different thermal properties. In recent years, some approaches using the TG curves, DTG curves and pressure differential scanning calorimetry (PDSC) curves have been proposed [14, 15, 38, 39]. In the present research, we seek for a solution for the classification problem focusing on the TG and DTG curves. They provide information of the mass loss and the mass loss rate of wood with respect to temperature and provide relevant information of the material thermooxidative stability [28]. Since wood degradation is dominated by the degradation of its three principal constituents [1]: cellulose, lignin and hemicellulose [1, 16, 17, 23, 31, 32], the differences in TG, DSC and DTG curves are strongly related to the different proportions of these components depending on the wood species.

Many different statistical methods have been applied in wood classification problems with a wide variety of results. Some works have addressed the classification problem using machine learning methods, such as neural networks (NN), support vector machines (SVM) or decision trees applied to Fourier transform Raman (FTR) spectroscopy and fluorescence spectra [19, 26] and to features obtained by image segmentation and texture analysis [21, 41]. Other alternative approaches, based on the application of multivariate classification techniques to vectors of features obtained from images, spectra or thermal curves, e.g., Linear Discriminant analysis (LDA), logistic regression (LR), quadratic classification (QDA), naive Bayes classifier (NBC) and k-nearest neighbors (k-NN), have been used in this framework [14, 15, 21, 39]. On the other hand, when the sample data have a functional nature (as it is case here with the TG and the DTG curves), a possible alternative to tackle this issue is the use of functional data analysis (FDA) approaches. In this line, nonparametric functional techniques were successfully applied in this field in [14, 15, 38, 39]. It is important to note that the term FDA refers to a relatively new branch of statistical techniques that allow to work with infinite dimensional data (curves or functions) without having to reduce their dimension. The increasing interest in FDA is due to the increasing capacity of collecting data of high and infinite dimension. In order to give a general idea about FDA, the most popular articles and monographs in the literature are [5, 6, 912, 20, 24, 30, 37]. In the present study, a kernel nonparametric functional data analysis (K-NPFDA) estimator, functional generalized linear models (FGLM) and functional generalized additive models (FGAM) are employed to identify early and late wood samples collected from a chestnut tree. Additionally, the corresponding results are compared with those obtained using some classical multivariate techniques.

To sum up, the main objective of the present research is to search for possible differences between early and late wood areas of annual rings in chestnut trees, taking into account their thermooxidative properties obtained by thermogravimetry (TG). This goal is obtained using a statistical modeling and machine learning approaches, providing proper statistical methodologies to solve this supervised classification problem.

Experimental

Thirteen samples of early wood and nine samples of late wood corresponding to a same chestnut tree, Castanea sativa, were analyzed by thermogravimetric analysis (TG). All the samples are bulk slides of wood with a mass between 6 and 8 mg. The thermogravimetric tests were performed in a rheometric STA 1500 simultaneous analyzer. Open alumina pan has a cylindrical shape with 5 mm of external diameter, 4 mm of inner diameter and 4.1 mm of height, employing a heating rate of 20 \(^{\circ }\)C min\(^{-1}\) from room temperature to 600 \(^\circ\)C and applying an air flow rate of 50 mL min\(^{-1}\). Figure 1 shows the places of the trunk from where the samples were extracted. The samples were taken from the chestnut trunk radially in 10 different rings from the trunk kernel to almost the bark. The samples were extracted from the part of trunk in the south side. In this area, it is easier to distinguish between the late and early wood in each growth ring. Thus, the sampling experimental error is minimized. The sampling process was designed to have a representative sample of the two kinds of wood in the trunk of European chestnut of minimum size.

Fig. 1
figure 1

European chestnut trunk from which the samples are drawn. Sampling process has been made in the south side of the trunk

Statistical analysis

Supervised classification can be defined as a set of methods that assign an instance (vector or infinite dimension curve) to a specific group or class, out of a number of possible classes. This work deals with the problem of classifying early and late wood samples of a chestnut tree using two general approaches: FDA and multivariate analysis. The specific classification methods applied in this study are shown in Fig. 2. The free statistical R software (the most popular and comprehensive statistical software) [29] was used to apply the multivariate and FDA classification methods. Specifically, the fda.usc e1071 and MASS libraries were employed in this research.

Fig. 2
figure 2

Classification methods

FDA classification methods: K-NPFDA, FGLM and FGAM approaches

Taking into account the good results that some FDA techniques have provided in this field in recent years, three different functional classification models have been employed in this study: a version of the nonparametric Nadaraya–Watson method (K-NPFDA), a functional generalized linear model (FGLM) and a functional generalized additive model (FGAM). The kernel nonparametric functional Nadaraya–Watson method (K-NPFDA) has been previously applied in [14]. Given a new curve, \(x=x(t)\), the posterior probability of belonging to a class g is estimated and the class corresponding to the maximum posterior probability is assigned to x. The asymmetric Gaussian kernel, K, was used, and the smoothing parameter, h, was selected by cross-validation.

Functional GAM and GLM classification methods were also considered. These methods provide the chance of including more than one functional predictor in the classification model, e.g., the TG and DTG curves. The functional GAM method was previously used in [15]. The categorical response variable y was estimated by a sum of k smooth functions of the covariates \(\pmb {X}\) and a g link function, according to the model:

$$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 \(\pmb {X}\) and \(E(f_{\text{j}} (X_{\text{j}} )) = 0\)

In the present case, the variable y represents the wood type (early or late) and the covariates \(X_{\text{j}}\) the TG and DTG curves. The \(\beta\) parameters and functions of the covariates, \(f_{\text{j}}\left( X_{\text{j}}\right)\), were expressed using b-splines basis or functional principal components (PC) basis.

The FGLM is a specific case of the GAM, where smooth effects of predictors in the response are not permitted. The scalar response y is estimated from functional \(\{X_{\text{q}}\left( t\right) \}_{{\text{q}}=1}^{\text{Q}}\) and/or nonfunctional variables \(\mathbb {Z}=\{Z_{\text{j}}\}_{{\text{j}}=1}^{\text{J}}\) such as \(y_{\text{i}}=g^{-1}\left( \alpha +\mathbb {Z}_{\text{i}}\beta +\sum _{{q}=1}^{Q}\left\langle X_{\text{i}}^{\text{q}}\left( t\right) ,\beta _{\text{q}}\left( t\right) \right\rangle \right) +\epsilon _{\text{i}}\), where \(g\left( \right)\) is the link, \(\epsilon _{\text{i}}\) zero mean and \(\sigma ^2\) errors.

FDA exploratory analysis and functional ANOVA

In this context, one of the aims of functional exploratory analysis is to obtain a measure of central location and variability of the TG and DTG curves. For this, an estimation of the overall functional mean and variance is computed. In this way, early and late wood could be compared considering the TG and DTG mean and variability. A resampling smoothed bootstrap procedure was implemented to estimate the functional mean of each type of timber with the corresponding bootstrap confidence bands [7, 25, 37]. More practical information about the features of this methodology can be consulted in [7].

Moreover, it is well known that a statistical ANOVA provides information about whether the mean of a quantitative response variable significantly varies depending on the level of one or more factors. The influence of factors on the quantitative response is tested. When the response variable is functional, functional versions of the ANOVA test have been designed [4, 5, 36, 37], preventing the loss of relevant information that could occur if multivariate techniques were applied (including PCA). In this line, applying a functional ANOVA test and considering the TG (or the DTG) curves as the response variable and the qualitative variable composed of 2 levels or classes: early and late wood; it is possible to check whether the TG functional means for both factors are (or not) significantly different. This ANOVA test can be mathematically expressed as:

$$\begin{aligned} &H_0: \,m_1= m_2\\ &H_1: \, m_1\ne m_2, \end{aligned}$$

where \(m_1\) and \(m_2\) represent the TG (or DTG) functional means of the early and late samples, respectively.

The most simple and smart way to implement the functional ANOVA is using random projection (RP). This procedure consists in the analysis of k random one-dimensional projections [4]. This functional ANOVA can be performed using the anova.RPm function available in the fda.usc package. Since k random projections are managed, it is necessary to apply a correction to the p values to prevent the rejection of the null hypothesis when this is true. The false discovery rate (FDR) method [4] can be used for this purpose. For more information, we refer the interested reader to [25].

Multivariate classification techniques

A more common approach to classify materials from a statistical point of view is to implement multivariate classification methods. This is an alternative approach consisting in discretizing the curves in finite dimension vectors, selecting some features of them and applying a proper multivariate classification technique.

The choice of the dimension reduction method to transform each TG and DTG curve in a vector of finite dimension is important in order to obtain optimal classification results. Mainly, there are two dimension reduction procedures: principal component analysis (PCA) and partial least squares (PLS). A better performance of the PLS method has been reported in many study cases [14, 39, 42]. Therefore, we decided to apply this procedure to discretize the TG and DTG curves.

PLS finds a linear regression model by projecting the predicted variables and the observable ones in a new space, taking into account the relationship between the response variable (class) and the feature vector. In order to obtain the new projection matrix constituted by the scores of the PLS components, the kernel algorithm [42], and R pls and ChemometricsWithR packages have been used. Since the projection matrix is obtained from the training sample, the scores of the test sample are calculated by multiplying the original vectors by the PLS projection matrix obtained from the training set. It is important to note that new features are independent and orthogonal; these are two requirements of optimality for methods such as LDA and NBC. In addition, features are sorted from the highest to the lowest explanation of the total variability of the data, gaining efficiency and saving computational requirements. Namely, the classification task can be performed using vectors composed of a few PLS components without losing relevant information. In summary, the PLS implementation reduces the dimension of the feature matrix, permits to apply multivariate classification methods when there are more variables than observations and also reduces the classification error since the multicollinearity problem in feature matrix is prevented.

In the present research, the multivariate classification techniques applied to the projected data matrix are LDA [13], QDA and NBC [15, 21].

Results and discussion

This section presents the results obtained from an exploratory analysis, a functional analysis of variance and the application of the FDA and multivariate classification techniques previously described to the TG and DTG curves, in order to seek for differences between early and late wood regarding their thermooxidative properties.

Figure 3 shows the 22 TG traces of the 2 different classes, early and late wood, after smoothing these curves with the nonparametric local linear estimator [15, 34, 40]. The use of local linear estimator also allows to obtain smoothed and reliable estimates of the of DTG curves. It is important to stress that the different classes cannot be clearly distinguished at a glance due to the high variability. In terms of thermo-oxidative degradation, the TG trends of chestnut seem to present two main degradation processes apart from the initial water mass loss. However, these are the results of several overlapped process related to the different components of wood (cellulose, hemicellulose and lignin) [27, 35].

Possible thermooxidative differences between early and late wood in chestnut could be due to the different proportions of the main constituents, structure, tracheid geometry, density, etc. In order to estimate the functional TG mean and variance for the samples of wood of each part, a smoothed bootstrap process was applied using 150 resamples. Figure 4 shows the functional means with their confidence bands (95 % confidence level). Although the functional mean of early wood is inside the late wood mean confidence bands in a wide temperature interval, there is a temperature range between 280 and 450 \(^{\circ }\)C where the early wood mean is slightly outside. This fact suggests that the functional means are different in a great part of the interval corresponding to the second main TG step.

Fig. 3
figure 3

The 22 smoothed TG curves using the local linear polynomial estimator

In Fig. 5, the DTG functional means are shown. Besides the TG curves, they also characterize the thermooxidative degradation of late and early wood of chestnut. It is important to note that since the TG tests were performed in an oxidant atmosphere, the DTG curves contain a larger amount of noise than that obtained in the case of pyrolysis tests. The differences of the DTG means of early and late wood are very slight as well, but the differences appear in the main degradation peak between 250 and 350°. The shape of the DTG peaks could be due to the presence of overlapped processes. In fact, as pointed out by [2], the first step of degradation depends on the hemicellulose and cellulose degradation to a great extent. If Fig. 5 is observed, the shoulder of the first main peak is usually assigned to the hemicellulose degradation, while the value and shape of the maximum combustion peak itself are more closely associated with cellulose degradation [2]. Thus, taking into account Figs. 4 and 5, the main differences between early and late wood in chestnut tree may be mainly linked to cellulose and hemicellulose degradation, as pointed out in [38]. The second peak refers to the combustion of solid charred resulting from the first step of degradation. The combustion rate corresponding to the second step is substantially lower due to the lower amount of remaining solid, among other causes.

Fig. 4
figure 4

Functional TG mean and confidence bands for early and late wood of chestnut

Fig. 5
figure 5

Functional DTG mean and confidence bands for early and late wood of chestnut

A functional ANOVA test [25] based on random projections and a FDR procedure was implemented to obtain an answer about whether the early and late chestnut wood present different thermal properties. RP functional ANOVA was applied to TG or DTG curves in a temperature range between 250 and 350 \(^{\circ }\)C, which corresponds to the interval of degradation of hemicellulose and cellulose [2]. This is the temperature range where more differences between DTG and TG means and lower variability were found (Figs. 4, 5). The hypothesis that the functional TG means are equal is finally rejected at a confidence level of 95 % (FDR p value \(=\) 0.043 < 0.05). Moreover, the hypothesis that the DTG means are equal is also rejected (FDR p value \(=\) 0.03 < 0.05). Thus, early and late chestnut wood are actually different with respect to their thermooxidative properties. Late and early wood are defined by different mass loss and different mass loss rate during their combustion, in the range of degradation of hemicellulose and cellulose. It is also interesting to note that more differences between DTG means than between TG means were found in the studied interval. This can be related to the fact that the DTG curves, in the studied temperature range (between 250 and 350 \(^{\circ }\)C), are not influenced by water evaporation variability. The functional ANOVA results are shown in Table 1.

Table 1 Results of the application of functional ANOVA using the RP method (with 5000 one-dimensional projections) and the FDR procedure to prevent the effect of applying multiple statistical tests

From the fact that early and late wood are different in terms of thermal properties, the next step is to measure to what extent they can be discriminated. Therefore, the implementation of supervised classification procedures is justified.

A leave-one-out cross-validation technique was applied to validate the proposed classification methods. Figure 6 shows this process with N individuals. First of all, one individual is extracted (test sample), while the remaining individuals represent the training sample. To apply the multivariate classification methods, first, the PLS projection matrix is obtained from the TG and DTG curves corresponding to the training sample (with known classes). Afterward, the classification model is obtained from of PLS projection matrix, then the TG or DTG curve of the test sample is projected in the PLS space obtained with the training sample, and finally, the class of the individual corresponding to the test sample is estimated.

Fig. 6
figure 6

Simple leave-one-out cross-validation procedure

Table 2 shows the results obtained after applying the multivariate approaches to the TG curves evaluated in a temperature range between 250 and 350 \(^{\circ }\)C. This interval corresponds to the degradation of hemicellulose and cellulose [2], where more differences between DTG and TG means (with narrower confidence bands) were found (Figs. 4, 5). Employing the PLS procedure, the information of a TG curve evaluated in more than 200 points is summarized in a few PLS components. The results show that 91 % of the samples were correctly classified, applying NBC to the first 9 PLS components. High proportions of correct classification were also found applying LDA (0.86) and QDA (0.84).

Table 2 Prediction probabilities for 2 different classes obtained by each multivariate classification method, using PLS components extracted from the TG

Table 3 presents the proportions of correct classification when the FDA classification methods (K-NPFDA, FGLM and FGAM) are applied to the TG and DTG curves at the range of temperatures between 250 and 350 \(^{\circ }\)C, corresponding to cellulose and hemicellulose combustion, and where more differences were observed (Figs. 4, 5). In the case of FGAM and FGLM models, a b-spline basis or a Fourier basis was used. In fact, X and \(\beta\) are represented with two b-spline (or Fourier) bases, composed of 13 and 5 elements. We also show an alternative functional PC basis: X represented by one basis of 7 functional PC [8].

Table 3 Proportions of correct classification when the FDA classification methods (K-NPFDA, FGLM and FGAM) are used

Higher proportions of correct classification are obtained by applying the functional classification methods to the DTG curves. This is in concordance with the differences in the functional means observed in Figs. 4 and 6. More differences between late and early wood are observed regarding the combustion rates than regarding the amount of mass loss. The highest proportions of correct classification are obtained by applying FGLM model with Fourier basis to the DTG curves (0.91), FGLM with PC basis (0.86) and FGAM with b-basis (0.82) to the DTG curves. Most of the samples have been correctly classified using these methodologies. Also high proportions of correct classification are obtained applying FGAM and FGLM models to the TG curves (0.77).

Taking into account that differences between late and early wood in a chestnut tree have been detected (and classification models can be successfully trained to identify them), more specific chemical and structural causes should be investigated in future. For example, this could be done by applying experimental techniques such as chemical analysis of ashes.

Conclusions

This study has been aimed at finding possible differences between the early and late wood of chestnut taking into account their thermooxidative properties and from a statistical point of view. Statistical FDA and multivariate techniques of analysis of variance and classification were applied to chestnut TG and DTG curves to detect significant differences between late and early wood, with respect to their combustion under an oxidant atmosphere.

The functional ANOVA test and functional statistical exploratory analysis from thermogravimetric data have shown that there are differences between the early and late wood of chestnut samples with respect to the thermooxidative degradation properties. TG and also DTG curves are different with statistical significance in the temperature range between 250 and 350 \(^{\circ }\)C. Therefore, the mass loss and mass loss rate during combustion processes are significantly different in this temperature interval that mainly corresponds to hemicellulose and cellulose degradation.

Furthermore, automatic statistical methods have been proposed to measure to what extent late or early wood can be discriminated from TG and DTG curves. Thus, supervised classification techniques applied to TG or DTG curves have been used to distinguish and to identify accurately the class of wood (early or late wood) in chestnut timber. High proportions of correct classification have been achieved by applying the majority of the proposed classification methods, supporting the ANOVA application results. The differences between late and early wood are as significant as to have provided an almost perfect classification. The highest proportion of correct classification, 0.91, was obtained by applying the FGLM functional method to the DTG curves (0.91). Thus, almost all the samples were successfully classified by applying the FGLM classification model with a Fourier basis to the whole DTG curves. The same result is obtained by applying the multivariate method NBC to the first 9 PLS components extracted from the TG curves (0.91). Therefore, almost all the samples can be correctly classified from the TG curves when PLS reduction dimension method is previously applied (saving computational resources). The mass loss and mass loss differences during combustion are high enough to be able to classify properly all samples between late and early wood.

This statistical procedure could be replicated in other species to verify differences in areas of trunk taking into account their thermooxidative properties, but combined with other experimental methods to find their chemical and physical causes.