<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Association Rule Mining to Study Process-Related Cause-Efect-Relationships in Pig Farming</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Tobias Zimpel</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Andrea Wild</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Hansjörg Schrade</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Stefan Kirn</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Boxberg Teaching and Research Centre</institution>
          ,
          <addr-line>Seehöfer Str. 50, Boxberg, 97944</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Hohenheim</institution>
          ,
          <addr-line>Schloß Hohenheim 1, Stuttgart, 70599</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Association rule mining is a technique for discovering relationships in large data sets and thus can obtain insights into process-related phenomena described by the data. In pig farming, necrosis (dead tissue) in the rearing period is an important phenomenon because it negatively afects animal welfare and reduces the share of usable young pigs. Pig rearing is a long-lasting process involving multiple stakeholders and management activities. Causes of necrosis are often unknown and their identification requires considerable time and efort. Pig rearing is a long-lasting process involving multiple stakeholders and management activities. Causes of necrosis are often unknown and their identification requires considerable time and efort. The objectives of this research are to (1) develop an association rule mining approach for generating plausible suggestions for cause-efect relationships of necrosis in pig rearing and (2) empirically evaluate the predictive power of the discovered rule set. We propose a procedure for generating and comparing association rules for diferent aggregation intervals. We used data from 672 pigs, collected over a ten-month period (Oct. 2018 - Apr. 2019 &amp; Oct. 2019 - Dec. 2019). Association rules were created on the training set and tested on the test set. Association rules were evaluated using the metrics support, confidence, and lift, and expert knowledge. The association rules focused on temperature-related attributes and achieved confidence values between 0.65 and 0.99. Association rules suggest temperature and underlying processes as (contributing) causes of necrosis. Process experts provided knowledge that supports these suggestions and indicates their plausibility.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;association rule mining</kwd>
        <kwd>pig farming</kwd>
        <kwd>cause-efect-relationships</kwd>
        <kwd>process-related data analysis</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Association rule mining is a popular technique for creating relationships between attributes in
