Classification of piglet (Sus Scrofa) stress conditions using vocalization pattern and applying paraconsistent logic Eτ

Classification of piglet (Sus Scrofa) stress conditions using vocalization pattern and applying paraconsistent logic Eτ

Computers and Electronics in Agriculture 166 (2019) 105020 Contents lists available at ScienceDirect Computers and Electronics in Agriculture journa...

1MB Sizes 0 Downloads 58 Views

Computers and Electronics in Agriculture 166 (2019) 105020

Contents lists available at ScienceDirect

Computers and Electronics in Agriculture journal homepage: www.elsevier.com/locate/compag

Classification of piglet (Sus Scrofa) stress conditions using vocalization pattern and applying paraconsistent logic Eτ

T



Jonas Pereira da Silva, Irenilza de Alencar Nääs , Jair Minoro Abe, Alexandra Ferreira da Silva Cordeiro Paulista University, Graduate Program in Production Engineering Graduate Program in Production Engineering, Paulista University, Rua Dr. Bacelar 1212, São Paulo, Brazil

A R T I C LE I N FO

A B S T R A C T

Keywords: Non-classic logic Software development Uncertainty analysis Vocal signal

Pork is the most consumed meat worldwide, and there is the need for producer countries to relay on complying with the animal welfare international norms. The present study aimed to develop a software that predicts stress in the piglet using the vocal calls emitted during stressful conditions (cold/heat, pain, hunger, thirst). The piglet not exposed to stress and in normal rearing conditions was considered the baseline (normal). Vocal signal intensities were extracted from 40 piglets exposed to the stress. The database was organized, and the paraconsistent logic was applied to solve the uncertainties generated with the overlap of the intensity of the vocal signals. Results indicate that the most accurate prediction was for the pain (93.0%). The less accurate prediction was for the stress-free piglet (normal). Although using the solution for resolving most of the uncertainties and overlapping, only the stress by pain was readily detected as the vocalization due to pain has a high intensity and a long duration. Further research connecting the vocal signal and other recorded pattern is needed to improve the accuracy of the stress predicting process.

1. Introduction Pork is the most consumed meat worldwide around 14 kg/habitant year (FAO, 2018). Pigs are usually reared in intensive production systems with full health control and compliance with good international practices and animal welfare requirements. Pig farms widely adopt integration management between producers and industries. Pig production is important meat and contributes to the Brazilian GDP. According to EMBRAPA (2017), the amount of pork produced in Brazil in 2017 was near 4 106 t, representing the 4th largest world producer, and exported around 7 105 t. There is evidence that animals of the same species have vocal expressions that show a reactivity to a specific behavioral context (Watts and Stookey, 2000; Ikeda and Ishii, 2008; Leliveld et al., 2017) which might lead to a stress recognition (Ikeda and Ishii, 2008; Matthews et al., 2016). Studies indicate that vocalization is a useful tool to classify stressful situations in different stages during pig production (Moi et al., 2014; Cordeiro et al., 2013; Cordeiro et al., 2018). Also, vocalization has also been used to assess animal welfare (Marchant-Forde et al., 2002; Marx et al., 2003; Düpjan et al., 2008), and health conditions (Matthews et al., 2016). Several initiatives present automated use of



vocal sounds to asses health and welfare in animals (Schön et al., 2004; Exadaktylos et al., 2008; Martínez-Avilés et al., 2015). However, either there is a large degree of uncertainty, or the models have reduced applicability as most studies are based on limited data. Although manual data made possible to discover the patterns of sounds emitted in stressful situations, sometimes it is needed to reduce the number of characteristics of the sounds to build up the models (Cordeiro et al., 2013). The application of the Paraconsistent Annotated Evidential Logic Eτ (Logic Eτ; PAELτ) helps to handle and process contradictory information (Wansing and Odintsov, 2016; Nääs et al., 2018). The paraconsistent Logic Eτ works with propositions with different degrees favorable and contrary pieces of evidence. The pair of the annotated constants and the values of variables are limited between 0 and 1 (Da Silva Filho et al., 2009; Abe et al., 2013). Such pair (μ, λ) is called an annotation constant with 0 ≤ μ, λ ≤ 1, (Da Silva Filho et al., 2009; Abe et al., 2013). (Da Silva Filho et al., 2009; Abe et al., 2013). The Logic Eτ is a non-classic logic applied to solve problems that present a high degree of uncertainty (Da Silva Filho et al., 2009). Therefore, there is the need to develop a model that performs the automated characterization of piglet welfare using machine learning

