THE USE OF ARTIFICIAL INTELLIGENCE FOR THE PREDICTION OF PRODUCTIVITY PARAMETERS IN SWINE CULTURE

In similar conditions of food handling and genetics, there are large differences in the final productivity of farms, resulting from inherent factors of the production system. This fact predisposes the need of studies on optimizing the rearing conditions of the farms, in order to verify the main limitations for the producers. Therefore, the present study aims to generate predictions of the swine productivity in the finishing phase, using variables related to their profiles and the production results achieved. 107 farmers belonging to a swine cooperative were considered in the study, located in 47 counties at the Taquari valley region, Brazil. Predictions were generated through the aid of neural networks, and the findings show that Artificial Neural Networks (ANN) can predict the productivity variables Feed Conversion, Mortality and Average Daily Gain for the proposed case.


INTRODUCTION
Currently, swine meat is the most consumed protein in the world, being more than half of it produced by China and the European Union (ABIPECS, 2013; USDA, 2010).Brazil occupies the fourth place with 3% of this production, a prominent place in relation to the global context, having an annual growth in production and export of approximately 10%, considering the absolute numbers of the last ten years (ABIPECS, 2013).
According to the report 2012/13 of the Brazilian Association of Producers and Exporters of Swine Meat (Associac ¸ão Brasileira da Indústria Produtora e Exportadora de Carne Suína: ABIPECS), in 2012, the international commerce in the sector dealt 5.81 million tons of meat, mainly exported to Japan, Russia, Ukraine, Mexico, South Korea and Hong Kong.Even struggling with sanitary barriers, the increase in European subsidies, and the increase in international competition, Brazil holds 10% of the market share, with approximate revenues of 1.49 billion dollars.
The swine culture is an important national zootechnics sector and presents one of the best economical performances in the international scenario.Technological and organizational advances in breeding, nutritional status, sanitary management, genetic quality and productivity of the herd are the main drivers which pose Brazil in this condition (Coelho et al., 2011;Costa et al., 2015).
Even so, under similar conditions of diet and genetics, there are large differences in the final productivity of farms.This can be mainly associated to weather factors, management, and material and human resources, which turns complex the behavior of the swine culture concerning the optimization of the resources allocated.2010) reported that artificial intelligence, in particular Artificial Neural Networks (ANN), have been increasingly used in an attempt to more accurately assess which factors in the creation of animals can significantly contribute to increase productivity, in order to predict the main limitations of cooperative producers.
In view of the facts, this research aims to generate predictions of the productivity data: Feed Conversion, Mortality and Average Daily Gain rate of swine in the finishing phase, to producers belonging to a cooperative.These predictions were obtained from the variables related to their profiles and the production results achieved, with the aid of neural networks.