data sets. Therefore, association rule analysis can analyze process-related from diferent sources
to obtain insights into relevant process phenomena [
        <xref ref-type="bibr" rid="ref1 ref2">1, 2</xref>
        ]. In pig farming, tail necrosis (dead
tissue) is such an phenomena in the rearing period [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>
        Pig rearing is often a seven-week process for increasing pigs’ weight (e.g., from 5 to 25 kg),
that involves multiple sub-processes, such as providing food or controlling the ventilation
and heating system in a pen (pigs’ environment). These sub-processes afect pigs and their
environment (e.g., air temperature) and can trigger conditions for necrosis development (e.g.,
tail biting due to stress) [
        <xref ref-type="bibr" rid="ref4 ref5 ref6">4, 5, 6</xref>
        ]. While sensors and corresponding data processing are present
(e.g., to detect pigs [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] or predict losses [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]), the development of necrosis and its causes are
usually unobserved or unknown (e.g., due to fewer specific sensors concerning the process
output or the presence of non-speaking stakeholders). We assume that the causes of necrosis lie
in the process. Therefore, association rule mining may suggest cause-efect relationships.
      </p>
      <p>
        Previous work propose suggestions for causes should be based on association rules for a
training set and a test set (as commonly used for supervised machine learning tasks), diferentially
preprocessed process data, and the incorporation of process-related knowledge [
        <xref ref-type="bibr" rid="ref10 ref2 ref9">2, 9, 10, 11, 12</xref>
        ].
However, association rules describe a correlation and not a causality between attributes. Thus,
we refer to the concept of interestingness to assess possible suggestions. Interestingness depends
on the application and is objective or subjective [13, 14]. Objective interestingness is calculated
based on the underlying data (e.g., confidence), while subjective interestingness is given when
the association rule is unexpected or actionable for the user [15, 14]. However, metrics and the
properties unexpected and actionable do not include process knowledge.
      </p>
      <p>We propose the plausibility property to assess suggestions. We call a suggestion plausible if
it is justified by process knowledge and based on underlying objective interesting association
rules. Justification by process knowledge can be integrated into the analysis of the created
association rules [16]. Objective interestingness is measured in this work using the metrics
of support, confidence and lift. While lift is calculated on support, support and confidence
are already necessary metrics for algorithm configuration with respect to minimum support
and minimum confidence [ 17, 18]. Minimum support and minimum confidence influence the
creation of association rules in terms of inclusion or exclusion of attributes and rules, while
the algorithm decides how association rules are created [17, 18]. Consequently, association
rules and their analysis depend mainly on the data preprocessing, e.g., the discretization of the
continuous values. Against this backdrop, we address the following research question: How to
design a procedure to create plausible association rules for suggestions of cause-efect-relationships
in pig rearing? The main contributions of this paper are as follows:
• We investigate association rule mining in terms plausible suggestions of cause-efect
relationships using the example of pig farming.
• We propose a procedure for creating association rules based on data from three aggregation
intervals (hourly, daily, weekly) to serve as the basis for proposing causes.
• We evaluate generated association rules by using an independent test set and justifications
based on the process knowledge.</p>
      <p>Our paper is structured as follows: In section 2, we provide background literature. In section 3,
we describe the data set and procedure. In section 4, we analyze generated association rules by
integrating process-knowledge, and in section 5, we provide a brief conclusion.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Background</title>
      <sec id="sec-2-1">
        <title>2.1. Association rule mining</title>
        <p>Association rule mining describes an approach to describing relationships in data by processing
binary coded data to create association rules [19]. Given is a set  = {0, . . . , } with  ∈ N
elements  (e.g.,  is a pig). Each element , in turn, is a set with up to  ∈ N attributes of the
 ⇒ 
Relationship means,  is probably true if  is given [20]. To assess this relationship, we use
the metrics of support (supp), confidence (conf ), and lift. Supp describes how frequent a subset of
attributes is in . Conf describes, how often an association rule is true. Lift describes if  ∪ 
occur less or more often than expected. These metrics are calculated as follows [19, 21]:
set .  contains all possible attributes of . Thereby,  has an attribute  ∈ , if  is true for 
(e.g., {} ∈  if a pig has necrosis). Given is a set  ⊂ , a set  ⊂ , and  ∩  = ∅
we define an association rule as a relationship between the two sets as follows [19]:
(1)
(2)
(3)
(4)
supp () = | { ∈ | ⊆ } |</p>
        <p>||
conf ( ⇒  ) =</p>
        <p>supp ()
supp ( ∪  )
lift ( ⇒  ) =</p>
        <p>
          supp ( ∪  )
supp () · supp ( )
Lift ( ⇒  ) = 1 means  and  are independent, while lift ( ⇒  ) &gt; 1 indicates a positive
correlation and lift ( ⇒  ) &lt; 1 indicates a negative correlation. The process of association
rule generation consists of two steps. First: generation of a candidate set  consisting of
several sets  and or  with minimal support (supp). Second, deriving association rules
based on  with minimal confidence (conf). Supp afects || and thus the theoretically
number of association rules as well. The selection of supp can be set manually for all
attributes or for each individual attribute [22, 23]. In practice, however, there may be dificulties
in determining supp because of the tradeof between the number of association rules that
can be processed by humans and the loss of rules (and thus of suggestions for causes) [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ].
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. Association rule mining for process-related cause-efect relationships</title>
        <p>
          [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ] propose association rule mining for analyzing problems in a drill manufacturing process.
The report on the need to include process experts for the subsequent analysis of the association
rules in order to improve manufacturing processes. [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] analyzed construction project accidents
by comparing association rules for two types of projects. The association rules created were
applicable to only one of the two project types with one exception (with varying confidence),
indicating the specificity of the association rules with respect to the training data. [ 11] also
analyzed accidents on construction sites. They report diferent confidence values for the same
rules on diferent training sets, suggesting that training sets with diferent focus support the
analysis of association rules. They also show that process-related knowledge can support
the analysis by containing information that is not in the data set. [12] investigated faults of
distribution terminals in power supply networks. They report on a reduced downtime by
performing maintenance based on association rules. While this suggests that association rule
mining could find suggestions for causes, it is unclear whether the association rules describe
actual causes or whether the reduced downtime is a result of more intensive (e.g., earlier)
maintenance. [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] studied diseases in two broiler farms. They report on specific association
rules each applicable to only one of two farms. For more general association rules, discretizing
the attributes diferently (so that an association rule for one farm applies to another farm) and
evaluating on independent data for each farm can increase the explanatory power. In summary,
a method for plausible association rules consists of multiple preprocessing approaches (in terms
of generalization), training and testing, and the inclusion of processd knowledge.
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Materials and methods</title>
      <p>We used process data from pig rearing provided by the Boxberg Teaching and Research Centre in
Germany. The Boxberg Teaching and Research Centre is the central educational, experimental,
and testing facility of the state of Baden-Wurttemberg in the field of pig farming. This data
set describes the rearing process in the winter season between 10/18/2018 and 4/10/2019 and
10/10/2019 and 12/01/2019. A total of 672 pigs were reared in seven groups of 96 pigs each. Our
data set consists of eleven pig-related and eleven environmental factors (figure 1). From our
point of view, these factors represent events or results of the underlying processes.</p>
      <p>
        Pig-related factors were weights, sex, daily gain between birth and start of rearing, mother,
father, age at the start of rearing, and the presence of necrosis and bloody tails. Weights, sex, daily
gain, age at start of rearing, and identification of mother and father were recorded manually. The
presence of pig necrosis and bloody tails was recorded during a weekly assessment according
to a uniform grading scale (see [24]). Environmental factors were temperatures, humidity,
brightness, and water consumption, recorded at five-second intervals, and daily dispensed food
and manipulable material. One part of the pen was covered by a false ceiling about 0.75 cm high,
while the larger part had a ceiling height of 2.9 meters. Thus, air and ground temperatures are
divided into temperatures under and outside the false ceiling. Our approach consists of analyzing
association rules created for three aggregation intervals of environmental factors: hourly, daily,
and weekly (figure 1) [
        <xref ref-type="bibr" rid="ref11">25</xref>
        ]. Aggregation intervals means that attributes are calculated on the
basis of hourly, daily or weekly periods (e.g., mean humidity in an hour). The implementation
uses python 3.8, pandas 1.1.5, scikit-learn 0.24.2, and mlextend 0.19.
      </p>
      <sec id="sec-3-1">
        <title>3.1. Data preprocessing</title>
        <p>
          During the preprocessing, we performed the steps: (1) unification of labels and data formats, (2)
refilling environmental data, (3) removal of outliers, (4) creation of samples, (5) one hot encoding
of categorical features, and (6) creation of training and test sets. The source data of temperatures,
water, humidity, and brightness consisted of entries when a change was measured. Missing
values were filled in a five-second interval by forward fill. We detected outliers using lower
and upper limits set by experts. Outliers (e.g., temperature = 3, 000∘ ) are errors and have
been removed [
          <xref ref-type="bibr" rid="ref12">26</xref>
          ]. In step (4) we combined pig with environmental data for each aggregation
interval, resulting in the same environmental attributes for each pig in a pen (figure 2).
        </p>
        <p>For the aggregation interval hourly, we calculated average values for temperatures, humidity,
brightness and water for each hour in a week. We also calculated the diference between the flow
and return flow temperatures, and the designated amount for food and manipulable materials
on a daily basis. For the daily aggregation interval, we used the hourly data to calculate the
n
o
it
c
e
ll
o
c
a
t
a
D
g
n
i
s
s
e
c
o
r
p
e
r
p
a
t
a
D
g
n
iir
n
a
T
t
s
e
T</p>
        <sec id="sec-3-1-1">
          <title>Pig data</title>
        </sec>
        <sec id="sec-3-1-2">
          <title>Age at the beginning of rearing (days)</title>
        </sec>
        <sec id="sec-3-1-3">
          <title>Birth weight (kg)</title>
        </sec>
        <sec id="sec-3-1-4">
          <title>Bloody tail at the beginning of rearing (true/false)</title>
        </sec>
        <sec id="sec-3-1-5">
          <title>Bloody tail last assessment (true/false)</title>
        </sec>
        <sec id="sec-3-1-6">
          <title>Control weight on the 21st day after birth (kg)</title>
        </sec>
        <sec id="sec-3-1-7">
          <title>Daily increase between birth and start of rearing (g)</title>
        </sec>
        <sec id="sec-3-1-8">
          <title>Identifier mother and father</title>
        </sec>
        <sec id="sec-3-1-9">
          <title>Necrosis at the beginning of rearing (true/false)</title>
        </sec>
        <sec id="sec-3-1-10">
          <title>Weight at the beginning of rearing (kg)</title>
        </sec>
        <sec id="sec-3-1-11">
          <title>Sex (female, male castrated)</title>
        </sec>
        <sec id="sec-3-1-12">
          <title>Necoris at the current assessment (true/false)</title>
        </sec>
        <sec id="sec-3-1-13">
          <title>Environmental data</title>
        </sec>
        <sec id="sec-3-1-14">
          <title>Air temperature (°C)</title>
        </sec>
        <sec id="sec-3-1-15">
          <title>Air temperature (false ceiling) (°C)</title>
        </sec>
        <sec id="sec-3-1-16">
          <title>Brightness (lx)</title>
        </sec>
        <sec id="sec-3-1-17">
          <title>Dispensed food (kg)</title>
        </sec>
        <sec id="sec-3-1-18">
          <title>Dispensed manipulable material (kg)</title>
        </sec>
        <sec id="sec-3-1-19">
          <title>Flow temperature (°C)</title>
        </sec>
        <sec id="sec-3-1-20">
          <title>Humidity (%)</title>
        </sec>
        <sec id="sec-3-1-21">
          <title>Minimum ground temperature (°C)</title>
        </sec>
        <sec id="sec-3-1-22">
          <title>Minimum ground temperature (false ceiling) (°C)</title>
        </sec>
        <sec id="sec-3-1-23">
          <title>Return flow temperature (°C)</title>
        </sec>
        <sec id="sec-3-1-24">
          <title>Water consumption (l)</title>
        </sec>
        <sec id="sec-3-1-25">
          <title>Value calculation in the</title>
          <p>aggregation interval hourly</p>
        </sec>
        <sec id="sec-3-1-26">
          <title>Value calculation in the</title>
          <p>aggregation interval daily</p>
        </sec>
        <sec id="sec-3-1-27">
          <title>Value calculation in the aggregation interval weekly</title>
        </sec>
        <sec id="sec-3-1-28">
          <title>Discretization of continuous values</title>
        </sec>
        <sec id="sec-3-1-29">
          <title>Discretization of continuous values</title>
        </sec>
        <sec id="sec-3-1-30">
          <title>Discretization of continuous values</title>
        </sec>
        <sec id="sec-3-1-31">
          <title>Feature selection, random undersampling</title>
        </sec>
        <sec id="sec-3-1-32">
          <title>Creation of association rules on the training set</title>
          <p>with Y={necrosis}, suppmin=0.3, confmin=0.4</p>
        </sec>
        <sec id="sec-3-1-33">
          <title>Testing association rules on the test set</title>
          <p>minimum, maximum, and maximum diference (between two hours) for temperatures, brightness
(without minimum), humidity, and the diference between flow and return flow temperatures
for each day in a week. We also added the sum of water, food and manipulable material for each
day. For the weekly aggregation interval, we calculated the minimum, maximum, and maximum
diference between two hours for temperatures, brightness (without minimum), humidity, and
the diference between flow and return flow temperatures in a week. We also added the weekly
sum and maximum daily diference of water, food, and manipulable material.</p>
          <p>
            Then we assigned continuous values to the corresponding classes with the value 1 (true) if
the continuous value is in the corresponding range, and 0 (false) otherwise (discretization into
binary values, table A) [
            <xref ref-type="bibr" rid="ref13">27</xref>
            ]. Classes were determined in discussion with domain experts.
          </p>
          <p>
            In step (5), one-hot coding was performed for sex and mother and father identifiers. In step
(6), we created our training and independent testing set based on the chronological start of
rearing of the groups used (see figure 3). Due to discretization, our training set consists of more
attributes than samples, which can lead to overfitting and potentially exponential growth of
possible association rules [
            <xref ref-type="bibr" rid="ref14">17, 28</xref>
            ]. Therefore, we used standard recursive feature elimination
          </p>
        </sec>
        <sec id="sec-3-1-34">
          <title>Training set</title>
        </sec>
        <sec id="sec-3-1-35">
          <title>Test set</title>
          <p>with random forest as estimator to select 150 features, reducing 50 per round. We also performed
random undersampling to balance necrosis in the training set to specify a higher supp. A
brief description of the training and test set is provided in table 1.</p>
        </sec>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Training</title>
        <p>
          We used the FP-growth algorithm to create association rules because FP-growth does not
require candidate generation [
          <xref ref-type="bibr" rid="ref15">29</xref>
          ]. The FP-growth algorithm was configured with supp = 0.3
and conf = 0.4. The original intention was to allow rare attributes in association rules
(supp = 0.1) since rare traits can also be attributes. However, supp = 0.1 was not
computable in the main memory, so we increased supp by supp = 0.1 until it was computable,
resulting in supp = 0.4. We chose conf = 0.4 because we expected a lower value than
0.5 due to unclear multifactorial causes and still wanted to maintain suficient confidence for
practice. We removed all associations rules with  ̸= {}. We also removed association
rules with food-related attributes in  after discussions suggesting that altered eating behavior
may be a consequence of necrosis and thus not a cause.
        </p>
      </sec>
      <sec id="sec-3-3">
        <title>3.3. Testing</title>
        <p>For testing, the created association rules were re-identified on the test set using the FP-Growth
algorithm and supp = 0.1 and conf = 0.0000001. We re-identified these associations
rules to discard rare associations rules in terms of support so that an association rule that only
applies to one or two pigs is ignored. Association rules with the highest confidence on the
training set tested on the test set are shown in tables 2 (aggregation level hourly), 3 (level daily),
and 4 (level weekly).  −  corresponds to the number of days before an assessment.</p>
        <p>Association rules in the hourly aggregation interval on the training set (table 2) focused on
the flow temperature and air temperature based on the confidence level and frequency when
the time period is not considered. Each association rule consisted of only one combination of
the attributes air temperature 18∘  ≤  &lt; 21∘ , flow temperature 20∘  ≤  &lt; 25∘ , or dif.
between flow and return flow temperature 0∘  ≤  &lt; 3∘ . The highest confidence and lift on
the test set is achieved by rule no. 1, while rule no. 3., which consists of one more temperature
attribute in , achieves the highest confidence on the training set. According to rule no. 3,
the temperature between flow and return flow temperature was &lt; 3∘ , indicating the heating
system emitted no or less heat. As a first conclusion, temperature (especially air temperature
and flow temperature) and the corresponding heating system are candidates for suggestions
on the causes of necrosis. These association rules are assigned to a specific hourly period. To
support the first conclusion, we compare this preliminary conclusion with association rules of
the daily and weekly aggregation interval.</p>
        <p>Association rules at the aggregation interval daily on the training set focused on
temperature attributes (see table 3). In particular, maximum air temperature 18∘  ≤  &lt; 21∘ , and
maximum air temperature under the false ceiling 24∘  ≤  &lt; 27∘ , and return flow
temperature 25∘  ≤  &lt; 30∘  were frequent attributes. Rules no. 4 to no. 6 with the highest
confidence level in the training set were not applicable to the test set. The attributes maximum
air temperature 18∘  ≤  &lt; 21∘ , minimum and maximum air temperature under the false
ceiling 24∘  ≤  &lt; 27∘  were also included in other rules during training in other periods, but
reached a lower conf. No other process environment attributes such as brightness were present
in the association rules of the training set. Although the rules in table 3 were not applicable
to the test set and the confidence of the association rules in the test set was lower than in the
training set, we conclude that the association rules on the aggregation interval daily support
the preliminary conclusion that temperature is a possible cause.</p>
        <p>At the aggregation interval weekly, the association rules (table 4) on the training set focused
on the air temperature under the false ceiling, expressed by two association rules describing
the minimum 21∘  ≤  &lt; 24∘ ) and maximum 24∘  ≤  &lt; 27∘  air temperature under the
false ceiling. However, the rule no was not applicable on the test set. The air temperature
itself occurs only in one association rule, which refers to the maximum diference between two
consecutive hours (1∘  ≤  &lt; 2∘ ), indicating that the air temperature was almost constant
during one week. While another association rule consisted of the maximum diference in
manipulable material output between two days, there are no other association rules that do not
consist of temperatures. Also based on the association rules for this aggregation interval, we
ifnd that temperature is a possible suggestion for the cause for necrosis.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Results and discussion</title>
      <p>Analysis of association rules per aggregation interval in both the training and test propose