Corresponding author. E-mail address: [email protected] (I. de Alencar Nääs).

https://doi.org/10.1016/j.compag.2019.105020 Received 28 January 2019; Received in revised form 30 March 2019; Accepted 19 September 2019 0168-1699/ © 2019 Elsevier B.V. All rights reserved.

Computers and Electronics in Agriculture 166 (2019) 105020

J.P. da Silva, et al.

algorithms to identify a higher number of the characteristics that define the vocal sound, classifying the level of stress of the pigs, and targeting the improvement of welfare conditions during rearing. The present study aimed to analyze the possibility of automatically classifying stressful conditions of piglets using vocalization and applying the Logic Eτ (PAELτ). 2. Methods 2.1. Field data and attributes for the machine learning algorithm The experiment was set in a commercial pig farm located in São Paulo State, Brazil (latitude 22° 37′ 59″ S and longitude 47° 03′ 20″ W). Acoustic field data of 40 piglets (1–52 days old) was registered using a unidirectional microphone positioned about 15 cm from the pig' mouth. Piglets were exposed to cold/heat stress, hunger, thirst, and pain in the phases of farrowing (1–4 weeks old), and nursery (5–8 weeks old). Besides the recording of the stressful conditions, we recorded the pig without exposure to stress in the normal rearing conditions. During the farrowing phase the piglets remaining with the sows until weaning (28 days old). The field trial was approved by the Ethics Committee (Unicamp, n. 2224-1/2011). A digital recorder (audio field recorder Marantz® PMD 660, USA) provided the digitized signal at 44,100 Hz. The sounds emitted by the pigs were edited and analyzed using the Praat® software (Boersma and Weenink, 2019). Each signal was separated into three samples, and 20 attributes were extracted for each sample relating to the stress condition, but just two were significant to identify the stress condition (Table 1). Data were handled using Weka® (3.5) software (Hall et al., 2009) for determining the stress conditions. The C4.5 decision tree algorithm, considering cross-validation samples with 10% (10-fold cross-validation) was used.

Fig. 1. Flowchart of the software development to predict stress condition in piglets.

controls are represented by the control-values C1 = C3 = ½ e C2 = C4 = −½. The software was developed using the platform .NET and language C# and the main programming concepts of programming oriented to objects were applied (Pressman, 2011). Classes which have methods and attributes encapsulated were used in the analysis (Rios and Moreira, 2013). The output was the prediction of the stress condition of piglets. The accuracy was calculated using the amount of the true and false predictions. The results were compared to the estimation by using classic logic and paraconsistent logic. In such a case, when the animal is tending to cold stress (not necessarily in cold stress), then the assumption of being in cold stress is a false response in classic logic. While using the paraconsistent logic, such a condition might be understood as being in cold stress (Fig. 2).

2.2. Paraconsistent logic model development For analyzing the data two steps were adopted. First, data from field study was organized in a spreadsheet with columns containing the attributes recorded and calculated (Table 1). The normal condition (stress-free, normal piglet) was considered as baseline. A software was developed to analyze the data which correlated the recorded data. The input generated a table recorded in CSV. The process was done using 70% of data to develop the software and 30% to validate the output. Since the initial data presented an overlap of attributes which represented some of the stress conditions (such as some values of attributes in pain were close to the extreme values of attributes in hunger) the paraconsistent logic (PAELτ) was applied in the second step to align the uncertain values of stressful conditions. The flowchart of the developed software is shown in Fig. 1. The analysis based on paraconsistent logic Eτ grouped the extremes in degrees of certainty and uncertainty (Fig. 2). The diagram shows the extremes and the non-extreme values, and the values with the adjusted

