11/15/2019 Department of Veterinary and Animal Sciences From - - PDF document

11 15 2019
SMART_READER_LITE
LIVE PREVIEW

11/15/2019 Department of Veterinary and Animal Sciences From - - PDF document

11/15/2019 Department of Veterinary and Animal Sciences From registration to information Anders Ringgaard Kristensen Department of Veterinary and Animal Sciences Outline of Part 1 The decision making process The role of models Basic


slide-1
SLIDE 1

11/15/2019 1

From registration to information

Anders Ringgaard Kristensen

Department of Veterinary and Animal Sciences

Outline of Part 1

The decision making process The role of models Basic production monitoring as a source of information Key figures and their properties Interpretation of key figures Limitations of traditional production monitoring

Department of Veterinary and Animal Sciences Slide 2

First focus of this lecture

In this lecture we direct our attention towards the left side

  • f the management cycle:
  • Production monitoring

We shall, however, try to look at it from a decision making perspective.

slide-2
SLIDE 2

11/15/2019 2

Making decisions

Decision making is based on knowledge:

  • General knowledge: What you can read in a textbook on

animal nutrition, animal breeding, agricultural engineering etc.

  • Context specific knowledge: What relates directly to the

unique decision problem. Examples:

  • The milk yield of dairy cow No. 678 when considered for

culling.

  • The estrus status of sow No. 345 when considered for

insemination.

  • The current daily gain of the slaughter pigs in House 5

when considering whether or not to adjust protein contents of the diet.

When knowledge is represented in a form that may be used directly as basis for a decision, we call it information.

Department of Veterinary and Animal Sciences Slide 4

Information sources

General knowledge:

  • Look in a textbook
  • Ask an expert

Context specific knowledge:

  • Obtained through registrations (observations) in the

herd:

  • Traditional registrations
  • Test day milk yield, cow 567
  • Litter size of sow 123
  • Sensor based registrations
  • Conductivity or temperature of milk from AMS
  • Accelerations of a sow from a censor node in

an ear tag

  • Computer vision (image analysis)

Department of Veterinary and Animal Sciences Slide 5

From registrations to information

We refer to a collection (typically in a database) of registrations of the same kind as data. We don’t use data directly for decision making (huge amounts of data). Before we can use data we need to reduce it through some kind of processing. The resulting information is used for decision making (which again requires processing: optimization).

Department of Veterinary and Animal Sciences Slide 6

slide-3
SLIDE 3

11/15/2019 3

A simple example of the path

Data: Test day milk yields Processing I: Calculating cumulated yields for individual cows over a standardized period and afterwards calculating the herd average. Information: Average milk yield in the herd. Processing II: Linear programming using the Simplex algorithm. Decision: Least cost feed ration for the cows. The path from test day milk yields to feed ration is not unique:

  • Both processing steps could be replaced by other methods.
  • Choosing a wise processing of data into information is an

important issue in herd management!

Department of Veterinary and Animal Sciences Slide 7

Cécile Cornou, LC-2373, IPH, KVL

Advanced example: Hogthrob

Activity Measurements – in Group Housed Pen

  • Accelerometer fitted on neck collar
  • Acceleration in 3 dimensions
  • Four measurements per second
  • Transfer PC via Blue Tooth
  • Gestation house and farrowing crate

Video Recordings

  • Four cameras used as web cam

Department of Veterinary and Animal Sciences Slide 8

The Farrowing House

slide-4
SLIDE 4

11/15/2019 4

Data Collected – Farrowing house

Farrowing

Department of Veterinary and Animal Sciences Slide 10

Activity Classification – Farrowing

2 days before farrowing

Feeding: 7.15, 12.00, 15.30 Lying side 1 Lying side 2 Lying sternally Active

Department of Veterinary and Animal Sciences Slide 11

Activity Classification – Farrowing

Farrowing day

Lying side 1 Lying side 2 Lying sternally Active Feeding / Rooting / Nesting

Department of Veterinary and Animal Sciences Slide 12

slide-5
SLIDE 5

11/15/2019 5

Information retrieval – Farrowing (or heat)

Department of Veterinary and Animal Sciences Slide 13