temperatures as a cause of necrosis in the pig’s environment. According to process experts,
an air temperature of 18∘  &lt; 21∘  indicates a low air temperature. During the study period,
tests were conducted in the pens with diferent heating zones. Air temperatures in the areas
under the false ceiling were warmer than in the areas without the false ceiling. Therefore,
process-related information is available to support temperatures as a suggestion for the causes
of necrosis. Process experts said in discussions that the temperatures in the association rules
are quite plausible. Plausibility refers to subjective interestingness by including of
processrelated knowledge [16, 14]. Thus, we conclude that association rule mining is able to create
plausible association rules for use cases where there are few or no possibilities to identify
causes of undesirable process outputs. Lack of specific sensors (e.g., necrosis-specific sensors),
non-speaking process stakeholders (e.g., pigs), or an environment that limits reproducibility
(e.g., diferent numbers of pigs afected by necrosis living in a similar environment) are examples
of such reasons that make the root cause analysis dificult. Other possible applications include
diseases, quality variations and yield fluctuations in agriculture or animal husbandry. To use our
procedure in these use cases, the application-specific class adaptation in table A is necessary.</p>
      <p>Temperature is associated with underlying processes, like heating or ventilation control.
Thus, process-related causes could lie in the underlying processes. Although association rules
establish a relationship between temperatures (or underlying processes) and necrosis, they
describe no causality. The suggestion that temperature is a cause needs to be investigated in
further experiments, e.g., similar to [12].</p>
      <p>
        As in [
        <xref ref-type="bibr" rid="ref10 ref9">9, 10, 11</xref>
        ], created association rules are partially specific to the training set, resulting in