3. Results and discussion The classifier decision-tree output algorithm (from the Weka® software) indicated four situations of distress from piglet vocalization in piglets both in farrowing and nursery (Cordeiro et al., 2013; Table 2). Although there was an overall high accuracy for the pain (98%) identification, for targeting hunger (69%) or cold/heat (71%) the accuracy was just intermediate. The classes of cold or heat stress and hunger had a low accuracy when applying data mining techniques. These results were the starting point for the present research. Leliveld et al. (2017) found that some call types are better suited to provide information than others, indicating that there is a degree of inconsistency that should be considered when using pig vocalization for identifying stress condition. Such consideration led us to apply the paraconsistent logic to the output data for decreasing the degree of uncertainty. Contradictions arise naturally in the description of biological events. However, the analysis of these inconsistencies is a fundamental part of a decision-making process (Abe et al., 2013; Nääs et al., 2018). The results of the stress plotting using the paraconsistent algorithm are analyzed using the sound wave intensity vs. the duration of the vocal signal. In Fig. 3 the results of cold/heat stress and pain indicate that most of the vocal signals related to cold/heat stress were concentrated around 0.2–1.6 s with an intensity between 70 and 86 dB. The vocal signals related to pain were spread from 0.2 to 1.7 s, and with an intensity that varied mostly from 80 to 93 dB.

Table 1 Attributes used for the classification of stress conditions in piglets (cold/heat, pain, and hunger) and the normal was used as a baseline. Attribute

Unit

Description

Stress condition (target)



Signal duration Intensity

s dB

Normal, feeling cold, feeling pain, thirsty, and hungry Duration of the sound wave Sound wave intensity

Normal = stress-free; Cold = exposure to 25 °C for 30 min during farrowing, and to 22 °C for 1 h in the nursery; Pain = the piglet was vigorously squeezed in the mid-torso; Thirsty = restriction to nursing for 30 min in the farrowing, and water restriction for 1 h in the nursery; Hungry = restriction to nursing for 30 min in the farrowing, and feed restriction for 1 h in the nursery Source: Cordeiro et al. (2013). 2

Computers and Electronics in Agriculture 166 (2019) 105020

J.P. da Silva, et al.

Fig. 2. Diagram with degrees of certainty and uncertainty, with adjustable limit control values, indicated on the axes (µ, λ). . Source: Abe et al. (2015)

of stress. Regarding the duration of the calls, Leliveld et al. (2017) observed that high squeals (high frequency and high peak intensity) were longer and correlated positively with heart rate, indicating a stressful condition. The increase in pain level is also associated with the rise in blood cortisol (Numberger et al., 2016), indicating the increase in stress. Risi (2010) also found an increase of duration and intensity of the vocal signal in pig exposed to painful conditions. The results of the current study show that pig vocal pain expression has a higher duration and higher peak intensity than the stress for exposition to cold. When adding the values of intensity of calls of pigs exposed to hunger to the previous results (Fig. 4) the values of peak intensity for the stress by hunger are distributed mainly within the duration of 0.3–1 s, with an average intensity in the same range of those exposed to cold stress (75–85 dB). In this case, there is an overlap of near 50% of the vocal signals of pigs exposed to hunger to those

Table 2 Piglet stress predicted classes (stress conditions) and respective overall accuracy (Cordeiro et al., 2013). Classes

Accuracy (%)

Normal (baseline) Cold/heat Pain Hunger

82.0 71.0 98.0 69.0

Very seldom piglets feel the cold stress during farrowing; however, heat stress is commonly found stress in the growing and finishing process. Marx et al. (2003) also found a considerable variation in pig vocal signals during the castration process that imposes pain; however, the results did not indicate a precise assessment of pain or another type

3

Computers and Electronics in Agriculture 166 (2019) 105020

J.P. da Silva, et al.

Fig. 3. The output of the software using the sound wave intensity (vertical axis, dB) and the duration of the vocal signal (horizontal axis, s) during the exposition to heat and pain.

Fig. 4. The output of the software using the sound wave intensity (vertical axis, dB) and duration of the vocal signal (horizontal axis, s) during the exposition to cold/ heat, pain, and hunger. 4

