## 4 Discussion  
The egg production cycle used for model testing was atypical in terms of data quality characteristics--uniformity and completeness for instance--thus adding more complexity in the process of selecting the most viable model and forecasting egg production based on such data.  
Regarding the importance of data quality, various measures can be taken. Applied techniques include outlier detection and removal and missing value generation (by interpolating neighbour values or association with another parameter). In general, data quality  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Model** & **MSE** & **MAPE** & **RMSPE** & **Sliding Window Size** \\ \hline Modified Compartmental & 0.011 & 9.134 & 14.809 & n/a \\ \hline LSTM & 0.272 & 5.390 & 7.751 & 2 \\ \hline CNN & 0.308 & 6.633 & 9.718 & 14 \\ \hline XGBoost & 0.719 & 6.114 & 8.158 & 14 \\ \hline RF & 0.604 & 6.077 & 9.016 & 5 \\ \hline \hline \end{tabular}
\end{table}
Table 8: The best results of model evaluation.  
Figure 7: Example of prediction page. Blue curve represents actual data, pink—predicted [52].  
must take place as one of the steps of pre-processing: the distribution of data must be analysed, and either normalization or standardization might be applied; the data must be checked for noise (mostly sensor related data) and addressed accordingly. Therefore, additional duplicate sensors can be included in the farm. Unless the quality is at its lowest, the general techniques for improvement should be sufficient to reduce impact on ML prediction, and, whereas minor imperfections may affect ML parameters, the trendline of outcome should be roughly the same. All of this would require the re-training and re-testing of the model with different levels of data quality.  
It must be noted that forecasting was performed for 1 day upfront only, which relatively limited the requirements for precision target. Additionally, while it was possible to forecast the production rate for longer periods, the results may have seen a rapid decrease in precision; thus, the appropriate forecasting length should be long enough to implement appropriate changes (i.e., adapt the ventilation algorithm for temperature changes) to the production process. In addition, the choice of forecasting only 1 day upfront was dictated by the consistency in the available training data. This also included differences between data of two separate cycles (as demonstrated in Figure 2).  
Another aspect that should be researched more is the number of factors needed to provide a reliable prediction. This could be important for smaller farms that might not have multi-sensor equipment to measure various parameters that affect hen egg production (such as CO2, NH3). A study carried out by [42] was aimed to determine the environmental factors that influence the egg production of laying waterfowls' (lion-head gosse). The authors found that the optimal number of parameters was equal to four (i.e., laying rate, carbon dioxide, temperature, and dust) when forecasting, using a combination of LSTM and RF. While it may have some differences, the general guidelines of having limited parameters, which can be observed consistently, may be projected to laying hens as well, but further studies (larger datasets) and practical evidential assessments are still required to confirm this.  
In the process of finding the optimal set of parameters, a lot of redundant and unimportant factors may be introduced that may lead the model astray; thus, we can assume that convoluting models with multiple parameters not only increase the difficulty for the data gathering step but may also lead to a decrease in the overall performance in regard to accurate forecasting.