inapplicable association rules on the test set. This can be a result of our discretization scheme
and diferent properties of the test set. Future work relate to the creation of discretization
schemes and the transfer of generalization concepts from attributes in hierarchical structures to
non-hierarchical structures, as is the case with the environmental attributes [
        <xref ref-type="bibr" rid="ref11">25</xref>
        ]. Generalization
improves transferability to other use cases. Similar to [
        <xref ref-type="bibr" rid="ref9">9, 11</xref>
        ], we report that process-related
knowledge improves the downstream analysis of association rules with respect to justification.
      </p>
      <p>
        This work is subject to the following limitations. First, pig farming consists of sub-processes
that are carried out in an orderly structure. Association rules use sets of attributes and therefore
do not consider the order of characteristics of the underlying processes. To maintain the ordered
structure, sequential rule discovery is one approach [
        <xref ref-type="bibr" rid="ref16">30</xref>
        ]. Comparing results using association
rule mining or sequential rule mining to study cause-efect relationships is future work. Second,
class lower and upper bounds afect the support of concerning attributes, may exclude attributes
due to low support. In addition, recursive feature elimination excludes attributes once again.
Feature elimination was necessary to ensure computability due to available main memory. Third,
we did not remove redundant association rules in the downstream analysis. However, this would
not change the association rules presented or the suggestions, but would reduce the number of
rules. Fourth, we randomly balanced the samples with and without necrosis in the training set
to increase supp. This directly afects our metrics in the training set. Fifth, we re-identified
the association rules in the test set to treat rare association rules as inapplicable association
rules because these rules would afect too few pigs to represent a cause-efect relationship. Thus,
it is not possible to distinguish between association rules with supp = 0 or 0 &lt; supp &lt; 0.1 .
      </p>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusion</title>
      <p>This research explored association rule mining for plausible suggestions of process-related
