Available online at www.sciencedirect.com Available online at www.sciencedirect.com
ScienceDirect ScienceDirect Available online at www.sciencedirect.com Procedia Computer Science 00 (2019) 000–000 Procedia Computer Science 00 (2019) 000–000
ScienceDirect
www.elsevier.com/locate/procedia www.elsevier.com/locate/procedia
Procedia Computer Science 152 (2019) 261–266
International Conference on Pervasive Computing Advances and Applications – PerCAA 2019 International Conference on Pervasive Computing Advances and Applications – PerCAA 2019
Application of Artificial Neural Network (ANN) for Animal Diet Application of Artificial Neural Network (ANN) for Animal Diet Formulation Modeling Formulation Modeling Pratiksha Saxena, Yaman Parasher Pratiksha Saxena, Yaman Parasher
Gautam Buddha University, Greater Noida, India 201308 Gautam Buddha University, Greater Noida, India 201308
Abstract Abstract This paper focuses on training the mathematical models for prediction of optimal livestock feed blend for animal. In this paper, This focuses training the mathematical models for prediction of optimal feedFor blend animal.three In this paper, three paper functions are on trained to find the most optimal percentage of price, nutrientslivestock and water. thisfor purpose objective three functions are trained find the most optimal percentage price, nutrients andalgorithm water. For this purpose threeANN. objective functions has been preparedto using corresponding values of feedofingredients and an is developed using The functions has been are prepared of find feed the ingredients an algorithm is developed ANN. with The objective functions trainedusing withcorresponding 5000 random values to optimizedand results and prediction ability isusing compared objectivemodel. functions are trained with 5000 values to the findexisting the optimized resultsmodels. and prediction ability is compared with existing Developed algorithm showsrandom superiority over programming existing model. Developed algorithm shows superiority over the existing programming models. © 2019 The Authors. Published by Elsevier Ltd. © 2019 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/) © 2019 The Authors. Published by Elsevier Ltd. This is an open access article under BY-NC-ND license Peer-review under responsibility ofthe theCC scientific committee of (https://creativecommons.org/licenses/by-nc-nd/4.0/) the International Conference on Pervasive Computing Advances This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/) and Applications – PerCAA 2019. Keywords:Mathematicalmodeling,R;artificialneuralnetwork; Keywords:Mathematicalmodeling,R;artificialneuralnetwork;
1. Introduction 1. Introduction In a typical animal food processing activity, it is always considered necessary to have an accurate estimation of In performance a typical animal food processing activity, it is always considered necessary to in have an of accurate estimation of vital indicators that can help to increase the overall output. However, most cases, estimation of vital performance indicators that can help to increase the overall output. However, in most of cases, estimation these performance indicators like optimal feeds often seems to be a great challenge. The main reason behind this of is these indicators like optimal feedsingredients often seemswhich to be varies a great as challenge. The main reason behind this is due toperformance complex interactions among various per different requirements. Therefore due to complex interactions among various ingredients which as per Therefore accurately predicting optimal feed blend is always considered as avaries daunting task.different With therequirements. ever-increasing market accurately predicting optimal feed blend is always considered as a daunting task. With the ever-increasing market size, income and living standards of the whole population, requirement of abundant food products from animals always size, income and living standards of the whole population, requirement of abundant food products from animals always are in high demand. But due to limited land availability, the required fodder always seems to be limited to a certain are in high due tothe limited land availability, thelivestock required feed, fodderoptimal always blend seemsofto ingredients be limited to certain extent only.demand. Thus toBut achieve high nutritional goals of toaachieve extent only. Thus to achieve the high nutritional goals of livestock feed, optimal blend of ingredients to achieve maximum weight gain is always taken into topmost priority. This work is an attempt to predict the behavior of animal maximum gainof is always into topmostwater priority. This work is an attempt to predict behavior of animal feed blendweight in terms nutrienttaken maximization, content (moisture) minimization andtheprice minimization. feed blend in terms of nutrient maximization, water content (moisture) minimization and price minimization. Algorithm in R has been developed for this purpose. Algorithm in R beenhave developed for this purpose. A number ofhas models been developed around the world to formulate animal diet using various programming A number of models have been developed aroundweighted the worldgoal, to formulate programming techniques. Some of which are Linear, Stochastic, dynamic,animal fuzzy, diet non using linearvarious etc. Details of these techniques. Some of which are Linear, Stochastic, weighted goal, dynamic, fuzzy, non linear etc. Details of these mathematical programming techniques for animal diet formulation discussed thoroughly with proper explanations to mathematical programming techniques for animal diet formulation discussed thoroughly with proper explanations to 1877-0509© 2019 The Authors. Published by Elsevier Ltd. This is an open access under the CC by BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/) 1877-0509© 2019 Thearticle Authors. Published Elsevier Ltd. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/) 1877-0509 © 2019 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/) Peer-review under responsibility of the scientific committee of the International Conference on Pervasive Computing Advances and Applications – PerCAA 2019. 10.1016/j.procs.2019.05.018
Pratiksha Saxena et al. / Procedia Computer Science 152 (2019) 261–266 Author name / Procedia Computer Science 00 (2019) 000–000
262 2
their limitations [1]. Pros and cons of a popular programming technique in animal diet formulation, usually called as the goal programming have been thoroughly explained in [2]. In [3] concepts of non-linear programming were taken into account to devise an animal diet formulation technique that can help in the maximizing the weight gain in the animals.Multi-criteria models are proposed to address economic and environmental considerations and to overcome the limitation of linear programming which leads to adverse environmental effects in the form of nitrogen and phosphorus excretions [4]. While in [5], estimation of digestible lysine (dLys), threonine (dThr) and methionine (dMet) nutritional requirements were done by artificial neural network (ANN) approach. In one of the cases, the artificial neural network method was taken into consideration to develop a neuro-fuzzy algorithm for African poultry feed formulation [6]. For the purpose MATLAB was used to tune and train the ingredients of the African formulated feed composition. Artificial neural network (ANN) models are developed to predict body weight using various independent (input) variables [7]. The whole research paper is broken down into five sections in total. In Section 2, review of literature in the context of mathematical modeling for animal diet formulation has been presented. In Section 3, a brief of machine learning in multi criteria model development of feed blend has been thoroughly explained. In Section 3, the methodology for the algorithm was introduced. Furthermore, in Section 4, discussion of results is presented, with conclusions in the section 5. 2. Determining feed ingredients by developing ML based ANN models In a typical animal food process work for the animal, there are certain factors that need to be taken into consideration while formulating an apt diet model for them. Some of them comprise of the price, feed quality and the requirements of the livestock for which the feed is to be prepared. It would be ideal only if the need of the animal nutrient content is satisfied with minimum price and max quality. It is therefore necessary to include these criteria while preparing optimal feed blend for the animals. Three main such criteria that needs to be considered are summarized in the points given below, 1. Price of feed blend, that needs to remain minimal. 2. Nutrient concentration, that needs to remain maximal. 3. Minimization of moisture content that helps in the increment of the shelf life of the blend. To deal with this, machine learning approach is adopted to predict the optimal feed blend. The work involves use of ANN (a machine learning algorithm), that helps to predict optimal values of the three criteria that helps to scale the livestock to desired level. For this purpose, optimization models of Zoran Babic and Tunzo Peric [8] meant for pig livestock feed are extended. In one of the paper, the optimal blend concentration for pigs within the weight bracket of 20-50Kg was computed through the multi-criteria based linear programming method. Here three functions were formulated, which ensure maximization of nutrient contents and minimization of moisture content and prices,that was based solely on the requirements of the pigs in consideration. The linear programming method used here formulate three objective functions which are given as,
𝑴𝑴𝑴𝑴𝑴𝑴. ∑𝟏𝟏𝟏𝟏 𝒏𝒏=𝟏𝟏 𝑪𝑪𝒏𝒏𝒏𝒏 𝒙𝒙𝒏𝒏
(1)
𝑴𝑴𝑴𝑴𝑴𝑴. ∑𝟏𝟏𝟏𝟏 𝒏𝒏=𝟏𝟏 𝑪𝑪𝒏𝒏𝒏𝒏 𝒙𝒙𝒏𝒏
(3)
𝑴𝑴𝑴𝑴𝑴𝑴. ∑𝟏𝟏𝟏𝟏 𝒏𝒏=𝟏𝟏 𝑪𝑪𝒏𝒏𝒏𝒏 𝒙𝒙𝒏𝒏
(2)
Here,Cn1,Cn2,Cn3 represents the values of coefficients for corresponding objective functions of min price, max nutrients and min water content in the taken feed. Several work done in the context of animal diet formulation used various mathematical programming techniques which generally employ large computation time when provided with large dataset. In this work, an attempt has been made to achieve better time complexity with minimal error rate. An algorithm is therefore prepared that laid the foundation for development of machine learning models for animal diet formulation. The dataset required for the analysis has been prepared in Excel sheet for 5000 values of each objective function prepared for the 13 feeds.
Pratiksha Saxena et al. / Procedia Computer Science 152 (2019) 261–266 Author name / Procedia Computer Science 00 (2019) 000–000
263 3
3. Algorithm Step1.Preparation of data,within specified limits accordingly Dataset: exp1 Step2.Normalizing data to appropriate scale norm <- function(x) { return((x - min(x)) / (max(x) - min(x)))} exp1_norm <- as.data.frame(lapply(exp1, norm)) Step3.Partition data into training and test sets exp1_train<- exp1_norm[1:3500, ] exp1_test <- exp1_norm[3501:5000, ] Step4.Building of model on the training dataset exp1_model <- neural net( F ~ X_1 + X_2 + X_3 + X_4 + X_5 + X_6 + X_7 + X_8 + X_9 + X_10 + X_11 + X_12 + X_13 , data = exp1_train) Step5.Evaluation of model performance by test dataset exp1model_results
264 4
Pratiksha Saxena et al. / Procedia Computer Science 152 (2019) 261–266 Author name / Procedia Computer Science 00 (2019) 000–000
Step 5: Evaluation of model performance The aptest indicator that helps us to test the fitness of the proposed model was the correlation factor. A correlation value close to one signifies presence of a strong linear relationship among the variables one takes into account. In our model, we got a correlation value of about 0.99981 which fairly exemplify the strong linear relationship among the variables we have taken into account, that too with a single hidden node. Since we know that neural networks with more complex topologies are quite capable of dealing with more sophisticated learnings, we experimented the initial model with five hidden nodes and so on to get an idea of the limit or extent to which we can carry out this work.
Error: 0.015332 Steps: 62865 Fig. 1. ANN model with one hidden node for Price
Fig. 3. Correlation value between two numeric vectors(exp1predicted_strength2 & exp1_test)
Error: 0.005847 Steps:12363 Fig. 2. ANN model with five hidden node for Price
Fig. 4. Correlation value between two numeric vectors (exp1predicted_strength & exp1_test)
During the run with more sophisticated neural network topologies, we were quite astonished to see a number of improvements in our model when we have taken into account five hidden node in place of the single which we have considered at the very beginning. From the results, it was reported that the error in the new model with five hidden nodes has been reduced to 0.0058 in comparison to the initial one which was 0.0153. Also apart from this, the number of iterations has been rised to quite high levels due to the tendency of the model to find the optimal weights. Another significant factor that we observed from the results was the improvement in the value of the correlation factor, which now has become 0.999918 in compare to the previous value of 0.999816. The developed algorithm is more suitable to extract the values (predicted values) of relevant criteria using a number of parameters on which the model has been trained. After this, same algorithm is applied for the remaining two test cases i.e. nutrients max and water min. Again using similar approach, following is the explanation of remaining two goals. Case 2. Predicting optimal Nutrient percentage for required feed blend
Pratiksha Saxena et al. / Procedia Computer Science 152 (2019) 261–266 Author name / Procedia Computer Science 00 (2019) 000–000
Error: 0.010628 Steps: 16373 Fig. 5. ANN model with one hidden node for Nutrient
Fig. 7. Correlation value between two numeric vectors (exp2predicted_strength & exp2_test)
265 5
Error: 0.00218 Steps: 15186 Fig. 6. ANN model with five hidden node for Nutrient
Fig. 8. Correlation value between two numeric vectors (exp2predicted_strength2 & exp2_test)
Case 3. Predicting optimal Water percentage for required feedblend
Error: 0.015842 Steps: 51247 Fig. 9. ANN model with one hidden node for Water
Fig. 11.Correlation value between two numeric vectors (exp3predicted_strength & exp3_test)
Error: 0.006243 Steps:8237 Fig. 10. ANN model with five hidden node for Water
Fig 12. Correlation value between two numeric vectors (exp3predicted_strength2 & exp3_test)
The error and correlation factor are the two important performance metrics that helps to evaluate the performance of the ANN model that are indicated separately for each of the three criterions e.g. Price, Nutrient and Water.
Pratiksha Saxena et al. / Procedia Computer Science 152 (2019) 261–266 Author name / Procedia Computer Science 00 (2019) 000–000
266 6
5. Conclusion The paper presents development of a machine learning algorithm in R to prepare a trained adaptive system for animal diet formulation. It is capable of predicting output that otherwise requires highly computational programming techniques. Algorithm is trained under an extensively large dataset and it provides the prediction value of the objective functions. Accuracy of algorithm is compared with the existing models through the SSE,correlation factor and iteration time. References [1]
P. Saxena and M. Chandra, Animal Diet Formulation: A Review (1950-2010),”CAB Reviews: Perspectives in Agriculture, Veterinary Science, Nutrition and Natural Resources, vol. 6(57), 1-9, 2011.
[2]
Milan Zeleny,The pros and cons of goal programming," Computers & Operations Research, 8, 357-359,1981.
[3]
P. Saxena , V. Pathak and V. Kumar , Programming Technique for Animal Diet Formulation: A Non-linear Approach, International Journal of Food Science and Nutrition Engineering, 2(5), 85-88,2012.
[4]
F. Dubeau ,P.O Julien and C. Pomar, Formulating diets for growing pigs: economic and environmental consideration, Annals of Operations Research ,vol. 190, pp 239–269, October 2011.
[5]
M. Mehri, Development of artificial neural network models based on experimental data of response surface methodology to establish the nutritional requirements of digestible lysine, methionine, and threonine in broiler chicks, Poultry Science, 91, 3280–3285,2012.
[6]
G. A. Aderounmu, E. O. Omidiora, B. O. Adegoke and T. A. Taiwo, Neuro-Fuzzy System for Livestock Feed Formulation(African Poultry), The International Journal Of Engineering And Science, 2, 25-32,2013.
[7]
E. O. Salawu, M. Abdulraheem, A. Shoyombo, A. Adepeju,S. Davies,O. Akinsola and B. Nwagu, Using Artificial Neural Network to Predict Body Weights of Rabbits, Open Journal of Animal Sciences, 4, 182-186, 2014.
[8]
Z. Babic´ and T. Peric, Optimization of livestock feed blend by use of goal programming, International Journal of Production Economics, 130, 218-223,2011.