An advanced example of the path: Hogthrob

Data: Accelerations of a sow measured 4 times per second in 3 dimensions Processing I: Online time series analysis of the acceleration data using Dynamic Linear Models Information: Sow in heat? (yes/no). [Example: farrow] Processing II: Dynamic programming. Decision: Inseminate/leave open/cull Notice the reduction in the dimensionality of the information (one binary variable) compared to the data!

Department of Veterinary and Animal Sciences Slide 14

The decision making process: Summary

The purpose of monitoring is to improve the decisions Processing of registrations into information is necessary Choosing the best processing is a key issue Information is a tractable representation of context specific knowledge. Monitoring is the sub-path from registration to information During this course we will follow the path from data to decision:

Department of Veterinary and Animal Sciences Slide 15

slide-6
SLIDE 6

11/15/2019 6

Uncertain information

Classical methods assume certainty. In real life, certain information hardly exists. However, the degree of uncertainty varies. In general, we use distributions for representation

  • f knowledge with uncertainty.

For binary information, we may just supply the probability. For continuous information, we supply for instance a normal distribution with a mean and a variance. A small variance implies that we are rather certain about the value. For consistent processing of data, a model is needed.

Department of Veterinary and Animal Sciences Slide 16

Uncertainty: Pregnancy status of a cow

For the replacement decision we want to know the pregnancy status of a cow, but it is (most often) unobservable, so we have only indirect observations:

  • If a cow has not been inseminated, the probability of

pregnancy is zero.

  • If it has been inseminated, the probability is 0.4,

because the conception rate of the herd is 0.4.

  • If, after 5 weeks, the cow has not shown heat, the

probability increases. Assuming a heat detection rate of 0.5, the probability increases to 0.7.

  • A positive pregnancy diagnosis will further increase the

probability, but only a calving will increase it to 1.

We need a method for consistently combining the indirect observations into an updated probability of pregnancy. We may use a Bayesian Network model for that!

Department of Veterinary and Animal Sciences Slide 17

Models for monitoring under uncertainty

Assessing the distribution of a key figure from the distribution of data (later this lecture):

  • “Black box” approach

Statistical quality control models based on time series analysis:

  • More or less “black box” approach

Dynamic Linear Models based on Bayesian updated time series with Kalman filtering:

  • Structured model
  • Data of same kind

Bayesian networks

  • Highly structured models
  • Data from different sources

Department of Veterinary and Animal Sciences Slide 18

slide-7
SLIDE 7

11/15/2019 7

Basic production monitoring

Traditional approach to production monitoring:

  • Registrations are collected systematically in the herd
  • Data is entered into a Management Information

System (MIS).

  • At quarterly (or monthly) intervals, the MIS

calculates a bunch of key figures which are presented to the farmer in tabular form in report.

  • The farmer looks at the key figure and decides

whether or not to make adjustments to production.

The information provided is the list of key figures. We shall briefly discuss how to interpret such key figures in a sound way.

Department of Veterinary and Animal Sciences Slide 19

Principles of production monitoring

Refer to Chapter 5

  • Data recording
  • Database
  • Data processing
  • Report with key figures
  • Analysis
  • Statistical
  • Utility
  • Decision

Department of Veterinary and Animal Sciences Slide 20

Report with key figures

Key figures have 3 basic properties

  • Correctness
  • Are all registrations correct (right animal(s),

right event, right value etc.)?

  • Validity
  • Does the key figure express exactly what we

want to know?

  • Precision
  • Standard deviation of estimate – Exercise.

Department of Veterinary and Animal Sciences Slide 21

slide-8
SLIDE 8

11/15/2019 8

Correctness

Examples …

Department of Veterinary and Animal Sciences Slide 22

Validity

Example: Reproduction in sows Discussion:

  • What do you want to know?
  • Which figure(s) will provide us with the desired

information?

Department of Veterinary and Animal Sciences Slide 23

Key figure: Farrowings per week

Utilization of the farrowing department. One of the most important elements from an economical point of view. Presented as an average value. What is of interest is the distribution over weeks.

Department of Veterinary and Animal Sciences Slide 24

slide-9
SLIDE 9