cause-efect relationships in pig farming. We used real data over a ten-month period and created
association rules based on diferent intervals of data aggregation. Association rules pointing to
temperatures and thus the underlying process regarding heat or air control as a suggestion for
causes of necrosis. Moreover, there is process-related knowledge (e.g., diferent heating zones)
that supports this suggestion, so we assume that association rule mining is able to provide
plausible (justified by process knowledge) suggestions.</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgments</title>
      <p>We thank the LABEL-FIT project team, especially Eva Gallmann, William Gordillo, Barbara
Keßler, and Svenja Opderbeck for data collection and data provision. This work was supported
by the project “Landwirtschaft 4.0: Info-System (Phase 2)”, funded by the Ministry for Food,
Rural Areas and Consumer Protection of Baden-Wurttemberg, Germany. This work was also
supported by the project LABEL-FIT by funds of the Federal Ministry of Food and Agriculture
(BMEL) based on a decision of the Parliament of the Federal Republic of Germany via the Federal
Ofice for Agriculture and Food (BLE) under the innovation support programme (2819200415).
Joint Conference on Computer Science and Software Engineering (JCSSE), IEEE, 2013, pp.
206–210. doi:10.1109/JCSSE.2013.6567346.
[11] B. U. Ayhan, N. B. Doğan, O. B. Tokdemir, An association rule mining model for the
assessment of the correlations between the attributes of severe accidents, Journal of Civil
Engineering and Management 26 (2020) 315–330. doi:10.3846/jcem.2020.12316.
[12] X. Zhang, Y. Tang, Q. Liu, G. Liu, X. Ning, J. Chen, A fault analysis method based on
association rule mining for distribution terminal unit, Applied Sciences 11 (2021) 5221.
doi:10.3390/app11115221.
[13] R. Agrawal, R. Srikant, Fast algorithms for mining association rules in large databases, in:
Proceedings of the 20th International Conference on Very Large Data Bases, VLDB ’94,
Morgan Kaufmann Publishers Inc, San Francisco, CA, USA, 1994, pp. 487–499.
[14] A. Silberschatz, A. Tuzhilin, On subjective measures of interestingness in knowledge
discovery, in: Proceedings of the First International Conference on Knowledge Discovery
and Data Mining, KDD’95, AAAI Press, 1995, pp. 275–281.
[15] G. Dong, J. Li, Interestingness of discovered association rules in terms of
neighborhoodbased unexpectedness, in: X. Wu, R. Kotagiri, K. B. Korb (Eds.), Research and Development
in Knowledge Discovery and Data Mining, volume 1394 of Lecture Notes in Computer
Science, Springer Berlin Heidelberg, Berlin, Heidelberg, 1998, pp. 72–86. doi:10.1007/
3-540-64383-4_7.
[16] G. Piatetsky-Shapiro, C. J. Matheus, The interestingness of deviations, in: Proceedings of
the 3rd International Conference on Knowledge Discovery and Data Mining, AAAIWS’94,
AAAI Press, 1994, pp. 25–36.
[17] Z. Zheng, R. Kohavi, L. Mason, Real world performance of association rule algorithms,
in: F. Provost, R. Srikant, M. Schkolnick, D. Lee (Eds.), Proceedings of the seventh ACM
SIGKDD international conference on Knowledge discovery and data mining - KDD ’01,
ACM Press, New York, New York, USA, 2001, pp. 401–406. doi:10.1145/502512.502572.
[18] J. Hipp, U. Güntzer, G. Nakhaeizadeh, Algorithms for association rule mining — a general
survey and comparison, ACM SIGKDD Explorations Newsletter 2 (2000) 58–64. doi:10.
1145/360402.360421.
[19] R. Agrawal, T. Imieliński, A. Swami, Mining association rules between sets of items in large
databases, ACM SIGMOD Record 22 (1993) 207–216. doi:10.1145/170036.170072.
[20] P. Hájek, I. Havel, M. Chytil, The guha method of automatic hypotheses determination,</p>
      <p>Computing 1 (1966) 293–308. doi:10.1007/bf02345483.
