# Assessment of the dynamic growth of the fattening pigs from body weight measured daily and automatically to elaborate precision feeding strategies

Nathalie Quiniou, Ludovic Brossard, Michel Marcon

► To cite this version:

Nathalie Quiniou, Ludovic Brossard, Michel Marcon. Assessment of the dynamic growth of the fattening pigs from body weight measured daily and automatically to elaborate precision feeding strategies. 8. European Conference on Precision Livestock Farming (ECPLF), Sep 2017, Nantes, France. hal-01591144

HAL Id: hal-01591144

https://hal.science/hal-01591144

Submitted on 20 Sep 2017

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>
# Assessment of the dynamic growth of the fattening pigs from body weight measured daily and automatically to elaborate precision feeding strategies

N. Quiniou¹, L. Brossard², M. Marcon¹

¹,²Unité Mixte Technologique Ingénierie des Systèmes de Production Porcine

¹IFIP-Institut du Porc, BP 35104, 35651 Le Rheu cedex, France

²INRA-Agrocampus Ouest, UMR1348 PEGASE, 35590 Saint-Gilles, France

nathalie.quiniou@ifip.asso.fr

## Abstract

Growing pigs are often fed below *ad libitum* to increase their feed efficiency and carcass leanness. When energy supply is under control, precision feeding is implemented through the amino acids (AA). As the AA requirement depends on the body weight (BW) for the maintenance part and on its daily variation (ΔBW) for the growth part, the adequacy between requirements and supplies on day D+1 depends on the adequacy of predicted BW<sub>D+1</sub> and ΔBW<sub>D+1</sub>. Data sets from four trials were used to forecast BW from time series analyses based either on multivariate adaptive regression splines (MARS) or double exponential smoothing (HWα) methods using the *k* latest data (8, 14 or 20). Pigs (n = 117) were group-housed and restrictively fed, and their BW was recorded daily and individually with an automatic scale (n = 11 736). With HW<sub>0.6</sub>, the RMSEP of BW<sub>D+1</sub> was the smallest one (1.21 kg) and not influenced by *k*. Linear regression on the *l* latest forecasted BW was used to assess ΔBW<sub>D+1</sub>. At the beginning of the trial, ΔBW<sub>D+1</sub> was more difficult to predict from BW forecasted with MARS than with HW<sub>0.6</sub>. Descriptive statistics of individual variation of ΔBW<sub>D+1</sub> based on MARS and HW<sub>0.6</sub> were comparable with *k* = *l* = 20 only after removal of the first 19 days. Compared to other methods studied, the method HW<sub>0.6</sub> seems to be the best compromise to forecast BW<sub>D+1</sub> and ΔBW<sub>D+1</sub> of restrictively fed pigs.

**Keywords:** Pig, precision feeding, body weight, time series, dynamic growth, modelling, nutrition

## Introduction

In growing pigs, precision feeding has been implemented for around 15 years toward an improved adequacy of amino acids (AA) supply to requirements (Pomar *et al.*, 2009). The first aim is to avoid a deficiency that would decrease carcass leanness and feed efficiency and subsequently the farmer's income. The second aim is to limit the excess that increases the price of feeds and the
environmental impact of pig production through N output. More recently the need to improve the efficient use of protein-rich resources has emerged.

New devices have been developed recently that can mix different diets in specific proportions adapted to meet the daily requirement of each pig in the group. Such devices can be used either by pigs fed *ad libitum* (Pomar *et al.*, 2009) or restrictively fed (Marcon *et al.*, 2015). Requirements have to be assessed from the individual characteristics of pigs, especially its body weight (BW) or body weight gain (ΔBW) at a given age. According to the factorial approach, BW is one of the major determinant of the AA requirement for maintenance, and the AA requirement for growth depends on ΔBW. On day D+1, the supply of AA depends on BW<sub>D+1</sub> and ΔBW<sub>D+1</sub> forecasted from available data, i.e. from BW recorded up to day D.

