# Prediction of Oleic Acid Content of Rapeseed Using Hyperspectral Technique
## 2 Materials and Methods
### Method  
#### 2.3.1 Multifractal Detrended Fluctuation Analysis (MF-DFA)  
For a given hyperspectral reflectance series \(\{x_{i}\}_{i=1}^{N}\), we calculated the profile as \(\{X_{t}\}=\sum_{i=1}^{t}(x_{i}-\overline{x})\), where \(\overline{x}\) is the average of \(\{x_{i}\}_{i=1}^{N}\) over the band length \(N\). Divide \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Number** & **Min/\%** & **Max/\%** & **Mean/\%** & **Standard Derivation/\%** & **Coefficient of Variation** \\ \hline
80 & 65.827 & 80.085 & 75.176 & 3.753 & 0.0499 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Statistical characteristic of oleic acid content rapeseed samples. Figure 1: ROI of rapeseed sample. the profiles \(\left\{x_{t}\right\}_{t=1}^{N}\) into \(Ns\equiv\left[N/s\right]\) non-overlapping segments with equal length \(s\). A short part of data at the end of profiles could be left, since that the \(N\) is not always an integral multiple of the given scale \(s\). In order to prevent the loss of original information, the dividing procedure is repeated starting from the opposite end of the profile. Thus, a total of \(2 Ns\) segments is obtained. Accordingly, the \(v\)-th segment is denoted as \(\left[lv+1,lv\right]\), where \(lv=(v-1)s\) for \(v=1\), \(2\),..., \(Ns\) and \(lv=N-(v-Ns)s\) for \(v=Ns+1\), \(Ns+2\),..., \(2 Ns\). Next, in each segment \(v\), determine the local trend by using polynomial fitting \(\widetilde{y}_{v}(k)\). Denote \(y_{s}(k)\) by the detrended series in \(v\)-th segment, as shown in the following. \[y_{s}(k)=y(k)-\widetilde{y}_{v}(k),\ k=1,2,\cdots,N_{s} \tag{1}\]  
In this work, we use a first order polynomial to fit the trend. Following this, we calculated the variance for every detrended series in segment \(v\). \[F^{2}(s,v)=\left\{ \begin{array}{ll}\frac{1}{s}\sum_{i=1}^{s}y_{s}^{2}[(v-1) s+i],&v=1,2,\ldots,N_{s},\\ \frac{1}{s}\sum_{i=1}^{s}y_{s}^{2}[N-(v-N_{s})s+i],&v=N_{s}+1,N_{s}+2,\ldots,2 N_{s}.\end{array} \right. \tag{2}\]  
In addition, the averaged \(q\)-order fluctuation function (\(q\
eq 0\)) over the all the segment can be calculated according to the following:  
\[F_{q}(s)=\left[\frac{1}{2N_{s}}\sum_{v=1}^{2N_{s}}\left[F^{2}(s,v)\right]^{q/2 }\right]^{1/q} \tag{3}\]  
and when \(q=0\), according to \(L^{\prime}\)_Hospital_, the \(F_{q}(s)\) is determined by the following. \[F_{0}(s)=\exp\left[\frac{1}{4N_{s}}\sum_{v=1}^{2N_{s}}\ln F^{2}(s,v)\right] \tag{4}\]  
Finally, vary the scale \(s\) and repeat Equations (1)-(4) to calculate the corresponding \(q\)-th fluctuation function \(F_{q}(s)\). If the spectrum possesses fractal nature, there exists a power-law scaling behavior between the \(F_{q}(s)\) and \(s\) as described in the following. \[F_{q}(s)\propto s^{h(q)} \tag{5}\]  
The index \(h(q)\) can be obtained by the linear fitting of \(F_{q}(s)\) and \(s\) in a double-log plot. The \(h(q)\) is called generalized MF-st exponent and describes the long-term correlation for the original spectrum. Generally, \(h(q)>0.5\) expresses persistence of the spectrum reflectance series \(\left\{x_{i}\right\}_{i=1}^{N}\) and the \(h(q)<0.5\) is anti-persistent. The multifractal nature is present in case of dependence of \(h(q)\) on \(q\). In order to measure the degree of multifractality, the \(\Delta ht\) defined by Equation (6):  
\[\Delta ht=h_{max}(q)-h_{min}(q) \tag{6}\]  
where \(h_{max}(q)\) and \(h_{min}(q)\) are the maximum and minimum of the \(h(q)\) for the considering \(qs\), respectively. In this work, we took \(q\in\left[-3,\,3\right]\). The larger \(\Delta ht(q)\) is, the higher the strength of multifractality is expected to be. According to the typical multifractal analysis (MFA), the quality index \(\tau(q)\), which can also express the multifractal nature, is related with \(h(q)\) as the following:  
\[\tau(q)=qh(q)-D_{f} \tag{7}\]  
where \(D_{f}\) is the topological dimension of the object. For the spectral reflectance series, the \(D_{f}=1\). When the \(\tau(q)\) is the nonlinear function of \(q\), the multifractality of object can be observed.