[21] S. Brin, R. Motwani, J. D. Ullman, S. Tsur, Dynamic itemset counting and implication rules
for market basket data, ACM SIGMOD Record 26 (1997) 255–264. doi:10.1145/253262.
253325.
[22] B. Liu, W. Hsu, Y. Ma, Mining association rules with multiple minimum supports, in:
U. Fayyad, S. Chaudhuri, D. Madigan (Eds.), Proceedings of the fifth ACM SIGKDD
international conference on Knowledge discovery and data mining - KDD ’99, ACM Press, New
York, New York, USA, 1999, pp. 337–341. doi:10.1145/312129.312274.
[23] F. Z. El Mazouri, M. C. Abounaima, K. Zenkouar, Data mining combined to the multicriteria
decision analysis for the improvement of road safety: case of france, Journal of Big Data 6
(2019). doi:10.1186/s40537-018-0165-0.
[24] K. Bönisch, A. vom Brocke, S. Dippel, A. Grümpel, L. Hagemann, C. Jais, D. Lösel,</p>
    </sec>
    <sec id="sec-7">
      <title>A. Discretization of continuous values</title>
      <p>Data
Age (start of rearing)
Birth weight</p>
      <p>Brightness
Control weight
Daily increase</p>
      <p>Food</p>
      <p>Humidity