Computers and Electronics in Agriculture 166 (2019) 105020

J.P. da Silva, et al.

Fig. 5. The output of the software using the sound wave intensity (vertical axis, dB) and duration of the vocal signal (horizontal axis, s) during the exposition to cold/ heat, pain, hunger, thirst, and the normal condition. Table 3 Vocal signal average intensity (dB) and the duration of the signal (s) for the studied stress conditions (pain, cold/heat, hunger, and thirst). Stress condition

Pain Cold/heat Hunger Thirst

Table 4 Calculated accuracy for stress prediction using classic logic and paraconsistent logic.

Mean intensity (dB)

Duration of vocal signal (s)

Stress condition

Low

High

Low

High

Pain

Cold/heat

Hunger

Thirst

Normal

80 70 63 65

93 86 87 86

0.3 0.2 0.2 0.3

1.7 1.6 1.0 2.0

Classic logic True prediction accuracy (%) False prediction accuracy (%) Overall accuracy of prediction (%)

59.6 40.4 32.6

56.5 43.5

26.2 73.8

21.1 78.9

19.5 80.5

PAELτ True prediction accuracy (%) False prediction accuracy (%) Overall accuracy of prediction (%)

93.0 7.0 73.1

75.3 24.6

65.2 34.8

68.1 31.9

58.3 41.7

Data mining algorithm* Overall accuracy of prediction (%)

98.0

71.0

69.0



82.0

exposed to cold stress which means that even using the paraconsistent analysis the uncertainty was not eliminated. Applying the values of vocal response to thirst to the previous results (Fig. 5), it is seen that again there is significant overlap on the values of cold stress and hunger. Such condition of thirst is amplified to a more extended length of time (0.3–2.0 s). In overall, the found results are summarized in Table 3. The only result that produces a vocal sound high mean intensity higher than the other is the stress by pain (Figs. 3–5). The calculated accuracy (true and false prediction) is shown in Table 4, using the stress prediction applying classic logic, and paraconsistent logic (PAELτ). The total accuracy using regression analysis was 32.6% of true predictions and 67.4% of false predictions, against 73.2% of true predictions 26.9% of false predictions when using paraconsistent logic. There were many overlap values of sound intensity in all studied vocal signal. It is known that pig has an extensive vocal repertoire (Marx et al., 2003; Schön et al., 2004; Cordeiro et al., 2013). The prediction of stress is not a difficult task since the structure of the stress screams of pigs is simple and not very modulated in the frequency. However, when neither the duration of vocal expression nor the intensity can detect a specific stress condition, the standard way is to predict whether the pig is stressed without determining which is the cause of the stress. Leliveld et al. (2017) findings suggest that pig

*Source: Cordeiro et al. (2013).

vocalizations can provide signs to its emotional reactivity. However, the authors found a high degree of uncertainty in the results. The best accuracy detected in the present study was using the paraconsistent logic to the vocal signals (73.2%). In general, the accuracy was high using the paraconsistent logic in most stressful conditions. The accuracy was higher for detecting pain (93.0%) and cold/heat stress (75.3%), while it was low in forecasting hunger (65.2%), and thirst (68.1%). The detection of normal condition was even lower than the others (58.3%). It seems that some call types in mammals are better suited to provide information on a caller’s emotional reactivity than others (Watts and Stookey, 2000; Marchant-Forde et al., 2002; Marx et al., 2003; Manteuffel et al., 2004; Cordeiro et al., 2013) leading to a misinterpretation of stress condition. Further research is needed to clarify which factors influence the encoding of stress in piglet vocalizations, as well as the use of the vocal signal to predict specific stress and entirely assess the pig welfare. Meanwhile, the automatic prediction of specific stress in pigs remain 5

Computers and Electronics in Agriculture 166 (2019) 105020

J.P. da Silva, et al.

