## 3 Results and Discussion  
### B-Spline Curve Structure Determination  
Previous research has shown the possibility of using B-splines in solving non-linear problems. [PERSON] [50] proved the usefulness of two-piece spline to model the milk production and somatic cell count. Restricted cubic spline models were effectively used to determine the relation between dietary vitamin C intake and the risk of depressive symptoms [51]. The interpolation with cubic splines was also successful in determining the color of wines [52]. In the study, a parameterized B-spline curve, with control point coordinates that were modulated with the values of grain storage parameters, was used to develop the model for predicting the mycological state of barley grain. The first stage of the model construction was focused on determining the structure of the B-spline curve, which would provide the best possible approximation of the experimental data collected for a barley ecosystem stored under steady storage conditions. The elements determining the structure and performance of a B-spline that need to be defined during its design are the degree of the  
\begin{table}
\begin{tabular}{c c c c c c c c c c c c c c c c c c} \hline \hline \multicolumn{2}{c}{**CP no. : \(j\)**} & \multicolumn{2}{c}{**1**} & \multicolumn{3}{c}{**2**} & \multicolumn{3}{c}{**3**} & \multicolumn{3}{c}{**4**} & \multicolumn{3}{c}{**5**} & \multicolumn{3}{c}{**6**} \\ \hline \multicolumn{2}{c}{**CP value: \(y_{i}\)**} & \multicolumn{3}{c}{\(y_{i}\)} & \multicolumn{3}{c}{\(y_{2}\)} & \multicolumn{3}{c}{\(y_{3}\)} & \multicolumn{3}{c}{\(y_{4}\)} & \multicolumn{3}{c}{\(y_{5}\)} & \multicolumn{3}{c}{\(y_{6}\)} \\ \hline \multicolumn{2}{c}{**Factor**} & \(a_{w}\) & \(T\) & \(a_{w}\times T\) & \(a_{w}\) & \(T\) & \(a_{w}\times T\) & \(a_{w}\) & \(T\) & \(a_{w}\times T\) & \(a_{w}\) & \(T\) & \(a_{w}\times T\) & \(a_{w}\) & \(T\) & \(a_{w}\times T\) \\ \hline \multicolumn{2}{c}{**Gene no. : \(i\)**} & **1** & **2** & **3** & **4** & **5** & **6** & **7** & **8** & **9** & **10** & **11** & **12** & **13** & **14** & **15** & **16** & **17** & **18** \\ \hline \multicolumn{2}{c}{**Gene value of**} & & & & & & & & & & & & & & & & & & & & \\ \multicolumn{2}{c}{input organism: 1: x-x\({}_{1}\)} & 1-x\({}_{2}\) & 1-x\({}_{3}\) & 1-x\({}_{4}\) & 1-x\({}_{5}\) & 1-x\({}_{6}\) & 1-x\({}_{7}\) & 1-x\({}_{8}\) & 1-x\({}_{9}\) & 1-x\({}_{10}\) & 1-x\({}_{11}\) & 1-x\({}_{12}\) & 1-x\({}_{13}\) &piecewise polynomial and the number and arrangement of knots [26; 53]. In the research, to identify these parameters, B-spline curves were constructed for an exemplary dataset corresponding to one of the examined ecosystems stored at 18 \({}^{\circ}\)C and water activity in grain a\({}_{\mathrm{w}}\) = 0.85. In the course of the analysis, different degrees and the number of component curves forming the B-spline model were considered. The correlation coefficient (R), which was used to describe the goodness of fit of the B-splines to the experimental data, indicated a strong correlation between observations and estimates (R > 0.90). The simulation results presented in Figure 1 show that B-splines containing linear components, despite relatively high correlation coefficients, were the worst at approximating the analyzed data. Better results were obtained for B-splines, consisting of three and four square or cubic polynomials. It is worth emphasizing that when designing a B-spline, a compromise should be made between the quality of the data approximation and the number of knots. Overly increasing the number of knots can overfit the data and increase the variance, while overly reducing the number of knots can result in small curve flexibility and restrictive function with more bias [53]. Considering the complexity and quality of the model, it was found that the B-spline consisting of four second-order component polynomials was sufficient to approximate the analyzed dataset describing the level of fungal CFU in the examined ecosystem of stored grain (R = 0.996).