11/15/2019 9

Precision

Formal definition. The precision ρ is defined as ρ = 1/σ2 where σ is the standard deviation of the calculated key figure. Let κ be a calculated key figure. We may model κ as follows κ =θ + es + eo , Where

  • θ is the true (unobservable) underlying value
  • es is the sample error (the ”biological” variation)
  • eo is the observation error (depends on the method)
  • σ2 = V(es) + V(eo)

We should regard κ as the estimated value of θ, where σ is the standard deviation of the estimate

Department of Veterinary and Animal Sciences Slide 25

Precision, statistical evaluation

Farrowing percentage The percentage of matings resulting in a farrowing (sold pregnant sows are excluded from the calculations). Assume that 90 % was expected, but the calculated key figure was 87 %. Should we be worried?

Department of Veterinary and Animal Sciences Slide 26

Farrowing percentage, I

How many matings are included in the calculation? Assume N. If the expected value is p = 90 %, we want to test the null hypothesis H0: p = 0.90 The number of matings, n, resulting in a farrowing will be binomially distributed with the parameters p = 0.90 and N.

Department of Veterinary and Animal Sciences Slide 27

slide-10
SLIDE 10

11/15/2019 10

Farrowing percentage, II

Assume that there is no observation error, i.e. V(eo) = 0. The variance of n is equal to the sample variance, which (in a binomial distribution) is: σ2 = Np(1-p) = N × 0.90 × 0.10 = 0.09N

Department of Veterinary and Animal Sciences Slide 28

Farrowing percentage, III

Evaluation of the result given N

N σ2 σ n Exp. Dev. Dev./σ 100 9 3 87 90 3 1.0 200 18 4.2 174 180 6 1.4 300 27 5.2 261 270 9 1.7 400 36 6.0 348 360 12 2.0*

Principles of production monitoring

Data recording Database Data processing Report with key figures Analysis

  • Statistical
  • Utility

Decision

Department of Veterinary and Animal Sciences Slide 30

slide-11
SLIDE 11

11/15/2019 11

Utility evaluation

If a deviation is significant from a statistical point

  • f view it should also be evaluated from a utility

point of view. Far more difficult than the statistical evaluation! Example: Does it matter that the pregnancy rate is lower than expected? An obvious tool for utility evaluation is a simulation model.

Department of Veterinary and Animal Sciences Slide 31

Limitations of traditional monitoring

Dependence on defined targets (expected results). Most often, the precision of the key figures is not calculated. Correlations between key figures are typically ignored. Autocorrelations over time are typically ignored. The processing of data into information is very simple (even though it may be computationally demanding) with loss of information as a consequence. Acknowledgement: Slides 8-13 provided by Cécile Cornou

Department of Veterinary and Animal Sciences Slide 32

Outline of Part 2

  • 1. The decision making process: Summary
  • 2. Sensors and data sources
  • 3. Definition of concepts
  • 4. Value of data
  • Quality of information
  • Quality of decisions

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 33

slide-12
SLIDE 12

11/15/2019 12

The decision making process: Summary

The purpose of monitoring is to improve the decisions Processing of registrations into information is necessary Choosing the best processing is a key issue Information is a tractable representation of context specific knowledge. Monitoring is the sub-path from registration to information During this course we will follow the path from data to decision:

Department of Large Animal Sciences Slide 34 Advanced Quantitative Methods in Herd Management

Trends in livestock farming

Over the last decades we have seen:

  • Computers available to farmers
  • Process computers (climate control, feeding systems,

milking systems)

  • Computer networks
  • On farms
  • The internet
  • Automatic registrations by sensors
  • Improved methods for data filtering
  • State space models
  • Bayesian networks
  • Improved methods for decision support
  • Decision graphs
  • Markov decision processes (dynamic programming)
  • Improved biological understanding

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 35

Data sources: Brain storm

Live weight assessment:

Heat detection

Detection/prediction of farrowing

Detection of diarrhea

Detection of mastitis

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 36

slide-13
SLIDE 13

11/15/2019 13

PigIT: Sensors as installed in two experimental pens

Advanced Quantitative Methods in Herd Management Dias 37 Department of Large Animal Sciences