Manipulable material
Temperatures
(air, ground)</p>
      <p>Temperatures
(flow, return flow)</p>
      <p>Water
Weight (start of rearing)
Unit
kg
kg
lx
kg
g
kg
kg
kg
%
kg
kg
kg
∘ 
∘ 
∘ 
∘ 
L
L</p>
      <p>L</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>S.</given-names>
            <surname>Schönig</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Rogge-Solti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Cabanillas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Jablonski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Mendling</surname>
          </string-name>
          ,
          <article-title>Eficient and customisable declarative process mining with sql</article-title>
          , in: S. Nurcan,
          <string-name>
            <given-names>P.</given-names>
            <surname>Sofer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Bajec</surname>
          </string-name>
          , J. Eder (Eds.),
          <source>Advanced Information Systems Engineering</source>
          , volume
          <volume>9694</volume>
          of Lecture Notes in Computer Science, Springer International Publishing, Cham,
          <year>2016</year>
          , pp.
          <fpage>290</fpage>
          -
          <lpage>305</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>319</fpage>
          -39696-5_
          <fpage>18</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>S.</given-names>
            <surname>Nurcan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Sofer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Bajec</surname>
          </string-name>
          , J. Eder (Eds.),
          <source>Advanced information systems engineering, Lecture Notes in Computer Science</source>
          , Springer International Publishing, Cham,
          <year>2016</year>
          . doi:
          <volume>10</volume>
          . 1007/978-3-
          <fpage>319</fpage>
          -39696-5.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>G.</given-names>
            <surname>Reiner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Kühling</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lechner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Schrade</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Saltzmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Muelling</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Dänicke</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Loewenstein</surname>
          </string-name>
          ,
          <article-title>Swine inflammation and necrosis syndrome is influenced by husbandry and quality of sow in suckling piglets, weaners and fattening pigs</article-title>
          ,
          <source>Porcine health management 6</source>
          (
          <year>2020</year>
          )
          <article-title>32</article-title>
          . doi:
          <volume>10</volume>
          .1186/s40813-020-00170-2.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>K. I.</given-names>
            <surname>Fiesjå</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Solberg</surname>
          </string-name>
          ,
          <article-title>Pathological lesions in swine at slaughter: Iv. pathological lesions in relation to rearing system and herd size</article-title>
          ,
          <source>Acta Veterinaria Scandinavica</source>
          <volume>22</volume>
          (
          <year>1981</year>
          )
          <fpage>272</fpage>
          -
          <lpage>282</lpage>
          . doi:
          <volume>10</volume>
          .1186/bf03547516.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>F. Kjell I.</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I. B.</given-names>
            <surname>Forus</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Solberg</surname>
          </string-name>
          ,
          <article-title>Pathological lesions in swine at slaughter: V. pathological lesions in relation to some environmental factors in the herds</article-title>
          ,
          <source>Acta Veterinaria Scandinavica</source>
          <volume>23</volume>
          (
          <year>1982</year>
          )
          <fpage>169</fpage>
          -
          <lpage>183</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>K. I.</given-names>
            <surname>Fiesjå</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H. O.</given-names>
            <surname>Ulvesaeter</surname>
          </string-name>
          ,
          <article-title>Pathological lesions in swine at slaughter: I. baconers</article-title>
          ,
          <source>Acta Veterinaria Scandinavica</source>
          <volume>20</volume>
          (
          <year>1979</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>M.</given-names>
            <surname>Riekert</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Klein</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Adrion</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Hofmann</surname>
          </string-name>
          , E. Gallmann,
          <article-title>Automatically detecting pig position and posture by 2d camera imaging and deep learning</article-title>
          ,
          <source>Computers and Electronics in Agriculture</source>
          <volume>174</volume>
          (
          <year>2020</year>
          )
          <article-title>105391</article-title>
          . doi:
          <volume>10</volume>
          .1016/j.compag.
          <year>2020</year>
          .
          <volume>105391</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>T.</given-names>
            <surname>Zimpel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Riekert</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Klein</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Hofmann</surname>
          </string-name>
          ,
          <article-title>Machine learning for predicting animal welfare risks in pig farming</article-title>
          ,
          <source>Agricultural Engineering</source>
          <volume>76</volume>
          (
          <year>2021</year>
          )
          <fpage>24</fpage>
          -
          <lpage>35</lpage>
          . doi:
          <volume>10</volume>
          .15150/lt.
          <year>2021</year>
          .
          <volume>3261</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>C</surname>
          </string-name>
          .-W. Cheng, C.-
          <string-name>
            <surname>C. Lin</surname>
            ,
            <given-names>S.-S.</given-names>
          </string-name>
          <string-name>
            <surname>Leu</surname>
          </string-name>
          ,
          <article-title>Use of association rules to explore cause-efect relationships in occupational accidents in the taiwan construction industry</article-title>
          ,
          <source>Safety Science</source>
          <volume>48</volume>
          (
          <year>2010</year>
          )
          <fpage>436</fpage>
          -
          <lpage>444</lpage>
          . doi:
          <volume>10</volume>
          .1016/j.ssci.
          <year>2009</year>
          .
          <volume>12</volume>
          .005.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>S.</given-names>
            <surname>Maneewongvatana</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Maneewongvatana</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Lojitamnuay</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Juthasong</surname>
          </string-name>
          ,
          <article-title>Using association rules to identify root causes of crd in broilers, in: The 2013 10th International A</article-title>
          .
          <string-name>
            <surname>Müller</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Müller</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Naya</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          <string-name>
            <surname>Schrade</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Späth</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Velt</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Wild</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Lechner</surname>
          </string-name>
          ,
          <string-name>
            <surname>Deutscher</surname>
          </string-name>
          schweine-boniturschlüssel
          <source>(dsbs)</source>
          ,
          <year>2017</year>
          . URL: https://www.fli.de/fileadmin/FLI/ ITT/Deutscher_Schweine_Boniturschluessel_
          <fpage>2017</fpage>
          -06-30_de.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>R.</given-names>
            <surname>Srikant</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Agrawal</surname>
          </string-name>
          , Mining generalized association rules,
          <source>Future Generation Computer Systems</source>
          <volume>13</volume>
          (
          <year>1997</year>
          )
          <fpage>161</fpage>
          -
          <lpage>180</lpage>
          . doi:
          <volume>10</volume>
          .1016/
          <fpage>S0167</fpage>
          -739X(
          <issue>97</issue>
          )
          <fpage>00019</fpage>
          -
          <lpage>8</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [26]
          <string-name>
            <given-names>A.</given-names>
            <surname>Famili</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W. M.</given-names>
            <surname>Shen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Weber</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Simoudis</surname>
          </string-name>
          ,
          <article-title>Data preprocessing and intelligent data analysis</article-title>
          ,
          <source>Intelligent data analysis 1</source>
          (
          <year>1997</year>
          )
          <fpage>3</fpage>
          -
          <lpage>23</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [27]
          <string-name>
            <given-names>R.</given-names>
            <surname>Agrawal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Imielinski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Swami</surname>
          </string-name>
          ,
          <article-title>Database mining: a performance perspective</article-title>
          ,
          <source>IEEE Transactions on Knowledge and Data Engineering</source>
          <volume>5</volume>
          (
          <year>1993</year>
          )
          <fpage>914</fpage>
          -
          <lpage>925</lpage>
          . doi:
          <volume>10</volume>
          .1109/69. 250074.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [28]
          <string-name>
            <given-names>A.</given-names>
            <surname>Vabalas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Gowen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Poliakof</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. J.</given-names>
            <surname>Casson</surname>
          </string-name>
          ,
          <article-title>Machine learning algorithm validation with a limited sample size</article-title>
          ,
          <source>PloS one 14</source>
          (
          <year>2019</year>
          )
          <article-title>e0224365</article-title>
          . doi:
          <volume>10</volume>
          .1371/journal.pone.
          <volume>0224365</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [29]
          <string-name>
            <given-names>J.</given-names>
            <surname>Han</surname>
          </string-name>
          ,
          <string-name>
            <surname>J</surname>
          </string-name>
          . Pei,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Yin</surname>
          </string-name>
          ,
          <article-title>Mining frequent patterns without candidate generation</article-title>
          ,
          <source>ACM SIGMOD Record</source>
          <volume>29</volume>
          (
          <year>2000</year>
          )
          <fpage>1</fpage>
          -
          <lpage>12</lpage>
          . doi:
          <volume>10</volume>
          .1145/335191.335372.
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [30]
          <string-name>
            <given-names>P.</given-names>
            <surname>Fournier-Viger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Gueniche</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Zida</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V. S.</given-names>
            <surname>Tseng</surname>
          </string-name>
          ,
          <article-title>Erminer: sequential rule mining using equivalence classes</article-title>
          ,
          <source>in: International Symposium on Intelligent Data Analysis</source>
          ,
          <year>2014</year>
          , pp.
          <fpage>108</fpage>
          -
          <lpage>119</lpage>
          . - -
          <string-name>
            <surname>Min</surname>
          </string-name>
          ., Max.,
          <string-name>
            <surname>Mean</surname>
          </string-name>
          , Dif. - -
          <string-name>
            <surname>Sum</surname>
          </string-name>
          (
          <article-title>daily) Sum (weekly) Dif. (weekly) Min</article-title>
          ., Max.,
          <string-name>
            <surname>Mean</surname>
            ,
            <given-names>Dif.</given-names>
          </string-name>
          <article-title>Sum (daily) Sum (weekly) Dif. (weekly) Min</article-title>
          ., Max.,
          <string-name>
            <given-names>Mean</given-names>
            <surname>Dif</surname>
          </string-name>
          . Min., Max.,
          <string-name>
            <given-names>Mean</given-names>
            <surname>Dif</surname>
          </string-name>
          .
          <article-title>Sum (hourly) Sum (daily) Sum (weekly) Dif. (weekly) -</article-title>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>