Fuzzy Prediction and Pattern Analysis of Poultry Egg Production
Fuzzy Prediction and Pattern Analysis of Poultry Egg Production
Department of Computer Science, Adekunle Ajasin University, P.M.B. 001, Akungba-Akoko, Ondo State, Nigeria
Keywords: Egg production is geared towards large scale production of eggs for profit maximization and consumption. But
Egg production poultry farmers are faced with challenges that affect the quantity and quality of egg production during the
Fuzzy prediction production life cycle such as quality of feed intake, management issues, genetic factors of the breed birds, age at
Fuzzy inference systems egg laying period, presence of diseases, molting flock, housing and others. Several mechanical solutions have
Pattern analysis
been suggested to implement the production cycle but with very high cost implication which calls for the need of
Decision analysis
soft computing methods to model the egg production process. However, modelling egg production curve is a
complex task because a typical egg production curve (from week 20 to week 72) is characterized by nonlinear
probabilities and imprecise knowledge in the egg production process. This paper proposes an optimal fuzzy
predictive model for poultry egg production. The motivation stems from analyzing the non-linearity and im-
precision in egg production which is best handled by fuzzy logic as compared to other soft computing techni-
ques. Data samples were collected on the age of chicks, quantity of feeds, quality of feeds, body weight of chicks
and total egg production as input into the proposed system. The first stage of implementation is carried out in the
Statistical Package for Social Science (SPSS) software environment to perform correlation analysis while the last
two stages are carried out using Fuzzy Toolbox in MATLAB based on its capability to model and simulate
complex systems with robust and interpretable predictions. Gaussian membership function was used in the
fuzzification process while Mamdami structure was adopted as the fuzzy inference system (FIS). Model per-
formance evaluation showed that the proposed system performed excellently by achieving best prediction ac-
curacy 100% Pred(30) with an approximate mean magnitude relative error (MMRE) of 0.11744 as compared to
the results in the reported literature. The method has proven to be a cost-effective and simple approach to
modelling through the use of samples and parameters from poultry house.
1. Introduction ranking 19th in world hen egg production and the top producer in
Africa (USDA 2013).
Poultry farming is a lucrative venture in agriculture that involves Egg production, often seen as a commercial business, involves full-
raising and management of domesticated birds such as chickens, tur- time labour and is geared toward producing sufficient scale of eggs. Egg
keys, geese for the purpose of farming meat or eggs for food. Poultry are production can be mechanized or traditional. The latter is mostly re-
farmed in great numbers with chickens being the most numerous. ferred to as backyard poultry or farm flock production. The process of
Chickens largely dominate flock composition and make up about 98% egg production whether through mechanized or traditional means have
of the total poultry numbers (chickens, ducks and turkeys) reared in same generic life cycle of production. Day-old chicks (DOCs) are ob-
Africa (Gueye, 2003). Chickens raised for eggs are usually called layers tained from local hatcheries licensed by international hybrid breeding
while chickens raised for meat are often called broilers. An average companies (Ajayi, 2010). The small chicks are either brooded naturally
layer’s production cycle lasts for about 52 to 56 weeks. Poultry farming or artificially, if brooded artificially, DOCs must be housed separately
accounts for a favourable portion of revenue in the agricultural sector. from laying chickens so as to protect the chicks from predators, diseases
According to a report presented by the United State Department of and catching colds. This brooding stage lasts for about eight weeks.
Agriculture (USDA), the poultry industry in Nigeria had been rapidly Brooding is the process whereby the mother hen protects and warms
expanding in past years, increasing from 185,300 metric tonnes in 2001 the chicks after they have been hatched. This is an essential part for
to 268,000 metric tonnes in 2011 (USDA 2013). In 2011, Nigerian hen their maturity (Ajayi, 2010). During the first four weeks of life, small
egg production totalled 636,000 MT and was valued at $527.49 million, chicks are kept in brooding box. After the first month, they are removed
⁎
Corresponding author.
E-mail addresses: [email protected] (T.G. Omomule), [email protected] (O.O. Ajayi), [email protected] (A.O. Orogun).
https://doi.org/10.1016/j.compag.2020.105301
Received 7 November 2019; Received in revised form 16 February 2020; Accepted 20 February 2020
Available online 28 February 2020
0168-1699/ © 2020 Elsevier B.V. All rights reserved.
T.G. Omomule, et al. Computers and Electronics in Agriculture 171 (2020) 105301
from the brooder box and placed in the brooder house. At week 8, the This decision making is a complex problem in which only computa-
chicks enter the grower stage which lasts until they are twenty (20) tional techniques can handle intuitively. Constant selection in the ge-
weeks old. At this stage, they (the growers) are either housed separately netic pool, nutritional factors, and environmental concerns, however,
from small chicks or continue to be reared in brooder-cum-grower make such (Gompertz or other nonlinear statistical) models limited in
houses. Proper management of the growers affects egg production their utility because of the difficulty of fitting the growth curve across
performance. At the 18th week, the growers are transferred to laying time, bird strains, and other determining variables (Ahmad, 2009).
houses to commence laying of eggs. The rate of egg production here is Therefore, this paper presents a fuzzy predictive model for optimum
quite small until they reach week 21 when they produce commercial egg production prediction which will serve as a veritable framework for
quantities of eggs per week. The choice of housing of these layers is poultry farmers and extension workers in decision making and planning
determined by type of production desired, quantity, climate area and during the mid and later phases of egg production life cycle.
the financial power (Ajayi, 2010).
A number of factors (or variables) affect the quantity and quality of 2. Related works
egg production during the production life cycle. These include feeding,
quality of feed intake, management issues, genetic factors of the breed Several approaches and characteristic problems in poultry farming
birds, age at egg laying period, presence of diseases, molting flock, and egg production have led to the introduction of fuzzy logic metho-
housing, egg collection, behaviours layers, presence of light, body dology in prediction analysis of egg production based on its ability to
weight of layers amongst others. Proper management of these factors represent and handle vague concepts or knowledge. This vagueness is
leads to optimum egg production and high profit margin. Other factors present in the factors which affect egg production to the total egg
may include mortality rate (which may rise due to disease or adverse production which are not known with certainty at the latter phases of
temperature), lighting schedule, culling etc. Culling is the removal of the egg production life cycle. A methodical application of fuzzy logic in
any sick or unproductive bird from the flock. Most literature had used solving complex real life problems (decision making problems like egg
one or more factors to model egg production or hatchability (or growth production prediction) is inevitable when the obtainable information is
curve). In the works of Peruzzi et al., (2012) and Mehri (2013), egg imprecise, unreliable or vague. It becomes more than a necessity when
weight, egg shell thickness, egg sphericity and yolk per albumen ratio data comes both from computing systems and human expertise. From
are the factors used to predict chicken hatchability. The weight of the human viewpoint, one must have tools to deal with subjective in-
sexual maturity, age of sexual maturity, number of eggs, egg weight, formation and from the computing outlook; computing systems require
order of giving birth to chicken and birth weight and age period of precise definitions to act upon, though human have an incredible ability
8 weeks and 12 weeks are used to predict the number of eggs produced to work with vague, imprecise and linguistic definitions as seen in real
(Semsarian et al., 2013). Data of dry bulb air temperature, duration of world knowledge. Ahmad (2009) presented poultry growth modelling
thermal stress, chick age, and the daily body mass of chicks are used to using neural networks and simulated data. The focus was on generating
train a neural network in order to predict the body mass of day-old- data for every strain of birds under continually changing variables that
chicks (Ferraz et al., 2014) while a number of thirty (30) traits were is difficult, expensive, and time consuming. Three neural networks,
used to model total egg production in (Felipe et al., 2015). Oleforuh- namely, BackPropagation-3 (3 layers of back propagation, with each
Okoleh (2016) used egg weight, egg shape index, shell weight and shell layer connected to the previous layer), BackPropagation-5 (5 layers of
thickness to model chicken hatchability prediction. Several mechanical back propagation, with each layer connected to the previous layer), and
solutions have been suggested but with very high cost implication Ward-5 (5 hidden slabs with various activation functions, using Neu-
which calls for the need of computational methods to model the egg roShell 2 Ward software) were used. Neural network offers better in-
production process. However, modelling egg production curve is a sight into data variations. By intricately mapping variations in the
complex and challenging task because a typical egg production curve variable of interest, neural network models can forecast better than
(from week 20 to week 72) is non-linear in nature (Ahmad, 2011). This their mathematical and statistical counterparts. The work suggested
is due to the uncertainty within the process. Thus prediction of egg future research on growth curves and other variables in poultry pro-
production cannot be adequately solved using linear model or regres- duction, such as egg production and nutrient requirements. Ahmad
sion analysis. The layer flocks commence egg production around the (2011) extended and improved on the work done in Ahmad (2009) by
20th week, first with a slow egg laying rate of around 5% per day then presenting efficient modelling approaches in forecasting egg produc-
an exponential increase till the 24th week when the egg production rate tion. The work was to further forecast egg production of strains.
reaches about 95 – 97%. This is the first phase of the egg production Comparative analysis of three neural network architectures — back-
cycle. This phase is characterized by a sharp increase. The second phase propagation-3, Ward-5, and the general regression neural network— in
runs from week 39 to week 52 and maintains a production rate of about forecasting egg production, along with other traditional models was
90%. This phase is known for its steady egg production rate until it carried out. Simulated data were produced to represent new scenarios
reaches the third phase, between week 53 to week 72 when production by using means and standard deviation (SD) of egg production of the 22
rate starts to depreciate slowly. This egg production versus time curve is commercial strains. From the simulated data, random examples were
known as the generic egg production pattern. This curve is dependent generated for neural network training and testing for the weekly egg
on the specific layer lines, farm management conditions, and other production prediction from week 22 to week 36. General regression
related factors. The Gompertz model, one of the notable linear models, neural network used in the work gave the best-fitting line, which almost
was used to predict egg production (Gompertz, 1987). overlapped with the commercial egg production data, with an R2 of
0.71. The general regression neural network is superior in all compar-
A
egg production = Aexp[( log exp( Kt )] isons and may be the model of choice if the initial over-prediction is
B (1)
managed efficiently. A combination of knowledge based-prediction and
The three parameters, A (maximum egg production), B (the inter- expert opinion may make the best forecast under controlled experi-
cept at wk 0), and K (the rate constant), as well as t (the time of egg ments for egg production.
prediction at weekly intervals), were initially determined from the egg A comparison of logistic and neural network models to fit to the egg
production data of 22 commercial strains from wk 22 to 66. This model production curve of White Leghorn hens is presented in Savegnago
equation will be useful to an extent beyond which (during the third et al., (2011). The work investigates the possibility of using two types of
phase of egg production life cycle) it can no longer fit the curve because neural networks – multilayer perceptron (MLP) and radial basis func-
of steady movement until the point where the farmer is saddled with tion (RBF) – for nonlinear regression analysis on curve fitting for egg
the responsibility to molt the flock or force flock out of egg production. production from laying hens, and to compare their performance with a
2
T.G. Omomule, et al. Computers and Electronics in Agriculture 171 (2020) 105301
nonlinear logistic model that has been widely used in the literature for production, reproduction, multiform gens and Prolaktin gen. Neural
this type of curve fitting. Two data sets from two generations of a White network technique was adopted. In their approach, blood of 138 native
Leghorn strain that had been selected mainly for egg production are hens was taken out and genotype was determined for Prolaktin gen. The
used in the modelling. Results from the work shows that MLP neural variables used are weight of sexual maturity, age of sexual maturity,
networks can be used as an alternative tool to fit to egg production. number of eggs, egg weight, order of giving birth to chicken and birth
However, the data set used was from an experimental chicken popu- weight and age period of 8 weeks and 12 weeks. A notable contribution
lation that had been selected for egg production, few uncontrolled showed that neural network is a reliable method for predicting the
conditions were affecting egg production. Bosma et al., (2011) worked weight and number of eggs based on available information. This work
on using fuzzy logic modelling to simulate farmers’ decision making on can utilize fuzzy methodology to incorporate fuzzy expert knowledge
diversification and integration in the Mekong Delta. A fuzzy logic base to better understand the input to output mapping which is limited
model (FLM) using a 10-step approach is proposed. Farmers’ decision- in the neural network. The authors in Ferraz et al., (2014) predicted
making was mimicked in a three-layer hierarchical architecture of fuzzy chick body mass by artificial intelligence-based models is presented.
inference systems, using data of 72 farms. The model includes three The objective of this work is to develop, validate, and compare 190
variables for family motives of diversification, six variables related to artificial intelligence-based models for predicting the body mass (BM)
component integration, next to variables for the production factors and of chicks from 2 to 21 days of age subjected to different duration and
for farmers’ appreciation of market prices and know-how on 10 com- intensities of thermal challenge. The experiment was conducted inside
ponents. The results showed that the satisfactory classification rates of four climate-controlled wind tunnels using 210 chicks. A database
the land-based activities for the Mekong Delta validates the fact that containing 840 datasets (from 2 to 21-day-old chicks) – with the vari-
hierarchical fuzzy logic models (FLMs) can be a useful method of si- ables dry-bulb air temperature, duration of thermal stress (days), chick
mulating farmers’ DM, using only farmers’ awareness of too low, age (days), and the daily body mass of chicks– was used for network
breakeven and profitable product prices instead of production func- training, validation, and tests of models based on artificial neural net-
tions. The focus was only on modelling farmers’ decision making on on- works (ANNs) and neuro-fuzzy networks (NFNs). Three variables were
farm diversification and integration of components. This fuzzy metho- used in the neuro-fuzzy model namely, dry-bulb temperature (tdb),
dology can be extended to prediction analysis of egg production. stress duration (D), and age of chicks (A), and the output variable body
Fuzzy modelling to predict chicken egg hatchability in commercial mass (BM) for chicks. Artificial neural networks (ANN) and neuro-fuzzy
hatchery is presented in Peruzzi et al., (2012). Past experimental studies networks (NFN) are very similar to predict the body mass of broilers
have shown that hatching rate depends, among other factors, on the from 2 to 21 days of age subjected to different drybulb temperature.
main physical characteristics of the egg. The work is motivated by However, this work can be extended to prediction of egg production
analysis of physical parameters (factors); egg weight, eggshell thick- using Fuzzy logic.
ness, egg sphericity, and yolk per albumen ratio to determine hatch- Felipe et al., (2015) also uses multiple regression, Bayesian net-
ability of eggs. The relationships of these parameters (egg weight, egg works and artificial neural networks for prediction of total egg pro-
shell thickness, egg sphericity and yolk per albumen ratio) in the in- duction in European quails based on earlier expressed phenotypes. This
cubation process were modelled by Fuzzy logic. The rules of the Fuzzy work is motivated by the need for optimized management decision in
modelling were based on the analysis of the physical characteristics of predicting total egg production (TEP) in commercial enterprises. The
the hatching eggs and the respective hatching rate using a commercial objective of the study is to compare different modelling approaches for
hatchery by applying a trapezoidal membership function into the prediction of TEP in meat type quails (Coturnix coturnix coturnix) using
modelling process. The results showed that the determination coeffi- phenotypes such as weight, weight gain, egg production and egg quality
cient and the mean square error were higher using the Fuzzy method measurements. Prediction models based on multiple linear regression
when compared with the statistical modelling. The mean squared error and artificial neural network (ANN) were used. Bayesian network (BN)
for the Fuzzy model and for the multiple linear regression models were and a stepwise approach were used as variable selection methods.
0.0004 and 0.0011, respectively. Comparing the MSE, it was observed Phenotypic data on 30 traits from two lines (containing 180 and 205
that the Fuzzy model was more efficient in predicting the hatching rate measurements) of quail were modelled to predict TEP. Reasonable
of the hatched eggs than multiple linear regression models. Hence, prediction accuracies were obtained only when partial egg production
Fuzzy logic estimates and optimizes the number of births of chicks at measurements are included in the model. There is need to explore the
the end of the incubation process. Comparison of neural network expert knowledge of fuzzy logic in predicting total egg production using
models, fuzzy logic, and multiple linear regression for prediction of a number of variables used in this work.
hatchability is presented in the work of Mehri (2013). The author is of Oleforuh-Okoleh (2016) presented hatchability prediction in
the view that application of appropriate models to approximate the chickens using some external egg quality traits. The need to make good
performance function warrants more precise prediction and helps to decision making in predicting hatchability of strains serves as the re-
make the best decisions in the poultry industry. This study re-evaluates search focus. Seven hundred and twenty eggs were collected from
the factors affecting hatchability in laying hens from 29 to 56 week of inbred populations of three strains of layer-type chickens comprising of
age and models hatchability using neural network. Twenty-eight data two exotic strains: Black Olympia (BO), H and N brown nick (H and N)
lines representing 4 inputs consisting of egg weight, eggshell thickness, and the Nigerian Local Chicken (NLC) at 40 weeks of age. The external
egg sphericity, and yolk/albumin ratio and 1 output, hatchability, were egg quality traits measured include Egg Weight (EW), Egg Shape Index
used to train an artificial neural network (ANN). The prediction ability (ESI), Shell Weight (SW) and Shell Thickness (ST). Highly significant
of ANN was compared with that of fuzzy logic to evaluate the fitness of variations existed between the two exotic strains (BO and Hand N) and
these methods. The statistical evaluations showed that the ANN-based the NLC in all the traits expect actual hatchability. Eggs from BO and H
model predicted hatchability more accurately than fuzzy logic. The and N were 27.76% and 28.34% heavier than those from NLC. Actual
results showed that the universal approximation capability of ANN hatchability percentage ranged between 87.73 and 88.24%. All egg
made it a powerful tool to approximate complex functions such as quality traits studied were negatively correlated with hatchability.
hatchability in the incubation process. Modelling egg production or hatchability of strains is a non-linear
The authors in Semsarian et al., (2013), proposed the prediction of complex problem (a NP hard problem) which cannot be adequately
the weight and number of eggs in Mazandaran native fowl using arti- solved linear regression approach. Thus, the need for computational
ficial neural network is presented. This work is motivated by lack of intelligence techniques is needed. The authors in Sefeedpari et al.,
prior study on applying neural network in predicting weight and (2016), a research on prophesying egg production based on energy
number of producing eggs using data related to other features like consumption using multi-layered adaptive neural fuzzy inference
3
T.G. Omomule, et al. Computers and Electronics in Agriculture 171 (2020) 105301
system approach is presented. The authors were motivated to use model The energy equivalent can be determined by using the standard coefficient
and control uncertain systems using Adaptive neural fuzzy inference of energy conversion and Exergy, being a unique methodology and in-
system (ANFIS). A multilayer adaptive neural fuzzy inference model dicator, is employed to evaluate the quality of energy sources under LCA.
(MLANFIS) was developed. Inputs were classified into two clusters on The analysis on energy indices and patterns of energy consumption are
the basis of inputs share in total energy consumed. The first three undertaken by employing Excel 2016 spreadsheets. To perform ANFIS
highest energy consumer inputs (including feed, fuel and machinery) analysis, Matlab (R2016b) software package is employed, into which all
were included in the first group and the next three inputs (pullet, input and output data in milling factories are entered. The performance of
electricity and human labour) were considered as inputs to ANFIS 2. the models were evaluated using Root Mean Squared Error (RMSE), cor-
The output of each group became an input to another ANFIS network relation coefficient R2 and Mean Absolute Percentage Error (MAPE) be-
(ANFIS 3) in order to predict the yield level. ANFIS showed favourably tween real observations and predicted ANFIS results. Results demonstrated
performance over ANN in predicting egg yield. But energy consumption the usefulness of multi-level adaptive neuro-fuzzy inference system to
of the strains was the only factors considered. This can be extended to management level for long-term planning in predicting various environ-
incorporate other factors/variables that affect egg production. Najafi mental, energy and economic indices of large-scale food production sys-
et al., (2018) applied ANNs, ANFIS and Response Surface Methodology tems. However, there was inherent computational complexity in the model
(RSM) to estimate and optimize the parameters that affect the yield and training. Also, in the work of Dehghani et al., (2019), adaptive neuro-fuzzy
cost of biodiesel production in order to meet American Society for inference system (ANFIS) was coupled with Grey wolf Optimization (GWO)
Testing and Materials (ATM) standard. The objective was to present an to forecast monthly hydropower. Hydrometric and Precipitation monthly
approach for modeling the process of biodiesel production (both methyl data were collected from Dez Dam in Iran. These time series data were later
and ethyl esters) from waste cooking oil (WCO) and estimating the divided into 70% percent training set to train the ANFIS-GWO model and
biodiesel production yield (BPY) using ANFIS, multilayered perceptron 30% for testing. Twenty (20) input combinations were used for modeling by
(MLP), and radial basis function (RBF) models. WCO from the restau- ANFIS and GWO was used to optimize the ANFIS parameters to realize
rant at the University of Mohaghegh Ardabili was used to produce improved performance. The performance of the proposed model was ac-
biodiesel and impurities such as water, solid particles and free fatty cessed using confidence index (CI), root mean square error (RMSE), Nash-
acids which have effects on BPY were removed. The experimental Sutcliffe Efficiency (NSE), coefficient of determination (R2), index of
parameters collected from the WCO namely; alcohol types (methanol, agreement (d), relative absolute error (RAE) and mean absolute error
ethanol), alcohol-to-oil molar ratio (AOMR; 3:1, 6:1, 9:1), amount of (MAE), and was also compared with a conventional ANFIS model without
catalyst (0.5, 1.0, 1.5 wt% of the oil), temperature of the reaction (50, optimization. Experimental results showed that GWO-ANFIS performed well
60, 70, 80 °C), mixing intensity (300, 600, 900 rpm), and reaction time in all 20 combinations based on the evaluation criteria and with less error
(30, 60, 90 min) were used to optimize the biodiesel production yield while the ANFIS failed in nine out of 20 combinations. However, the effect
(BPY). Based on these parameters, the data collected were separated of non-contributing rules and inadequate relevant input factors limited the
into alcohol types: methanol and ethanol. Thus, for each type of al- performance of the models.
cohol, a separate predictive network was developed and implemented
using MATLAB for training and testing processes. Various experimental 3. Methodology
results were recorded for optimum BPY values and the techniques
adopted (ANFIS, ANN and RBF-RSM) and confirmed for both methanol The architectural view of the proposed model is mainly subdivided
and ethanol under the experimental parameters. The result validates into three modules namely, data pre-processing, mapping of variables
the application of Fuzzy Logic combined adaptively with Neural Net- (inputs and output) into fuzzy space and fuzzy inference process. The
work in biodiesel modelling. first module is subdivided into collecting raw poultry data and pre-
Adaptive Nuero-Fuzzy Inference System (ANFIS) which combines the processing the data using correlation analysis, the second module is
strengths of Neural Network and Fuzzy Logic was adaptively applied by the subdivided into defining of input variables and output in fuzzy sets,
authors in Baghban et al., (2019) to develop a generalization and precise defining the linguistic variables and values for the fuzzy variable sets
model for predicting nanofluid relative viscosity (NF-RV). In their work, and mapping of the fuzzy variables using Gaussian membership func-
1277 experimental NF-RV data were collected through a systematic litera- tion while the third module involves development of fuzzy rules from
ture review carried out. The data consist of several independent input expert knowledge, inference matching, aggregation of rule instances
parameters namely: temperature, nanoparticle diameter, nanofluid density, and defuzzification. The architectural view of fuzzy based prediction
volumetric fraction, and viscosity of the base fluid used to train the ANFIS model for egg production is presented in Fig. 1.
model. The ANFIS model used the standard Tagaki-Sugeno FIS as the in- After the representation of the variables, feature selection process
ference engine and weighting-based averaging method is used for calcu- was carried out on the input variables to investigate the significance of
lating the average of different outputs for the model. The accuracy of the the input variables to the output (total egg production). The feature
proposed model was assessed using correlation coefficient, average absolute selection technique used is the correlation coefficient analysis as shown
relative deviation (AARD), mean squared error and standard deviation. A in equation (2).
statistical analysis of the data for training and testing (with R2 = 0.99997)
n( Vi E ) ( Vi ) ( E)
demonstrates the accuracy of the model. Other experimental and com- r=
parative results also verify the model and prove the predictabilities of [n Vi 2 ( Vi ) 2] [n E2 ( E ) 2] (2)
ANFIS. where r = Pearson correlation coefficient (PCC), Vi is value of variables
Nabavi-Pelesaraei et al., (2019) presented a comprehensive model using or factors affecting egg production, E is value of total egg production, n
ANFIS to forecast and model the energy (yield), global warning potential is total number of observations (data points).
(GWP) and economic profit in converting paddy to white rice to help attain Correlation coefficient formula is used to find the degree of re-
goals of sustainable production in agriculture and food industries. The au- lationship between each input and the output. The formula returns a
thors assessed the environmental, energy, and economic aspects of the value between −1 and 1, where
production chain of rice from the arrival of the paddy to the factory to
produce white rice (packaged) in Guilan province, Iran, based on energy a. 1 shows a strong positive relationship between the two variables.
management and life Cycle Assessment (LCA). Information used in the as- b. −1 shows a strong negative relationship between the two variables.
sessment are collected from 60 milling factories through direct interviews c. 0 shows no relationship between the two variables involved.
with factory workers and specialists. These information are used to de-
termine energy use pattern and study energy flow in a production system.
4
T.G. Omomule, et al. Computers and Electronics in Agriculture 171 (2020) 105301
The relationship strength is the absolute value of the correlation f = fuzzy membership function
coefficient. Therefore if there is a larger coefficient then the relation- Vi = i-th variable of input
ship is stronger. Other correlation measures such as Spearman and µ v1 = membership functions of the fuzzy variable ith
Kendall’s coefficients have been proposed but they work on magnitude
of variables with rank-order. The PCC is selected based on linearity in The various linguistic terms are defined starting from very low, low,
the poultry data and its application in prediction by testing the sig- average, high and very high as the case may be. Most variables might
nificance of each parameter to model result. In this work, PCC model have fewer linguistic terms than others.
fits the data well and the model is consistent with the theory that ex- The Gaussian membership function, which is used in the mapping, is
plains the measure of association among the egg production parameters given in Eq. (6) and expanded in Eq. (7) which is used to map the k-
which gives improved accuracy. number of input variables and one output variable.
(x jvi Cj )2
5
T.G. Omomule, et al. Computers and Electronics in Agriculture 171 (2020) 105301
3.3. Fuzzy inference system (FIS) each input is fuzzified over all the qualifying membership functions
required by the rules. After fuzzification of inputs, the degree to which
This stage involves the decision making process of the model. It is each part of the antecedent is satisfied for each rule is determined with
also known as the fuzzy inference engine. At the fuzzy inference, the application of fuzzy operators on the antecedents. For antecedents
Mamdani fuzzy inference system (FIS) is adapted for the proposed of rules having more than one part, fuzzy operator is applied to obtain
model. Other methods such as Tsukamoto and Sugeno works the same one number that represents the resultant of the antecedent for that rule.
as Mamdani FIS in the input fuzzification process but with differences This number is applied to the output function. The input to the fuzzy
in the defuzzification approach. In this work, the Mamdani FIS is se- operator is two or more degree of membership values from fuzzified
lected based on its ease of rule formalization, centre of gravity tech- input variables. The output is a single truth value. Two AND methods
nique for defuzzification and generation of fuzzy set as output with are supported in fuzzy logic, namely: min (minimum) and prod (pro-
effective interpretation while the other two give output as a constant or duct). Two OR methods are also supported: max (maximum) and
linear equation using weighted average to calculate crisp outputs with probabilistic OR (probor) method. Implication process is the next stage
characteristic loss of interpretability. The model’s fuzzy inference pro- in the inference module. Prior to the implication method, rule’s weight
cess is generally governed by the rule. is first determined. Every rule has a weight (a number between 0 and 1),
which is gotten from the number gotten from the application of fuzzy
IF\;Vis
i x jvi AND, ...,AND\;Vk is THEN E is yj (8)
operator on the antecedent. Implication method is implemented after
where Vi, x jvi , E and yj are input variable, linguistic variable, output proper weighting has been assigned to each rule. By default, the weight
variable and output weight respectively. Vi is x jvi AND,…,AND Vk is of each rule is 1. A consequent is a fuzzy set represented by a mem-
x mvk are the propositions defined on the input universes by the fuzzy bership function, which weights appropriately the linguistic char-
sets, y implies the value when the inputs V1,…,Vk satisfy the premise. acteristics that are attributed to it. The consequent is being reshaped
using a function associated with the antecedent, usually a single
3.4. Description of the inference process number. The input to the implication process is a single number pro-
vided by the antecedent, and output is a fuzzy set. Implication is carried
Fuzzy inference is the process of formulating the mapping from a out on the consequent part of each rule. Two methods are supported for
given input to an output using fuzzy operators and propositions. this process, and they are the same functions that are used by the AND
Decisions are made from the mapping provided. A fuzzy inference method: min (minimum), which truncates the output fuzzy set, and
system (FIS) is a system which consist fuzzification of input variables, prod (product), which scales the output fuzzy set.
application of fuzzy operators on the antecedents, implication process, Aggregation across consequents of rules (rule outputs) is the next
aggregation of consequents across rules and final defuzzification of the step in the fuzzy inference module. However, decision taking in a fuzzy
output. The basic structure of the FIS model for this research is pre- inference system is based on checking and testing for fire-ability of all
sented in Fig. 3 as follows: rules in the FIS, hence the rules are combined in a manner to make a
Mapping of variables in the fuzzy space is mostly referred to as decision. Aggregation is the process of combining the fuzzy set outputs
fuzzification. Fuzzification is the first step that takes in inputs and de- of all rules into a single fuzzy set. The input to the aggregation stage is
termines the degree to which they belong to each of the appropriate all the truncated output functions returned by the implication process
fuzzy sets via membership functions. The input to the FIS is a crisp for each rule. The aggregation is always commutative but not associa-
value delimited to the universe of discourse of the input variable and tive. Thus, rule firing is done in parallel. The three methods supported
the output is a fuzzy degree of membership in the qualifying linguistic by this process are:
set (always the interval between 0 and 1). The FIS is built on a number
of rules, and each of the rules depends on resolving the inputs into a a. max (maximum)
number of different fuzzy linguistic sets. Fuzzification of the inputs is b. probOr (probabilistic OR)
carried out according to each of these linguistic sets. In this manner, c. sum (simply the sum of each rule's output set)
6
T.G. Omomule, et al. Computers and Electronics in Agriculture 171 (2020) 105301
Table 1 total egg production and vice versa. Going by the correlation results
Inputs and output variable(s) measurement range scales. analysis, the ranking of the features (Rank 1 to Rank 4) is as follows:
S/N Abbr. Description Low Average High
a. Age of chicks (AGEC) – Rank 1
1 AGEC Age of Chick (weeks) 20–30 31–50 51–72 b. Quantity of feed (QNTY) – Rank 2
2 BODW Body Weight (grams) 3000–3666 3667–4332 4333–5000
c. Quality of feed (QLTY) – Rank 2
3 QNTY Quantity of Feed (g lb) 100–133 134–166 167–200
4 QLTY Quality of feed (kg/J) 400–433 434–466 467–500
d. Body weight of chicks (BODW) – Rank 3
5 TEGP Total Egg Production 500–650 651–800 801–1000
It is pertinent to note that the sign before the coefficient values does
not affect the ranking rather their respective absolute values. Quantity
Defuzzification is the mapping from a fuzzy set (aggregate output and quality of feed had the same coefficient value and as such have
fuzzy set), say S, defined on the universe of discourse, say U, to a crisp same rank. Quality of feed might have higher priority. Table 1 shows
value x ∈ U. The defuzzifier’s main function is to ascertain an ob- the mapping range of the input and output variables(s). The ranges
ject × that best represents the fuzzy set S. The input for the defuzzi- were done in ordinal scales which was represented in linguistic scale (of
fication process is a fuzzy set, that is, the aggregate output fuzzy set and low, average and high respectively).
the output is a single number. Irrespective that the fuzziness of previous The estimated total egg production is set at a maximum of 1000
stages aids in rule evaluation, the resultant output for each output eggs and minimum of 500 eggs respectively. The minimum age of
variable is always a single number. Defuzzification is important in in- laying eggs is set at 20 weeks old and burn out age is at a peak of
ference because the aggregate of a fuzzy set contains a range of values 72 weeks at which the flock is molted or withdrawn from production.
and thus must be defuzzified (converting to crisp value) in order to have There are a total of eighty-one (81) generated fuzzy rules, R, in the rule
a resultant single output value from the set. The defuzzification method base. That is a combination of number of linguistic variables (3) used
used in this FIS is the centroid technique, which returns the center of raised to the power of number of input variables (4) given as:
area under the curve.
R = Vi (9)
4. Data collection where R is the generated rules, V is the linguistic variables and i is the
number of input variables used.
Dataset of poultry egg production based on the selected factors was
sourced for 45 weeks and was pre-processed using SPSS statistical 5. Fuzzy modelling
package and Microsoft Excel. Analyzing data using MATLAB proves
difficult and also incurring high computational overhead with the The fuzzy-based model parameters are outlined below.
R_MATLAB Package. Therefore, SPSS is employed based on its efficient
analytical tool with several functions needed to preprocess the sample a. Number of input variable(s) = 4, Number of output variable(s) = 1
data collected in the work as well as smooth interfacing with MATLAB. b. Inference type = Mandami FIS
The pre-processing stage involves conversion of the raw data into c. Number of rules in Rule-base = 81
uniform format (numeric) and subsequent feature importance and se- d. Membership function Used = Gaussian MF
lection process (using correlation analysis). The model development e. Maximum Number of Linguistic variable(s) = 3 (Low, Average,
requirements are into two main parts, software and hardware require- High)
ments. However, the pre-processed poultry egg production dataset is an f. Implication type = min method
important requirement since this work tends to model total egg pro- g. Aggregation type = max method
duction from relationships between factors that affect egg production. h. Defuzzification technique = wtaver method
The correlation analysis was carried out in SPSS statistical package. The result of the fuzzy model prediction of total egg production
Using equation (1.2), the results of the Pearson’s correlation coefficient using 16 sample test data instances is presented in Table 2.
for the predictive features is shown as;
5.2. Fuzzy model evaluation results
Age of Chicks (AGEC) = −0.965
Body Weight (BODW) = −0.813 The fuzzy model prediction evaluation result is shown in table 3.
Quantity of Feeds (QNTY) = +0.944 The estimate is in number of total egg production predicted. The next
Quality of Feeds (QLTY) = +0.944 sub-section describes the three evaluation criteria used in evaluating
the performance of the fuzzy model.
The insignificance coefficient for the correlation analysis is set at A graphical plot of the model evaluation results of egg production
0.01. From the calculation of correlation coefficient of predictive fea- presented in Table 3 shows an increase in egg production prediction
tures for source dataset, age of chicks, body weight of chicks, quantity against the actual total egg production and also a minimized magnitude
of feed intake and quality of feed intake had approximate coefficients of Relative Error (MRE) as shown in Fig. 4 below:
−0.965, −0.813, +0.944 and +0.944 respectively. The coefficient
values show that all features had satisfied condition of significance and 5.3. Performance evaluation
thus are relevant. The room temperature showed insignificant correla-
tion result and was pruned out. This is because of insufficient data on There are several performance metrics used in evaluating model
room temperature in the sourced dataset. The correlation results shows forecast and prediction ranging from standard deviation (SD), relative
that an increase in age of chicks (in weeks) and body weight will result and log (SD), Balanced Relative Error (BRE) and Inverted BRE.
to a decrease in total egg production. Invariably, a decrease in two However, these metrics often evaluate data without considering the
features will reduce to an increase in total egg production. Also quantity effect of data independence. To evaluate the performance of the pro-
and quality of feeds had positive correlation to total egg production. posed model, three evaluation criteria were used due to their relevance
This means that an increase in these features will result to an increase in in reviewed literature. They include:
7
T.G. Omomule, et al. Computers and Electronics in Agriculture 171 (2020) 105301
Table 3 where n is the total number of test instances and l is the number of test
Model Evaluation results of egg production prediction. instances with MRE less than or equal to l. In this work, l = 0.3, thus
PRED (l) = Pred (30%) means prediction within 30% of actual egg
Test cases Actual total egg Model Total Egg Prediction MREi
production (acti) estimate (esti) production. However, a model estimate with low MMRE has a better
performance index than one with high MMRE. A model with high Pred
001 803 873 0.08717 (l) has a better performance than one with a low Pred(l).
002 800 882 0.1025
From equation 1.12, the mean magnitude relative error (MMRE) for
003 783 886 0.13155
004 753 886 0.17663 the fuzzy model is
005 760 861 0.13289 0.1174406, calculated thus;
006 748 855 0.14305 n
007 726 848 0.16804 1 | 1.87905|
MMREi = MREi = = 0.1174406
008 720 833 0.15694 16 16
i=1
009 713 816 0.14446
010 702 798 0.13675
011 700 788 0.12571
012 694 763 0.09942
5.4. Comparative analysis of results
013 690 753 0.0913
014 690 734 0.06377 Using the equations for MRE, MMRE and PRED(l) respectively, the
015 683 724 0.06003 fuzzy model was evaluated and benchmarked against other models
016 680 720 0.05882
reviewed in related literature. Most reviewed literature evaluated their
works using coefficient of determination (R2), root mean square error
(RMSE) and mean absolute percentage error (MAPE) parameters. This
is because there is no uniform evaluation metrics used to benchmark
these models in related works. Table 4 and shows the mean error metric
and Pred (l) accuracy of the models’ estimates respectively. The missing
fields are the error metric values that were not reported in related
works.
8
T.G. Omomule, et al. Computers and Electronics in Agriculture 171 (2020) 105301
metric of 0.11744. However, the error rate can be improved further if Appendix A. Supplementary material
test instances of diverse range of values are used rather than the near-
clustered range of values used in the evaluation of this fuzzy based Supplementary data to this article can be found online at https://
model. Also fine tuning the membership functions of the variables will doi.org/10.1016/j.compag.2020.105301.
enhance the error rate and accuracy respectively. Also, from Table 3,
there is a significant increase in the predicted egg production against References
the total egg production which is subjected to the parameter settings,
interval and numbers of membership functions, data distribution and Ahmad, H.A., 2009. Poultry growth modeling using neural networks and simulated data.
linguistic variables in fitting the proposed model to the data. All these J. Appl. Poult. Res. 18 (3), 440–446.
Ahmad, H.A., 2011. Egg production forecasting: Determining efficient modeling ap-
contribute to high prediction accuracy and relative error metric. The proaches. J. Appl. Poult. Res. 20 (4), 463–473.
prediction accuracy shows promising prospects for fuzzy application in Ajayi, F.O., 2010. Nigerian indigenous chicken: a valuable genetic resource for meat and
predicting poultry outputs. Other notable finding amongst the four egg production. Asian J. Poultry Sci. 4, 164–172.
Baghban, A., Jalali, A., Shafiee, M., Ahmadi, M.H., Chau, K.W., 2019. Developing an
input variables showed that the age of chicks plays a more determinant ANFIS-based swarm concept model for estimating the relative viscosity of nanofluids.
effect in mass production of poultry eggs than the body weight of chicks Eng. Appl. Comput. Fluid Mech. 13 (1), 26–39. https://doi.org/10.1080/19942060.
(which is the least ranked). Moreso, other factors that affect egg pro- 2018.1542345.
Bosma, R., Kaymak, U., Van den Berg, J., Udo, H., Verreth, J., 2011. Using fuzzy logic
duction can be investigated and utilized in future fuzzy models for egg
modelling to simulate farmers’ decision-making on diversification and integration in
production prediction. the Mekong Delta, Vietnam. Soft. Comput. 15 (2), 295–310.
Conte, S.D., Dunsmore, H.E., Shen, V.Y., 1985. Software effort estimation and pro-
ductivity. Adv. Comp. 1985 (24), 1–60.
6. Conclusion
Dehghani, M., Riahi-Madvar, H., Hooshyaripor, F., Mosavi, A., Shamshirband, S.,
Zavadskas, E.K., Chau, K.W., 2019. Prediction of hydropower generation using grey
This work explored the various factors that enhance high perfor- wolf optimization adaptive neuro-fuzzy inference system. Energies 12 (289), 1–20.
mance of fuzzy-based models for predicting egg production in farm https://doi.org/10.3390/en12020289.
Felipe, V.P., Silva, M.A., Valente, B.D., Rosa, G.J., 2015. Using multiple regression,
houses. A limited sample of total egg production and factors that affect Bayesian networks and artificial neural networks for prediction of total egg pro-
production was used to develop a fuzzy model. The factors are not duction in European quails based on earlier expressed phenotypes. Poult. Sci. 94 (4),
limited to age of chicks, body weight, quantity of feed, quality of feed 772–780.
Ferraz, P.F.P., Yanagi Junior, T., Julio, H., Fabián, Y., Castro, J.D.O., Gates, R.S., Reis,
and room temperature. Adequate feature selection was carried out on G.M., Campos, A.T., 2014. Predicting chick body mass by artificial intelligence-based
the sourced variables and relevant ones (4) were used in the model models. Pesquisa Agropecuária Brasileira 49 (7), 559–568.
development. The age of chicks showed highest correlation effect on Gompertz, B., 1987. On the nature of the function expressive of the law of human mor-
tality, and on a new method of determining the value of life contingencies. Philos.
total egg production. Gaussian membership function was used in the Trans. Report Soc. 1825 (115), 513–585.
fuzzification process while Mamdami fuzzy inference system (FIS) Gueye, E.F., 2003. Production and consumption trend in Africa. World Poultry 19, 12–14.
structure was used. The choice of a suitable defuzzification technique Mehri, M., 2013. A comparison of neural network models, fuzzy logic, and multiple linear
regression for prediction of hatchability. Poult. Sci. 92 (4), 1138–1142.
depends on whether smaller or larger projects are being modelled.
Nabavi-Pelesaraei, A., Rafiee, S., Mohtasebi, S.S., Hosseinzadeh-Bandbafha, H., Chau, K.,
While centroid and bisector defuzzification technique favoured mod- 2019. Comprehensive model of energy, environmental impacts and economic in rice
elling of medium software projects’ effort, smallest of maximum and milling factories by coupling adaptive neuro-fuzzy inference systems and life cycle
assessment. J. Cleaner Prod. 217 (2019), 742–756. https://doi.org/10.1016/j.
largest of maximum defuzzification technique showed favourable re-
jclepro.2019.01.228.
sults for small projects and large projects respectively. The proposed Najafi, B., Ardabili, S.F., Shamshirband, S., Chau, K.W., Rabczuk, T., 2018. Application of
fuzzy model achieved best prediction accuracy 100% Pred(30) but ANNs ANFIS and RSM to estimating and optimizing the parameters that affect the
found wanting in mean magnitude relative error (MMRE) of 0.11744. yield and cost of biodiesel production. Eng. Appl. Comput. Fluid Mech. 12 (1),
611–624. https://doi.org/10.1080/19942060.2018.1502688.
Thus by suitably adjusting the values of the parameters in membership Oleforuh-Okoleh, V.U., 2016. Hatchability prediction in chickens using some external egg
function and fuzzy inference system (FIS), the error metric could be quality traits. Asian J. Anim. Sci. 10 (2), 159–164. https://doi.org/10.3923/ajas.
improved upon. This model would serve as a veritable framework or 2016.159.164.
Peruzzi, N.J., Scala, N.L., Macari, M., Furlan, R.L., Meyer, A.D., Fernandez-Alarcon, M.F.,
tool for extension officers, poultry farmers, market managers and Kroetz Neto, F.L., Souza, F.A., 2012. Fuzzy modeling to predict chicken egg hatch-
agricultural personnel involved in policy making as regards poultry ability in commercial hatchery. Poult. Sci. 91 (10), 2710–2717.
products better egg production output. This will serve as a rich resource Savegnago, R.P., Nunes, B.N., Caetano, S.L., Ferraudo, A.S., Schmidt, G.S., Ledur, M.C.,
Munari, D.P., 2011. Comparison of logistic and neural network models to fit to the
for determining future markets in agriculture and ways to optimize egg production curve of White Leghorn hens. Poult. Sci. 90 (3), 705–711.
production either through adequate health facilities, improved feeds Sefeedpari, P., Rafiee, S., Akram, A., Chau, K.W., Pishgar-Komleh, S.H., 2016.
and several other means. The authors acknowledge that further im- Prophesying egg production based on energy consumption using multi-layered
adaptive neural fuzzy inference system approach. Comput. Electron. Agric. 131,
provement is required to ascertain the effectiveness of the proposed 10–19.
model with more essentials factors affecting large scale egg production Semsarian, S., Pasha Eskandari Nasab, M., Zarehdaran, S., Dehghani, A.A., 2013.
with uncorrelated parameters. Future work for the research will look Prediction of the weight and number of eggs in Mazandaran native fowl using arti-
ficial neural network. Int. J. Adv. Biol. Biomed. Res. 1 (5), 532–537.
into the collection of time-series data and analysis using semi-su-
United State Department of Agriculture Report (USDA), 2013. USDA International Egg
pervised machine learning algorithms to train a model over time to- and Poultry Review, USDA GAIN Reports, 16(8). p. 1–3, http://www.ams.usda.gov/
wards effective prediction of higher yield in poultry egg production as lpsmarketnewspage].
the number of factors increase.