Int. Journal of Applied Sciences and Engineering Research, Vol. 3, Issue 3, 2014 www.ijaser.com 2014 by the authors Licensee IJASER- Under Creative Commons License 3.0 editorial@ijaser.com Research article ISSN 2277 9442 Anticipating milk yield using artificial neural network 1 Sonam kumari sharma*, 2 Sandeep kumar Jagannath University, Jaipur (India) DOI: 10.6088/ijaser.030300013 Abstract: This study utilized artificial neural networks for Herd Life and milk amount prediction which was based on back propagation neural network trained and tested on dataset provided. Suitable herd life and milk amount predictions can provide farmers and producers with valuable information. The study investigated the use of feed forward back-propagation(ffbp)artificial Neural Networks (Artificial intelligence technique) approach to measure and predict the herd life of cows at dairy farm and life time milk amount as recorded at dairy cattle farms in India. Data recorded at National dairy farm was used to predict the herd life and life time performance of the cows based on recorded genetic data of cows using computer Neural Networks (NN). While comparing the performance of the ANN model in simulating cows performance with actual data as recorded it was found that more accurate prediction values can be obtained by a neural network approach. Key words: artificial neural networks, dairy cows, prediction, herd life, total milk amount, feed forward back propagation neural network, network training, neural network toolbox etc. 1. Introduction In India Dairy industries have economically useful importance being a main source of income for majority of population living in villages. Being the world s largest milk producer, India is also the world s largest consumer of dairy products, which consumes almost 100% of its own milk production. Dairy products like milk, butter etc. are a major source of cheap and nutritious food to millions of people in India and the only acceptable source of animal protein for major vegetarian group of Indian population, particularly for the poor landless, small land marginal farmers and women. India is not a big contributor in world market in spite of being largest milk producer. Dairy industry is also useful to India because of uncertainty of rain in some parts of country which plays an important role in Indian agriculture. Dairy products overcome the lake of agriculture products. This study will be useful in dairy sector by predicting life time milk of cows and providing the opportunity to choose the best performing cow in the dairy herd. This study predicts the values of Herd life and Total milk amount of dairy cows. Herd life is the life of cows in years in which cows are useful for dairy industry and lives in dairy herd, while Total milk amount is the amount of life time milk in liters that a particular cow gives in its herd life. Available complex and nonlinear data need to be in organized form and then integrated and managed to form a dairy information system. The main objective of study was to select the animals that are useful for the dairy industry with long herd life as well as give maximum amount of milk in their life time. The industry s success is dependent on increased animal productivity through breeding programs and efficient management. To solve the selection and allocation problems, the need is to predict the life time milk productivity and herd life of animals. *Corresponding author e-mail: sonambhardwaj21@gmail.com) Received on April 2014; Accepted on May, 2014; Published on June 2014 690
Figure 1: Artificial Neural Networks Structure 2. Materials and methods The study describes that on the basis of known values, future values can be predicted. For this, MATLAB R2009B software with 64 bit version and license no 161051 was used. MATLAB software was installed in windows 2008 operating environment, while data of cows as recorded in national dairy research institute was used as a data base. The study was carried out on Karan Fries cows maintained at National Dairy Research Institute, Karnal Haryana. The data used in the present investigation were collected from pedigree sheets, calving reports, health registers and auction sheets. A total of 2972 lactation records of 977 cows sired by 104 sires were utilized. Cows that have completed at least one lactation period were considered in this study. Out of these data to predict the total life time amount of milk number of different cow s data were used, artificial neural network was created and data of cows were trained, verified and tested. The different data values used for life time milk amount prediction are as: Age on first calving (AFC), Calving interval, Total milk amount in first lactation, Productive life, Total Life time milk amount. It is the total amount of milk that any cow will give in its life time; this value has to be predicted. 2.1 Research method One way of predicting the Total amount of milk of dairy cows is by using ANN. This process uses (nntool) case in MATLAB software to train, verify, and test the neural network. EXCEL software was used for input data processing. Milk Amount Prediction Using Artificial Neural Networks: In our study we used graphical user 691
interface to create ANN. A graphical user interface is used for the neural networks toolbox (nntool). This interface allows for the following phases: 1. First the Excel data files have to be loaded into the MATLAB workspace. 2. GUI is opened to create networks for the input and target data using nntool. 3. Input data and target data are entered into the GUI by importing from workspace. 4. The weights are initialized, network is trained, and networks output result is simulated. 5. After simulating, the training results are exported from the GUI to the command line workspace. 6. Created variables are saved to the command line workspace from the GUI. 2.2 Training algorithms The back propagation was used for network training. Back-propagation neural networks (BPNN) are the common network architecture. BPNNs are training algorithms in a supervised style. The input-output pairs are used to train a network until the network can approximate a function (Haykin, 1999). 2.3The best function Different functions with different no. of architecture were investigated, using the Tansig function in the first hidden layer and Pure line function at second hidden layer we obtained the best results. 2.4 The best network architecture The best architecture was calculated by testing a different number of neurons in the hidden layer. Normally, one or two hidden layers within random large number of neurons may be sufficient to estimate any function. The minimum number of neurons in current study is 5. In this order MSREG methods were used to determine minimum error. The LEARNGDM learning function was selected for learning purpose of neural network (4-2-1: 4 input, 2 hidden layers, and 1 output). 2.5 Training In this part, 60% of input data comprising four kinds of information, Age at first calving, Calving interval, First lactation milk amount and Productive life were applied to train the network. 2.6 Verifying In this programme, the time stop of calculation was applied with 20% data to determine the network structure work that was not used in training. Verifying data have checked in a different sequence of training and continued when the number of error reduced in the verifying. 3. Testing Out of total data 20% data were applied for the testing process after training and verifying. 4. Results and discussions Creating an ANN based on recorded experimental results helps in predicting the Life time milk amount without the need for any practical operation. The output of the created network is compared with the recorded data to check the created network performance. In this case, seven networks with different structures as shown in Table 1 were constructed to identify the optimal result. The other parameters shown 692
in Table 1 such as training function, adaption learning function, performance function, number of hidden layer, transfer function in hidden layer, and transfer function in output layer, were considered to find the best network. The best network was selected based on the minimum error in training and the high correlation coefficient of data. The minimum error was extracted using the MSREG learning method for network7, as shown in Figure 2, which shows the mean square error. The correlation coefficient is also shown in different data sets in figure 3 for Network7, with 5 neurons in the hidden layer, is considered to have the best performance with minimum error as shown in Figure 2 and maximum correlation coefficient, close to 1 in fig 3. For this network, figure 4 shows the network output data graph. Network output graph is the important parameter in comparing with the networks output data and input data. In figure 4 network output data are similar to input data with minimum errors. However, the created network N7 is more knowledgeable than other network. Layer1 = TANSIG, Layer2 = PURELIN, Network Type = FFBP Network No. TABLE 1: Trained Networks Table Training Learning Function Performance Function Function No. of Neurons Network1 TRAINBR LEARNGDM MSE 12 Network2 TRAINBR LEARNGDM MSREG 15 Network3 TRAINGD LEARNGDM MSE 8 Network4 TRAINBR LEARNGDM MSE 10 Network5 TRAINGD LEARNGD MSREG 10 Network6 TRAINGD LEARNGD MSREG 8 Network7 TRAINBR LEARNGDM MSREG 5 5. Conclusion In this study, the experimental results of cows data samples were applied to generate an artificial neural network to predict the Life tome milk amount of dairy cows. The outcome of the created ANN was compared with the results of the experimental work which shows the nearest values to the recorded data. The selected network and its parameters were: 1. The architecture of the selected network having minimum error was four input, two hidden layer and one output (4-2-1). 2. Out of total applied data 60% data were used for training and 20% and 20% data were used for verifying and testing, respectively. 3. The ultimate network to predict the total milk amount was feed-forward back propagation in which the training and learning functions were TRAINBR and LEARNGDM, respectively. While TANSIG and PURELIN were the transfer function on layer1 and layer2 respectively. 4. The output results of the created network are close to the results of the recorded data of experimental effort. 693
Figure 2: Performance Graph Figure 3: Regression Graph showing Correlation Coefficient Figure 4: Network output Graph showing Milk amount 694
5. The selected ANN can be used to predict the total milk amount with minimum error, and a maximum correlation coefficient close to 1. 6. References 1. Karmakar K.G., Banerjee G.D, 2006. Opportunities And Challenges in The Indian Dairy Industry, Technical digest ISSUE 9 2. BharatiM. Ramageri, 2006. Data Mining Techniques and Applications, Indian Journal of Computer Science and Engineering, 1(4), 301-305, 3. Anders Krogh, 2008. Nature Biotechnology, Volume 26(2). 4. Parag.P.Kadu, Prof.Kishor Wagh P., Dr.Prashant Chatur N., 2010. Temperature Prediction System Using Back propagation Neural Network, ISSN: 2249-5789. 5. Razavi S. V., Jumaat M. Z. and Ahmed H. EI-Shafie, Using feed-forward back propagation (FFBP) neural networks for compressive strength prediction of light weight concrete made with different percentage ofscoria instead of sand, International Journal of the Physical Sciences, 6(6), 1325-1331, 18 March, 2011. 6. Rumelhart DE, Hinton GE, Williams RJ, 1986. Learning Internal Representations by Error Propagation. In Parallel Distributed Processing Foundations. Rumelhart DE, and McClelland J L. The MIT Press, 1. 7. Haykin S, 1999. Neural networks: a comprehensive foundation. Prentice Hall IncEnglewood Cliffs. N.J. 8. U.S. Food and drug administration, Hazards & Controls Guide for Dairy Foods HACCP, CFSAN/Office of Compliance October 2007. 9. Marie-Helene Hubert and Michel Moreaux, The challenge of meeting the future food needs, july 2007. 10. Lampinen J, Vehtari, 2001. A Bayesian approach for neural networks review and case studies, Neural Networks. 11. Wade K M and Lacroix R, The role of artificial neural networks in animal breeding, The fifth world congress on Genetics Applied to Livestock Production. 695