Like in many other species, BW increases with age according to a S shape in pigs fed *ad libitum*. Under feed restriction, this trajectory is modified but growth rate still varies in a dynamic way. With devices equipped with an automatic weighing scale, individual BW are recorded continuously. As pigs can be weighed many times per day at different fulfillment stages of their digestive tract and udder, average daily BW can temporary drop or rocket from one day to another even after removal of outliers and without any health problem. Then, the difficulty is to extract the dynamics of growth from the short-term variations of BW. Individual and daily BW measurements performed during four trials were used to investigate different methods to forecast future BW and BW gain using different numbers of past data.

## Material and methods

### Data sets

Four groups of pigs were successively studied in the IFIP experimental station at Romillé (Brittany, France) during a research program on the environmental impacts of the feeding management. At the end of the post-weaning period (around 66 days of age), 96 pigs were identified by RFID ear tags and group-housed in a single pen that is equipped with a weighing-sorting station placed on four force sensors allowing for weighing pigs individually, with a 0.1 kg accuracy. Other details on the experimental room can be found in Marcon *et al.* (2015). In each trial different feeding strategies were compared, but one of them was the reference strategy that was repeatedly studied in all trials. It corresponded to a 2-phase strategy with diets formulated at 9.75 MJ net energy (NE)/kg and 0.9 g of digestible lysine/MJ NE as long as the pigs from this group weighed less than 67 kg on average, and 0.7 g/MJ afterwards. Daily feed
allowance depended on initial BW, stage of fattening and gender: 4% of the initial BW on D1, then + 27 g/d up to 2.4 kg/d for gilts and 2.7 kg/d for barrows. Only pigs of the reference groups studied until slaughter around 110 kg were kept in the final data set, i.e. 39, 22, 25 and 31 pigs in trials 1, 2, 3 and 4, respectively (corresponding to 11 736 BW).

Forecasting methods of $BW_{D+1}$

Time series prediction were performed using either multivariate adaptive regression splines (MARS) or double exponential smoothing model ($HW\alpha$) where $\alpha$ is the smoothing parameter.

**MARS:** This method is a nonparametric regression procedure that does not imply any assumption on the relationship between the dependent and the independent variables (StatSoft Inc., 2013). It is most often used in case of difficult data mining problems, i.e. without simple and monotone variation of the variable studied. The `earth` function from the `earth` R package was used (Milborrow, 2011).

**$HW\alpha$:** When a lot of past BW are available, a derivative function of the Gompertz function can be used to describe the pig's growth curve. This is not possible when only few BW are available at the beginning of the fattening period. Yet it indicates that the BW time series evolves in time with a form of trend that can be taken into account in the HW model. It assigns different weights to historical data depending on how recent they are, using a smoothing parameter $\alpha$. The greater $\alpha$ is, the greater is the influence of the last measurement; values ranging from 0.1 to 0.9 by 0.1 were studied. The `HoltWinters` function from `stats` R package was used to fit a non-seasonal HW model (R Core Team, 2016), with the trend factor determined by minimizing the squared prediction error.

*The *k* latest data used:* Based on the hypothesis that the future BW depends on the *k* latest data, different values for *k* were investigated from 8 to 20. At the beginning of the trial, the number of most recent values used was lower than *k* as long as the trial has started less than *k* days earlier:

- *k* = 8: it is the lowest number of past data required for implementing the MARS,

- *k* = 14: it takes into account data obtained on the 2 previous weeks,

- *k* = 20: the time interval between 20 and 14 is the same as between 8 and

14
**Missing values:** None of the forecasting methods deals with missing values. As some days some pigs were not weighed or the BW was considered as an outlier, corresponding missing data had to be fulfilled. Before D = 4, a BW gain of 0.75 kg was assumed and added to the previous BW. Later, the BW forecasted on this day, with the same model, same value of k and eventually same value of α, was retained.

## Prediction of BW<sub>D+1</sub> and ΔBW<sub>D+1</sub>, and other statistics

Forecasting of BW<sub>D+1</sub> was performed every day for each pig. Each forecasted value after D4 was compared to the measured BW. The residual mean square error of prediction (RMSEP) was calculated per pig and submitted to an analysis of variance (proc GLM, SAS v9.4, Inst. Inc. Cary, NC) with the forecasting method (n = 10, MARS or HWα with α ranging from 0.1 to 0.9), the value of k (n = 8, 14 or 20), and the batch as the main effects. Average RMSEP per method were compared.