16 pens in 4 sections are monitored by sensors and cameras See: http://pigit.ku.dk

PigIT: Data infrastructure in a herd

Advanced Quantitative Methods in Herd Management Dias 38 Department of Large Animal Sciences

PigIT: Sensor data – what does it look like?

Advanced Quantitative Methods in Herd Management Dias 39 Department of Large Animal Sciences

Water, Feed Local temp. Section: Temp. Humidity

slide-14
SLIDE 14

11/15/2019 14

Sensor types

Flowmeters Climate sensors (temperature, humidity) Pedometers Accelerometers Vision Acoustic (e.g. coughing) AMS related Sensors provide data!

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 40

Definition

A record: λ Data: Λ = {λ1, λ1, … , λk}, Λ ∈ Rk Processing: Ψ() Information: I = Ψ(Λ), I ∈ Rm, where m << k Decision: Θ Decision strategy: I → Θ The processing of data into information typically implies a huge reduction of data. The processing is specific to the decision problem.

Department of Large Animal Sciences

λ lambda (lower case) Λ lambda (upper case) Ψ Psi (upper case) Θ Thetha (upper case) Value of data (and processing)

Improving quality of information

  • How do we assess the quality of information?
  • Numerical information: Standard deviation
  • Categorical information: AUC (area under curve)

Improving quality of decisions

  • How do we assess the quality of decisions: Utility value

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 42

slide-15
SLIDE 15

11/15/2019 15

Numerical information: Number of farrowings

Example from exercise later in course: A sow farmer wish to predict the number of farrowings in a given (future) week. Different kinds of data can be collected:

  • # sows inseminated
  • Historical farrowing percentage
  • Heat detection after 3 weeks
  • Pregnancy test (ultra sound)

The information requested is:

  • Expected number of farrowings

The quality of the information is:

  • The standard deviation (or variance) of the prediction

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 43

Example from exercises: Number of farrowings

Observations (data) SD Number of sows inseminated (12) 1.66 + conception rate in herd (historical data) 1.39 + heat detection after 3 weeks (2 in heat) 0.98 + heat detection quality in herd 0.81 + ultra sound scanning of 10 sows 0.47

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 44

More data increase the precision of the prediction! Refer to exercise later in course! In the table, SD is the standard deviation of the prediction.

Categorical information

Information provided only as a state: Heat detection: {In heat, Not in heat} Pregnancy test: {Pregnant, Not pregnant} Disease diagnosis: {Diseased, Not diseased} Body Condition Score: {1, 2, 3, 4, 5} State {d1, d2, … , dn}

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 45

slide-16
SLIDE 16

11/15/2019 16

Categorical information

The measurement is (either literally or conceptually) a two step procedure:

  • 1. Measurement of a continuous variable y ~ N(µi, σi2) if

the animal is in State di . The observation can be just a number or an entire vector.

  • 2. Assigning of a state di to the measurement depending on

a set of threshold values {τ1, …, τn-1}:

  • 1. τi-1 < y ≤ τi ⇒ State di observed

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 46

Example – pregnancy diagnosis

State, di {Not pregnant (i = 0), Pregnant (i = 1)} Measurement Hormone level, h Distributions:

  • i = 0

h ~ N(10, 12)

  • i = 1

h ~ N(13, 12) Threshold: 11 Diagnose:

  • h ≤ 11

Not pregnant

  • h > 11

Pregnant

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 47

Overall performance of test – ROC

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 48

By varying the threshold, all combinations of sensitivity and specificity along the curve can be achieved. The circle corresponds to τ = 11.5, where the sensitivity is 0.93 and the specificity is also 0.93. The performance is measured as Area Under Curve (AUC):

  • AUC = 1: Perfect method
  • AUC = 0.5: Useless method (random guess)

AUC = 0.98

1 - Specificity False positive rate

slide-17
SLIDE 17

11/15/2019 17

Example – pregnancy diagnosis: Less precise!

State, di {Not pregnant (i = 0), Pregnant (i = 1)} Measurement Hormone level, h Distributions:

  • i = 0