EMBRAPA – Embrapa Suínos e Aves, 2017. Available in: < https://www.embrapa.br/ suinos-e-aves/cias/estatisticas > (accessed on January 2, 2019). Exadaktylos, V., Silva, M., Aerts, J.-M., Taylor, C.J., Berckmans, D. Real-time recognition of sick pig cough sounds. Comput. Electron. Agric. 63, 207–214, doi: 10.1016/j. compag.2008.02.010. FAO – Food and Agriculture Organization of the United Nations. OECD-FAO Agricultural Outlook 2018-2027. Available at: < http://www.fao.org/publications/oecd-faoagricultural-outlook/2018-2027/en/ > (accessed on January 09 2019). Hall, M., Frank E., Holmes, G., Pfahringer, B., Reutemann, P., Ian H. Witten, I.H. The Weka Data Mining Software: An Update. SIGKDD Explorations 2009, 11. Available in < http://www.cs.waikato.ac.nz > (accessed on September 6, 2018). Ikeda, Y., Ishii, Y., 2008. Recognition of two psychological conditions of a single cow by her voice. Comput. Electron. Agric. 62, 62–72. https://doi.org/10.1016/j.compag. 2007.08.012. Leliveld, L.M.C., Düpjan, S., Tuchscherer, A., Puppe, B., 2017. Vocal correlates of emotional reactivity within and across contexts in domestic pigs (Sus scrofa). Physiol. Behav. 181, 117–126. https://doi.org/10.1016/j.physbeh.2017.09.010. Manteuffel, G., Puppe, B., Schön, P.C., 2004. Vocalization of farm animals as a measure of welfare. Appl. Anim. Behav. Sci. 88, 163–182. https://doi.org/10.1016/j.applanim. 2004.02.012. Marchant-Forde, J.N., Marchant-Forde, R.M., Weary, D.M., 2002. Reponses of dairy cows and calves to each other’s vocalisation after early separation. Appl. Anim. Behav. Sci. 78, 19–28. https://doi.org/10.1016/S0168-1591(02)00082-5. Martínez-Avilés, M., Fernández-Carrión, E., López García-Baones, J.M., Sánchez-Vizcaíno, J.M., 2015. Early detection of infection in pigs through an online monitoring system. Transbound Emerg. Dis. 64, 364–373. https://doi.org/10.1111/tbed.12372. Marx, G., Horn, T., Thielebein, J., Knubel, B., Borell, E., 2003. Analysis of pain-related vocalization in young pigs. J. Sound Vib. 266, 687–698. https://doi.org/10.1016/ S0022-460X(03)00594-7. Maselyne, J., Van Nuffel, A., Briene, P., Vangeyte, J., De Ketelaere, B., Millet, S., Van den Hof, J., Maes, D., Saeys, W., 2018. Online warning systems for individual fattening pigs based on their feeding pattern. Biosyst. Eng. 173, 143–156. https://doi.org/10. 1016/j.biosystemseng.2017.08.006. Matthews, G.S., Miller, A.L., Clapp, J., Plötz, T., Kyriazakis, I., 2016. Early detection of health and welfare compromises through automated detection of behavioural changes in pigs. Vet. J. 217, 43–51. https://doi.org/10.1016/j.tvjl.2016.09.005. Moi, M., Nääs, I.A., Caldara, F.R., Paz, I.C.L.A., Garcia, R.G., Cordeiro, A.F., 2014. Vocalization data mining for estimating swine stress conditions. Eng. Agric. 34, 445–450. https://doi.org/10.1590/S0100-69162014000300008. Nääs, I.A., Lozano, L.C.M., Abdanan Mehdizadeh, S., Garcia, R.G., Jair, M., Abe, J.M., 2018. Paraconsistent logic used for estimating the gait score of broiler chickens. Biosyst. Eng. 173, 115–123. https://doi.org/10.1016/j.biosystemseng.2017.11.012. Numberger, J., Ritzmann, M., Übel, N., Eddicks, M. Reese, Zöls, S., 2016. Ear tagging in piglets: the cortisol response with and without analgesia in comparison with castration and tail docking. Animal 10, 1864–1870. http://dx.doi.org/10.1017/ S1751731116000811. Pressman, R.S., 2011. Software Engineering: A professional scope. 7 ed. AMGH, Porto Alegre, Brazil (in Portuguese). Rios, E., Moreira, T., 2013. Software tests. 3rd ed. Alta Books, São Paulo, Brazil (in Portuguese). Risi, N., 2010. Uso da vocalização como indicador patológico em leitões na fase de maternidade. Dissertation (MSc), Universidade de São Paulo. (In Portuguese with abstract in English) < http://www.teses.usp.br/teses/disponiveis/11/11131/tde23062010-093056/pt-br.php > . Schön, P.C., Puppe, B., Manteffel, G., 2004. Automated recording of stress vocalisations as < https://habricentral.org/resources/7917 > . Wansing, H., Odintsov, S.P., 2016. On the methodology of paraconsistent logic. In: Andreas, H., Verdée, P., (Eds.) Logical studies of paraconsistent reasoning in science and mathematics. Trends in Logic (Studia Logica Library), v. 45. Springer, Switzerland. Watts, J.M., Stookey, J.M., 2000. Vocal behaviour in cattle: the animal’s commentary on its biological processes and welfare. Appl. Anim. Behav. Sci. 67, 15–33. https://doi. org/10.1016/S0168-1591(99)00108-2.