Due to day to day variation of BW, ΔBW<sub>D+1</sub> cannot be calculated as the simple difference between the forecasted BW<sub>D+1</sub> and the measured BW<sub>D</sub>. Then linear regressions (proc Reg, SAS v9.4) were performed from the forecasted BW available over the l latest days (ranging from 10 to 20 by 2 d increment). For each pig, variation of ΔBW with time was characterized by its descriptive statistics (proc Univariate, SAS): 5th percentile, median, range of values observed, minimum and mean.

<table><caption>Table 1: Average RMSEP of BW¹ and comparison of the 10 methods run with three pools of recent data (k)²</caption><thead><tr><th>Method</th><th>MARS</th><th>HW<sub>0.1</sub></th><th>HW<sub>0.2</sub></th><th>HW<sub>0.3</sub></th><th>HW<sub>0.4</sub></th><th>HW<sub>0.5</sub></th><th>HW<sub>0.6</sub></th><th>HW<sub>0.7</sub></th><th>HW<sub>0.8</sub></th><th>HW<sub>0.9</sub></th></tr></thead><tbody><tr><td>8</td><td>2.39<sup>a</sup></td><td>3.29<sup>d</sup></td><td>1.82<sup>c</sup></td><td>1.84<sup>c</sup></td><td>1.48<sup>h</sup></td><td>1.27<sup>j</sup></td><td>1.21<sup>j</sup></td><td>1.23<sup>j</sup></td><td>1.34<sup>i</sup></td><td>1.56<sup>g</sup></td></tr><tr><td>k</td><td>14</td><td>1.97<sup>b</sup></td><td>3.35<sup>d</sup></td><td>1.72<sup>f</sup></td><td>1.56<sup>g</sup></td><td>1.37<sup>i</sup></td><td>1.26<sup>j</sup></td><td>1.21<sup>j</sup></td><td>1.23<sup>j</sup></td><td>1.34<sup>i</sup></td><td>1.56<sup>g</sup></td></tr><tr><td>20</td><td>1.84<sup>c</sup></td><td>2.09<sup>e</sup></td><td>1.75<sup>f</sup></td><td>1.53<sup>gh</sup></td><td>1.37<sup>i</sup></td><td>1.26<sup>j</sup></td><td>1.21<sup>j</sup></td><td>1.23<sup>j</sup></td><td>1.34<sup>i</sup></td><td>1.56<sup>g</sup></td></tr></tbody></table>

1. Arithmetic mean of the average RMSEP per trial (n = 4). 2. Across the 3 lines and 10 rows, different letters indicate a statistical difference among methods with P < 0.05 from the analysis of variance with the method combined with the k value (M<sub>30</sub>, n = 30, P < 0.001), the batch (B, n = 4, P < 0.001) and the interaction M<sub>30</sub>×B (P < 0.001) as main effects.

<figure><img src="image_2.png" /></figure>
# Results and discussion

## Prediction of BW on day D+1

In contrast to methods HW₀.₁ to ₀.₄ or MARS, the average RMSEP obtained with methods HW₀.₅ to ₀.₉ are not significantly influenced by *k* (Table 1). With the HW model, the RMSEP significantly increases when *α* increases from 0.7 to 0.9 or when it decreases

<figure><img src="image_3.png" /></figure>

Figure 1 part 1: Example of comparison of measured (●) to forecasted (—) BW with the HW method implemented with the 8, 14 or 20 latest values (*k*) and three values for the smoothing parameter *α* (pig 310 in trial 1). To be continued... from 0.5 to 0.1 (Table 1). The lowest RMSEP is obtained with the HW₀.₆ method. It does not differ significantly from those obtained with HW₀.₅ and HW₀.₇, but allows for the lowest difference among batches (not presented). In agreement with Hauschild *et al.* (2012), a smoother trajectory of BW is obtained
with HW₀.₁ than with HW₀.₆ (Figure 1), resulting in a higher RMSEP. With MARS, the RMSEP is intermediate between HW₀.₁ and HW₀.₂, even when the first 8 days are removed (instead of only the first 4 days). Figures 1 and 2 illustrate how the BW predicted with HW₀.₁, HW₀.₂, HW₀.₆ and MARS fit the data for one given pig with different *k* tested.

