# Towards a Vectorial Approach to Predict Beef Farm Performance
## 2 Materials and Methods
### Standard vs. Vectorial Approaches: Experimental Settings
When dealing with sequential data, in which there are strong dependencies between the data features, i.e., in text or speech signals, a basic ANN is not able to properly address the task. In this regard, basic ANNs were developed to make way for a more efficient algorithm, particularly useful for time series. RNN is a type of ANN that has a recurring connection to itself. The gap between information may become very large, and the amount of sequential information can be complex to retain. As that gap grows, RNNs lose their ability to learn connections. To overcome the short-term memory weakness, (LSTM) architecture was designed to solve this problem with RNNs. By means of internal mechanisms, they keep track of the dependencies between the input sequences, storing and removing unnecessary information. The LSTM introduces the concept of cell states. By using special neurons called \"gates\" placed in the cell state, LSTMs can remember or forget information. Three kinds of gates are available inside the cell, in order to filter information from previous inputs (forget gate), to decide what new information to remember (inputgate), and to decide which part of the cell state to output (output gate). These gates are a sort of highway for the gradient to flow backwards through time. In Tables 5 and 6, the final optimal parameters are summarized. Regarding ST-GP, we provided the algorithm with a set of primitives \(F\) composed of {plus; minus; times; mydivide}, where plus, minus, and times indicate the usual operators of binary addition, subtraction, and multiplication, respectively, while mydivide represents the protected division, which returns the numerator when the denominator is equal to zero. Likewise, we chose proper functions for VE-GP. Differently from ST-GP, suitable functions are indeed provided to manage scalar and vectors [18,19]. For the considered problem, we used {VSUMW; V_W; VprW; VdiwW; V_mean; V_min; V_meanpq; V_minpq}. The first four operators represent the elementwise sum, difference, product, and the protected division between two vectors or between a scalar and a vector, respectively, e.g., VSUMW([2,3.5,4,1],[1,0,1,2.5] = [3,3.5,5,3.5]). The mean and minimum of a vector return the corresponding value for the whole vector (standard aggregate functions V_mean and V_min) or for a selected range \([p,q]\) inside the vector, where \(p\) and \(q\) are positive integers with \(0<p\leq q\) (parametric aggregate functions V_meanpq and V_minpq), e.g., V_mean([2,3.5,4,1]) = 2.6, whereas V_mean3\({}_{4}\)([2,3.5,4,1]) = 2.5. The fact that standard and parametric aggregate functions collapse the vectorial variable into a single value allows one to handle all the information contained in the vector or part of it. In addition to crossover and mutation, the algorithm is provided with an operator reserved for the mutation of the aggregate function parameters. It allows \(p\) and \(q\) to evolve in order to detect the most informative window in which to apply thereafter the aggregate function. The set of terminals was composed of the predictors in Table 2 for both ST- and VE-GP. \begin{table}
\begin{tabular}{l l} \hline \hline
**Parameter** & **Description** \\ \hline
**ST-GP** & \\ Maximum number of generations & 40 \\ Population size & 250 \\ Selection Method & Lexicographic Parsimony Pressure \\ Elitism & Keepbest \\ Initialization Method & Ramped half and half \\ Tournament Size & 2 \\ Subtree Crossover Rate & 0.7 \\ Subtree Mutation Rate & 0.1 \\ Subtree Shrinkmutation Rate & 0.1 \\ Subtree Swapmutation Rate & 0.1 \\ Maxtreedepth & 17 \\ \hline
**VE-GP** & \\ Maximum number of generations & 40 \\ Population size & 250 \\ Selection Method & Lexicographic Parsimony Pressure \\ Elitism & Keepbest \\ Initialization Method & Ramped half and half \\ Tournament Size & 2 \\ Subtree Crossover Rate & 0.7 \\ Subtree Mutation Rate & 0.3 \\ Mutation of aggregate function parameters & 0.2 \\ Maxtreedepth & 17 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Parameters used to perform GP.