# Towards a Vectorial Approach to Predict Beef Farm Performance
## 2 Materials and Methods
### The Dataset  
Farms exhibiting continuous visits over a reasonable period, e.g., five years, were acquired. Constant recordings between 2014 and 2019 were then considered [15,16]. As a result, farms whose activity started recently were discarded from the study, as their management still could not be completely defined. Similarly, herds resigned between 2014 and 2019 were excluded to maintain a pool of contemporary farms with comparable data. In brief, the main filters commonly imposed to select herds to work with include the following criteria: cattle farms located in Piedmont with at least 30 cows, a percentage of artificial insemination between 90% and 100% were selected, and updated visits for all the years between 2014 and 2019. Once these farms were selected, it was possible to extract the reports referred to any period in the time window, e.g., 2017-2018, or to use all the five-years information. Finally, the variable used by the ML methods as the target variable was constructed, as it was not directly available in the original dataset. Since the aim is the prediction of the number of weaned calves per cow produced annually, the actual amount was extracted for the years 2018. For each farm over all selected years, the target attribute \(Y\) was obtained with the formula below, including the values of the number of the calves born alive, those unable to survive during weaning period, and the number of cows in the corresponding year:  
\[Y=\frac{N\_BALIVE-N\_ELIM}{COWS}. \tag{2}\]  
Sorting by herd and increasing year, the general dataset has the structure shown in Table 1.  
The study carried out took shape from the analysis of the summary data from 2017 to build the best predictive model for the number of weaned calves per cow produced in 2018. Setting this goal, it was, therefore, necessary to manage a dataset containing input variables for each farm. Given \(n\) instances and \(m\) variables, the dataset configuration from 2017-2018 (shown in Table 2) consisted in \(m\) input scalar attributes \(X_{17,i}\), where \(i=1,\ldots,m\) for each of the \(n\) farms. The number of weaned calves produced per cow in 2018 was obtained with Equation (2), which was named \(Y_{18}\) in this case. Since the results by GP did not improve by incorporating more features [15], it was more appropriate to focus on a smaller number of predictors, that can actually be reconducted to the target. As a greater number of features could become a source of noise, some \begin{table}
\begin{tabular}{l c c c c c} \hline \hline
**FARM** & **YEAR** & **PRIMIPAROUS** & **PLURIPAROUS** & **HEIFERS** & **INTERPARTO** \\ \hline Farm \(1\) & 2014 & 22 & 36 & 7 & 365 \\ \hline Farm \(1\) & 2015 & 10 & 46 & 13 & 375 \\ \hline Farm \(1\) & 2016 & 16 & 47 & 12 & 381 \\ \hline Farm \(1\) & 2017 & 14 & 46 & 11 & 375 \\ \hline Farm \(1\) & 2018 & 16 & 47 & 12 & 374 \\ \hline Farm \(2\) & 2014 & 11 & 90 & 9 & 396 \\ \hline Farm \(2\) & 2015 & 10 & 93 & 9 & 391 \\ \hline Farm \(2\) & 2016 & 9 & 95 & 7 & 380 \\ \hline Farm \(2\) & 2017 & 7 & 97 & 10 & 387 \\ \hline Farm \(2\) & 2018 & 9 & 92 & 11 & 385 \\ \hline Farm \(3\) & 2014 & 7 & 42 & 3 & 414 \\ \hline Farm \(3\) & 2015 & 4 & 43 & 4 & 439 \\ \hline Farm \(3\) & 2016 & 4 & 44 & 10 & 452 \\ \hline Farm \(3\) & 2017 & 10 & 44 & 11 & 425 \\ \hline Farm \(3\) & 2018 & 9 & 60 & 4 & 473 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Standard Data Panel. Structure of the dataset. The farms are listed horizontally, as well as the reference year, the variables vertically. variables that are actually less informative in predicting the target from an a posteriori zootechnical point of view were omitted in this study, as well as variables partially contained into other similar features. For example, in [16], both the total number of calves born and the number of births following natural impregnation were used by most GP models. The number of calves born from natural impregnation is already contained in the total number of newborns.