<figure><img src="image_4.png" /><figcaption>Figure 2: End of Figure 1 with the MARS method (pig 310 in trial 1)</figcaption></figure>

<figure><img src="image_5.png" /></figure>
## Prediction of ΔBW on day D+1

Based on results presented above, prediction of ΔBW was investigated from BW forecasted with $HW_{0.6}$, $HW_{0.1}$ and MARS. When daily ΔBW is assessed by regression over the *l* latest days, the smaller the *l* value, the more erratic is the variation of ΔBW whichever the method considered (MARS, $HW_{0.1}$ or $HW_{0.6}$ with *k* = 20). It can even be negative on certain days for some pigs (Figure 3).

<figure><img src="image_6.png" /></figure>

BW gain assessed from BW predicted with methods MARS, $HW_{0.1}$ and $HW_{0.6}$ by linear regression with $k = 20$ and $l = 8$ (—), 14 (---) or 20 (—) (pig 310 in trial 1)
As illustrated for one pig in Figure 3, the prediction of ΔBW is very difficult at the beginning of the trial when only few data are available. Therefore, descriptive statistics of daily variation of ΔBW were calculated for each pig after removal of the ΔBW assessed on the 4 first days (see paragraph "Missing values") or on the 20 first days (allowing regression on the 20 latest data when $l = 20$). Descriptive statistics were obtained for ΔBW assessed from the forecasted BW: with methods MARS, $HW_{0.1}$ or $HW_{0.6}$ with $k = 20$ and $l = 20$, or with $HW_{0.6}$ with $k = 20$ and $l$ ranging between 10 and 20 by 2. From individual criteria per pig, an average per batch was calculated (proc Means, SAS) and results were pooled by an arithmetic mean in Table 2.

<table><caption>Table 2: Descriptive statistics¹ on ΔBW (g) obtained by linear regressions based on forecasted BW with different methods and number of available data</caption><thead><tr><th>Method (k = 20)</th><th colspan="7">HW<sub>0.6</sub></th><th>HW<sub>0.1</sub></th><th>MARS</th></tr><tr><th><i>l</i> value<sup>2</sup></th><th>10</th><th>12</th><th>14</th><th>16</th><th>18</th><th>20</th><th>20</th><th>20</th></tr></thead><tbody><tr><td colspan="10"><strong>Day D ≥ 5</strong></td></tr><tr><td>5<sup>th</sup> percentile</td><td>238</td><td>339</td><td>410</td><td>452</td><td>484</td><td>510</td><td>291</td><td>361</td></tr><tr><td>25<sup>th</sup> percentile</td><td>621</td><td>653</td><td>676</td><td>690</td><td>700</td><td>706</td><td>674</td><td>683</td></tr><tr><td>Median</td><td>816</td><td>812</td><td>811</td><td>811</td><td>811</td><td>807</td><td>816</td><td>801</td></tr><tr><td>Range</td><td>1608</td><td>1311</td><td>1093</td><td>974</td><td>909</td><td>858</td><td>1363</td><td>1020</td></tr><tr><td>Minimum</td><td>-128</td><td>48</td><td>165</td><td>229</td><td>265</td><td>292</td><td>-3</td><td>42</td></tr><tr><td>Mean</td><td>792</td><td>792</td><td>791</td><td>791</td><td>791</td><td>789</td><td>787</td><td>764</td></tr><tr><td colspan="10"><strong>Day D ≥ 21</strong></td></tr><tr><td>5<sup>th</sup> percentile</td><td>251</td><td>372</td><td>465</td><td>511</td><td>550</td><td>554</td><td>481</td><td>534</td></tr><tr><td>25<sup>th</sup> percentile</td><td>642</td><td>680</td><td>702</td><td>720</td><td>730</td><td>736</td><td>706</td><td>733</td></tr><tr><td>Median</td><td>841</td><td>837</td><td>832</td><td>830</td><td>827</td><td>822</td><td>826</td><td>825</td></tr><tr><td>Range</td><td>1516</td><td>1180</td><td>905</td><td>743</td><td>640</td><td>546</td><td>705</td><td>559</td></tr><tr><td>Minimum</td><td>-56</td><td>143</td><td>295</td><td>386</td><td>447</td><td>503</td><td>420</td><td>500</td></tr><tr><td>Mean</td><td>812</td><td>813</td><td>813</td><td>813</td><td>813</td><td>812</td><td>812</td><td>814</td></tr></tbody></table>