MATERIALS AND METHODS
The development of the research was realized through the fulfillment of eight methodological steps proposed by the authors, as shown in Figure 1 2015), whereby a consensus was reached that the profile of the national production system is heavily based on a vertical organizational structure.This is basically due to the vast size of the country, the production of key inputs (corn and soybeans), and the use of advanced technology.As a result, domestic production costs are lower than the main international competitors.
In terms of the research context (1), Table 1 shows the most significant studies that address the issue, based on searches in the Web of Knowledge , Scientific Direct , Emerald and Scopus .It was included only manuscripts published from 2010 to 2014, using the keywords "artificial neural networks swine", "artificial neural networks pig" and "artificial neural networks agribusiness".Seventeen main articles were identified that generically address the issues of the theme, and none of them used artificial intelligence for the prediction of productivity parameters in swine culture.Therefore, this is one of the points that justify the present study.
Later, we determined nineteen input (2) variables (c), where each one is consisted of a series of profiles (b cp ), being divided into three groups (g), as shown in Table 2.This allows visualizing the results of the predictions in a more accurate way, based on the literature review and practical experience of the researchers involved.Thus, it is possible define the profile of each producer ( p) according to the variables selected to be study.
Regarding the output variables, we selected three zootechnical data (s): Feed conversion (ct ), Mortality (ms) and Average Daily Gain (ADG) (md), relative to the swine production corresponding to the producers of each profile.
The determination of the structural characteristics of the ANN (5) follows the neural paradigm approach proposed according the feedfoward perceptron concepts and is distributed in multiple layers (Multilayer Perpetron).Each input variables are processed in intermediate layers, generating the predictions used for comparison with the real values.
To minimize the error Ed s , the backpropagation method was used to conceive the network learning in a supervised way, enables the adjustment of synaptic weights and its respective level of bias, according to its intrinsic ability to reduce the error function of the system (Haykins, 2008).
Also, we opted to use a total of three different network topologies: one input, one output and another intermediate, arranged in a hidden nonlinear manner, filled with a total of four neurons.
Based on the results of various simulations, the activation function that returned the best accuracy was the hyperbolic tangent (γ Nb cp ), both in the intermediate and output layers, calculated through Equation where: e Nb cp : Exponential value for profile data standardization (Nb cp ); t angh(Nb cp ): Hyperbolic tangent value of Nb cp .
The upper and lower limits to the Nb cp , converted to the tangent function, are contained within the interval −1 to +1, respectively.The verifications were separated into three parts, to allow individual viewing of how each input variable behaves.In the end, graphs were obtained to identify how much the estimates are distant to the real values provided.
To the training phase (6) 70% of the researched universe was submitted to repeated stimulus coming from the parameters previously determined in its structural architecture, along with a list of weights randomly determined.
To determine the end of processing cycle of iteractions, two limit criteria were adopted: the learning rate (0.100) and the mean squared error (0.150).In case of failure to obtain the desired profile, the weights will be reset until one of the pre-set stop criteria is achieved, in order to represent that the network is in a satisfactory level of knowledge to its practical application.
Concluded the network improvements, the prediction test (7) for the 30% remaining data served to verify the performance level of the network in real use situations.The last two methodological steps were conducted using the software SPSS Statistics 19 , in specific its neural network interface.
Later, it was measured the accuracy of the different ANN architectures (8), calculating the sum of the squared errors (Ed s ), after processing the standard real input data (Nb cp ) and the output obtained according to the predictions (N b cp ), as shown by Equation ( 3 In a general way, Equation ( 3) represents the sum of errors found between predictions, for all profiles and criteria used for this research.After the verification, it is expected that the result is comprised in the range between zero and 1.50 (0 < Ed s ≤ 1.50), in accordance with the addressed context, so that the error does not deviate from a value considered as ideal for the prediction of producer profiles.

Characterization of population
Inserted to the context of the 120 producers studied, the cooperative divide them into seven regions, disposing one exclusive technician to serve each region.In relation to the general characteristics of the producers, it is possible to affirm that approximately 96% of them are male, being 64% involved, principally, with activities directed to swine culture.This fact is considered normal, since many proprieties have conditions to realize multiple production activities.
Regarding the education level, only 6.6% of the respondents are attending or already have an undergraduate degree, while 58.3% are found in the other extreme, of those who have completed or not the primary school.
Finally, about 56.6% of the producers are 41 to 60 years old.The sum of the values found on the extremes of the curve (21 to 30 and over 61 years) fulfills only 25.8% of the adopted universe.

Application of the ANN
Firstly, it was proposed the use of the Multilayer Perpetron (MLP) network, which is able to define previously the way the parameters of the modeling are arranged to the simulation.
Once these definitions were set, the network processing was performed.The first result observed was the summary of universe data available, in order to check if the split profile established in methodological step was processed correctly.The results generated are shown in Table 3.
The training was conceived through the use of approximately 70% of the considered universe, having three exclusions for Feed conversion and one for Average Daily Gain (ADG).For the three exclusions, the consecutive repeat of the mean square error have been the responsible criteria for stopping the iterations cycles.
The predictions for Feed conversion remained in the range between 2.20 and 2.34, as shown by Figures 2 and 3.It was possible to observe that the squared errors may be considered as low significance, both to the test (E1 ct = 0.858) and to the training (E2 ct = 0.126).A polarization of the data occurred mostly (71%) in the quadrants located in the top of the trend line plotted by Equation ( 4), concentrated in central region of the graphic.The residuals were shown as equivalent in relation to its approach to the horizontal axis (zero).
The disposition of the values can be considered homogeneous, without a significant negative (55%) or positive (45%) preponderance.To the degree of distortion, it was perceived that the results closer to the limit 2.34 have major inaccuracy to the superior amount (+0.11), while to the inferior the values with major inaccuracy are established in the intermediate range between 2.28 and 2.30 (−0.095).The predictions to Mortality remained in the range of 2% and 3%, as shown by Figures 4 and  5.It was perceived a polarization in the distribution of the data located in the left lower and top right quadrants, if considered the trend line proposed by Equation (5).A major concentration of values was found in the first (62%) in relation to the second (20%).This way, it was found that the established criteria strongly influence either of these two extremes.
In the measurement of the error, the values to the test (E1 ms = 1.187), differently to the found for training (E2 ms = 0.357), does not approaches to zero, but it is still comprised in the range considered as acceptable.
To the residuals, there was again a major dispersion to the points located in the predictions farther than zero.The same recommended to the producers, where both to lowest (−1.2) and the uppermost (+1.4) are comprised in 2.2 < ms < 2.4, being possible to affirm that the worst performances are to those who presented higher inaccuracy.
To the predictions for Mean Daily Gain, these remained in the range between 0.855 g and 0.903 g, as shown by Figures 6 and 7. 85% of the values were found concentrated above the trend line of Equation ( 6), denoting a strong tendency of the producers in presenting a performance approximately uniform.This fact is confirmed by the low variation of both the real data (0.04) and the predictions (0.10) to the normal distribution of the series.Also, it is possible to affirm that the criteria do not exert a significant predominance to the improvement of the swine production in the farms, from errors equivalent to E1 md = 0.634 and E2 md = 0.151 consistent to the range considered as ideal.To the residuals, it was visualized a behavior relatively similar to the one described to Mortality, where the points inaccurate are located approximately at 0.90.However, there is an exception to the lower outliner that is placed between 0.86 and 0.87 (−0.051).

CONCLUSION
According to the results obtained, the use of artificial intelligence can be considered feasible to predict the swine culture zootechnics parameters Feed conversion, Mortality and Average Daily Gain (ADG).The results obtained from the sum of the squared errors converged to values closer to zero, from the input criteria and output variables previously defined to the study.
The ANN allowed predicting productivity data, and to realize simulations to measure the behavior of each variable adopted in relation to the context.
It also serves for the managers in swine culture as a support tool, using only the profile in which the producers can be characterized to make decisions, according to the measurement criteria established and the outputs selected in the present analysis.
Therefore, there is no need to full scan the production data of producers, and the cooperative managers can reduce the analysis time of the potential production profile of each cooperated.
For future studies, we expect to apply to the same universe of producers other techniques of prediction models, such as Autoregressive Integrated Moving Average (ARIMA), Autoregressive Conditional Heteroskedasticity (ARCH) and Generalized Autoregressive Conditional Heteroskedasticity (GARCH), in order to note whether these results in relation to ANN have convergence or not.

Figure 1 -
Figure 1 -Methodological steps of the research.

1 )
) Bite(1); Bowl(2) Slaughterhouse distance(19) Over 80 km(1); 60 to 80 Km (2); 40 to 60 Km (3); 20 to 40 Km (4); Up to 20 Km(5) first containing the observations for training (70% of the total), and the second used to test the network (30% of total).Bicciato et al. (2003), Haykin (2008), Pandorfi et al. (2011) and Vieira et al. (2010), suggest that a previous statistical treatment of the data can result in improvements, especially when the extent of collected values is relatively large.Therefore, it was proposed the profiles b cp data standardization (Nb cp ) in discrete variables (4), described by Equation (1), according to the producers p characteristics as, in order to allow the application of the ANN, Nb cp = Nb cmax − Nb cmax − Nb cmin T c − b cp Nb cmax ∝ b cmax = 1 × 10 −4 Nb cmin ∝ b cmin = 0.65 × 10 −4 (Pesquisa Operacional, Vol.36(1), 2016 in a manner that: b cmax : Upper limit, according to the best profile value for criteria c; b cmin : Lower limit, according to the worst profile value for criteria c; Nb cmax : Standardized and proportional value of b cmax ; Nb cmin : Standardized and proportional value of b cmin ; T c : Sum of all b cp contained in each c.

( 2 )γ
according to Uykan et al. (2000), Nb cp = t angh(Nb cp ) Nb cp ∈ (−1, 1) Index used to identify whether the measured set belongs to the test (d = 1) or training (d = 2); c ∈ M: Criteria c selected according to all M options available in this study (M = 19); p ∈ N : Profile p selected according to all N options available inside each c; s: Type of output, equal to ct , ms or md.

Table 2 -
Input variable and its respective groups.