## 2 Materials and Methods  
### Association Analysis  
Association analysis was invented to increase sales in supermarkets. The contents of clients' trolleys were analyzed to find the rules for the appearance of specific goods in a trolley by a cash desk. Thus, the synonym for association analysis is market basket analysis [30]. Each rule found consists of a predecessor (body of the rule) and the consequent (head of the rule). The rule can be presented as _if body_, _then head or body_\(\to\)_head_. Having a dataset comprising many cases consisting of their bodies and heads, it is possible to assess the meaning of the rule by three ratios called confidence (_conf_), support (_sup_), and lift (marked with its full name). They can be calculated as follows:  
\[conf=\frac{n_{bh}}{n_{b}} \tag{1}\]  
\[sup=\frac{n_{bh}}{N} \tag{2}\]  
\[lift=\frac{conf}{P(h)} \tag{3}\]  
where  
\[n_{bh}\]  
is the number of cases where the criteria for body (predecessor) are met and simultaneously the criterium (or criteria) for head are also met;  
\[n_{b}\]  
is the number of cases where the criteria for body are met;  
\[N\]  
is the total number of cases in the database;  
\[P(h)\]  
is the probability of appearing head meeting the criteria set for head.  
This probability can be calculated as follows:  
\[P(h)=\frac{n_{h}}{N} \tag{4}\]  
where \(n_{h}\) is the number of cases with heads meeting the criteria (set for heads). The rule with 100% confidence means that, every time a specific predecessor appears, then the specific consequent also always appears. This kind of rule is even more informative when there is a significant number of cases meeting the rule. Then, the support of the rule is relatively high (the total range of support values is (0, 1)). If the support is at a minimum, this means that there is only one case meeting the rule in the whole database of the cases. The lift has a secondary function. It protects against considering the rules (even of high confidence) for which the probability of a specific head is higher than the calculated confidence. If lift \(<\) 1, the rule is useless [28; 29; 30; 31]. The importance of rules is further discussed in Section 3.1., where the total measure of the importance of rules is introduced. The body of the rule can be described by several features and conditions to be met, formulated with any logic expression (with OR, AND operators). That, and the simplicity of parameters describing each rule, allow association analysis to be used in a variety of applications. Nowadays, association analysis is still applied for the designed purpose ([32] as an example). However, smart applications can be found in several areas, e.g., for the following:  
* precipitation prediction [33];
* insurance risk assessment [34];
* traffic safety analysis [35; 36; 37];
* assessment of construction project risk [27];
* assessment of risk in construction disputes [38];
* a variety of problems in biology [39; 40; 41];
* preferences' discovering in social sciences [42];
* collusion detection in tender procedures [43];
* quality management problem-solving in production [44].  
The rule-finding processes have to be computer-aided as the number of rules is usually huge even if the database searched is not large. It is a common case where, within several thousand rules found, only several are meaningful.