1. Proc Univariate (SAS, v9.4) on variation of ΔBW per pig; arithmetic mean of average results per trial.

2. Number of previous forecasted BW with methods $HW_{0.1}$, $HW_{0.6}$ or MARS used to assess ΔBW on day D by linear regression.

<figure><img src="image_7.png" /></figure>
In agreement with what could be expected from Figure 3, differences among methods are more important when only the first 4 predicted values are removed from the analysis, compared to removal of the first 20 ones (Table 2). In this last case, when regressions are performed from the 20 available BW ($k = l = 20$), descriptive statistics of ΔBW based on MARS and $HW_{0.6}$ are comparable and not so different from those obtained with $HW_{0.1}$. Additionally, means and medians are comparable for the three methods, but $HW_{0.6}$ results in higher values for the minimum ΔBW and the 5th percentile and a reduced range of variation. In other words, ΔBW obtained from BW forecasted with $HW_{0.6}$ seems secured.

Using less than 20 past data to predict ΔBW from forecasted BW with $HW_{0.6}$ has little influence on the mean and the median but impacts more the other criteria when less than 16 past BW are used. With $l = 16$ or 18, values of the 5th and 25th percentiles remain rather high. But with a value of $l$ below 16, the range of values increases markedly and the average minimum decreases so that ΔBW can punctually reach negative values for some pigs. These results agree those published by Zumbach et al. (2010). These authors obtained similar average daily gain when it was calculated over different time intervals (1, 7 or 14 days) but reducing the time interval increased the variability.

## Conclusion

Combined with a linear regression from the last 16 to 20 forecasted BW, the method $HW_{0.6}$ seems to be the most interesting one to predict $BW_{D+1}$ and $\Delta BW_{D+1}$ in restrictively fed pigs. Compared to other forecasting methods investigated in this study, it presents a low sensitivity to the number of $k$ latest values used. It allows for a secured prediction of BW soon after the beginning of the growing phase, which contributes to the low residual mean square error of prediction of BW and to smooth variations of predicted ΔBW.

## Funding and acknowledgement

The original data sets have been obtained during a research program funded by ADEME, from which data obtained on pigs fed with the same feeding strategy across trials were extracted. The data analyses presented in the present paper were performed in the Feed a Gene project, which has received funding from the European Union's Horizon 2020 research and innovation program under grant N° 633531. The authors acknowledge I. Taoussi and O. Delcourt for their contribution to the development of the R and SAS codes.
References

Hauschild, L., Lovatto, P.A., Pomar, J., Pomar, C. 2012. Development of sustainable precision farming systems for swine: Estimating real-time individual amino acid requirements in growing-finishing pigs. *Journal of Animal Science* **90** 2255-2263.

Marcon, M., Brossard, L., Quiniou, N. 2015. Precision feeding based on individual daily body weight of pigs with an automatic feeder developed to allow for restricting feed allowance. In: *Proc. of the 7th European conference on Precision Livestock Farming*, Guarine M. and Berckmans D. (Ed), Milan, Italy, 592-602.

Milborrow, S. 2011. Earth: multivariate adaptive regression spline models. R package version 4.4.9.1. URL http://CRAN.R-project.org/package=earth

Pomar, C., Hauschildt, L., Zhang, G.H., Pomar, J., Lovatto, P.A. 2009. Applying precision feeding techniques in growing-finishing pig operations. *Revista Brasileira de Zootecnia* **38** 226-237 (suppl. special).

R Core Team (2016). *R: A language and environment for statistical computing*. R Foundation for Statistical Computing, Vienna, Austria. https://www.R-project.org/.

StatSoft Inc. 2013. Electronic statistics textbook. Tulsa, OK: StatSoft. WEB: http://www.statsoft.com/textbook/

Zumbach, B., Misztal, I., Chen, C.Y., Tsuruta, S., Lukaszewicz, M., Herring, W.O., Culbertson, M. 2010. Use of serial pig body weights for genetic evaluation of daily gain. *Journal of Animal Breeding and Genetics* **121** 93-99.