within 73.2% of overall accuracy. Perhaps the association with another behavioral pattern is needed to improve the accuracy of the process (Martínez-Avilés et al., 2015; Matthews et al., 2016; Maselyne et al., 2018). Information related to sex, age, and growth phase might also improve the precision of stress prediction (Cordeiro et al., 2018). Harsh rearing conditions and eventual lack of feed ration, or yet the incidence of the sub-clinical disease might also change the identification of the stress condition. 4. Conclusions A software was developed to predict stress (pain, cold/heat, thirst, hunger) in piglets using the vocal intensity and applying the paraconsistent logic. Results indicated that although the software can detect the pain and thirst the piglets are subjected there is still a high degree of overlap in the vocalization that does not enable the software to predict all types of stress exposure accurately. Further research is needed to improve stress prediction in piglets. Acknowledgments The authors wish to thank Paulista University and Capes (Coordination of Brazilian High Education) for the scholarship of the first and fourth authors. Appendix A. Supplementary material Supplementary data to this article can be found online at https:// doi.org/10.1016/j.compag.2019.105020. References Abe, J.M., Akama, S., Nakamatsu, K., 2015. Paraconsistent Intelligent-Based Systems New Trends in the Applications of Paraconsistency, 1 ed. Springer International Publishing, Switzerland. Abe, J.M., Lopes, H.F., Nakamatsu, K., 2013. Paraconsistent artificial neural networks and EEG. Knowl.-Based Syst. 17, 99–111. Boersma, P., Weenink, D., 2019. Praat: Doing phonetics by computer [Computer program]. Version 6.0.46, Available at: < http://www.praat.org/ > (accessed January 3, 2019). Cordeiro, A.F.S., Nääs, I.A., Oliveira, S.R., Violaro, F., Almeida, A., Neves, D.P., 2013. Understanding vocalization might help to assess stressful conditions in piglets. Animals 3, 923–934. https://doi.org/10.3390/ani3030923. Cordeiro, A.F.S., Nääs, I.A., Leitão, F.S., Almeida, A.C.M., Moura, D.J., 2018. Use of vocalisation to identify sex, age, and distress in pig production. Biosyst. Eng. 173, 57–63. https://doi.org/10.1016/j.biosystemseng.2018.03.007. Da Silva Filho, J.I., Holms, G.A.T.A., Hurtado, G.V., Garcia, D.V., 2009. Analysis and diagnosis of cardiovascular diseases through the paraconsistent annotated logic. Studies in computational intelligence. In: Nakamura, N., et al. (Eds.), New advances in intelligent decision technologies. Sci. 199 (p. 295–303). Berlin, Springer. doi: 10. 1007/978-3-642-00909-9_29. Düpjan, S., Schön, P.C., Puppe, B., Tuchscherer, A., Manteuffel, G., 2008. Differential vocal responses to physical and mental stressors in domestic pigs (Sus scrofa). Appl. Anim. Behav. Sci. 114, 105–115. https://doi.org/10.1016/j.applanim.2007.12.005.

6