h ~ N(10, 22) - Standard deviation doubled

  • i = 1

h ~ N(13, 22) - Standard deviation doubled Threshold: 11 Diagnose:

  • h ≤ 11

Not pregnant

  • h > 11

Pregnant

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 49

Overall performance of test – ROC – Less precise

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 50

The quality of this information is less good, because the AUC is smaller than in the other example

AUC = 0.83

Back to PigIT: Detection of fouling and diarrhea

Data (cf. Slides 37-39):

  • Pen level:
  • Water consumption per hour
  • Drinking bouts per hour
  • Temperature at the corridor
  • Temperature at the resting area
  • Feed intake per day
  • (Live weight per week)
  • Section level
  • Temperature
  • Humidity

Information:

  • Event (fouling or diarrhea)

Processing:

  • Dynamic linear model

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 51 Jensen et.al., A multivariate dynamic linear model for early warnings of diarrhea and pen fouling in slaughter pigs, Comput. Electron. Agric., vol. 135, pp. 51–62, 2017.

slide-18
SLIDE 18

11/15/2019 18

Value of data (measured by ROC/AUC)

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 52 Jensen et.al., A multivariate dynamic linear model for early warnings of diarrhea and pen fouling in slaughter pigs, Comput. Electron. Agric., vol. 135, pp. 51–62, 2017.

OBS: X-axis has been reversed!

Improving quality of decisions – utility value

The potential positive value of data is that they lead to better information and, thus, better decisions: Compare to evaluation of a feed additive:

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 53

Feed additive

Processing Mixing

Animals Response Data

Processing (twice)

Decision Response

Value of data

Value of feed additive: Expected income with additive – Expected income without additive = Value of feed additive . Value of data: Expected income with data – Expected income without data = Value of data .

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 54

slide-19
SLIDE 19

11/15/2019 19

Value of data

Data only have value if they improve the information and, consequently, lead to better management decisions:

  • Buying/selling of animals
  • Movement of animals
  • Insemination
  • Induction of events
  • Feed ration composition
  • Feeding level
  • Observing

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 55

Utility value of data – The two sow problem

Problem description A smallholder sow farmer has only housing capacity for one sow. Recently his sow died. He has no gilt, so he wants to buy a new sow. His neighbor has two pregnant 2nd parity sows for sale: Sow A and Sow B. Both of them will farrow two weeks from now. The price is the same. Decision problem Should the smallholder buy Sow A or Sow B from his neighbor? Initial comments The old sow is dead – nothing can change that. Everything that doesn’t depend on the decision can be ignored in the optimization (partial budgeting principle). In this case we can ignore the price of the new sow.

Dias 56 AVEPM 2013 Schwabe Symposium, Chicago Department of Large Animal Sciences

The two sow problem

What kind of data would the small holder farmer like to have? Litter size of first parity! Any correlation between litter size of first and second parity?

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 57

slide-20
SLIDE 20

11/15/2019 20

Elements

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 58

A record: Y1i Data: Λ = {Y1A, Y1B} Processing: Predicted litter size 10.0 0.2

8.5

Information: I = { , } Decisions: Select Sow A; Select Sow B Decision strategy:

  • : Select Sow A
  • : Select Sow B
  • : Select Sow A or Select Sow B

According to Example 6.1 the value of the data is 0.28 piglets. Would it be of any value to know the litter size of just one of the sows? If yes, what would the decision strategy look like? Refer also to exercises!

Measure errors (continued)

Pre-selection (are animals representative) Registration of interventions (e.g. treatment or culling) Missing registrations as a source of information Selection:

  • Pigs with low daily gain stay longer in the herd (exercise)
  • High yielding cows are kept longer

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 59

Measurement errors

Registration failure – something is completely wrong Measurement precision – observation errors Indirect measure – what we observe is not exactly what we want to know Bias – systematic deviation from true value (calibrate!) Rounding errors – usually not a major problem Interval censuring – only thresholds known (date of farrowing versus time of farrowing)

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 60

slide-21
SLIDE 21

11/15/2019 21

Take home messages

Value of information can be measured!

Department of Large Animal Sciences Advanced Quantitative Methods in Herd Management Slide 61