# Pattern Discovery in White Etching Crack Experimental Data Using Machine Learning Techniques
## 2 Data and Methods
### Association Rule Mining  
In addition to identifying individual oil compounds that are influential to WEC risk classification, an analysis was performed to investigate the relationship between frequently occurring combinations of compounds in the available data and WEC risk. The motivation behind this analysis came from previous investigations, such as [5], which concluded that certain additive combinations resulted in WECs, while others did not. The algorithm used to perform this task is called the Apriori algorithm [41]. The algorithm searches for frequently occurring sets, or combinations of compounds in the oil dataset in an unsupervised manner based on user-defined minimum criteria. The minimum criteria ensure a standard for the quality of rules with quality referring to the strength of the identified associations and their frequency of occurrence in the dataset. The algorithm then generates association rules based on the identified frequent sets that shed light on which compounds are likely to join which other compound or which other groups of compounds. For example, the two association rules shown in Table 2 describe the likelihood of finding c12 in an oil that already has c16 (rule number 1) and the likelihood of finding c12 in an oil that already has the compound combination of c8 and c9 (rulenumber 2). The four main metrics used to describe the likelihood of a given association rule can also be used, for example, to define the minimum criteria by the user to filter out rarely occurring associations or association rules with low confidence. Several metrics are used to describe the likelihood or the quality of a given association rule. The metrics of the rules in Table 2 are listed in Table 3. These metrics are explained below [42]:  
1. Support: the proportion of oils in the dataset that contain all the compounds in a given association rule. For example, the support of rule number 1 from Table 3 is calculated by dividing the number of oils containing both c16 and c12 in the dataset (36 oils) by the total number of oils in the dataset (679 oils); 36/679 = 0.0530. 2. Confidence: the proportion of oils that contain the compound(s) on the left hand side (LHS) of an association rule divided by the support of the rule. Using rule number 2 from Table 3 as an example, confidence is calculated by dividing the proportion of oils in the dataset that contain both c8 and c9 (0.0133) by the support of the rule (0.0133), which would equal 1. This essentially means that all oils that contain both c8 and c9 also contain c12. 3. Lift: the confidence of a rule divided by the proportion of oils in the dataset that contain the compound(s) on the right hand side (RHS) of an association rule. This metric indicates how surprising an association rule is given the expected probability of finding the RHS compound(s) in an oil in the dataset. For instance, rule number 3 from Table 3 has a lift of almost 1, which indicates that the probability of finding c16 in any oil in the dataset is almost identical to the probability of finding c16 in an oil that already contains c3. This means that the association suggested by rule number 3 is weak. In contrast, rule number 2 from Table 3 has a lift of 5.853, which indicates that the association indicated by the rule is strong. For rule number 1, the lift value is below 1, which means that it is more likely not to find c12 in an oil that contains c16 than it is to find c12 in an oil that contains c16. 4. Count: the number of oils in the dataset that contain all the compounds in a given association rule. Using rule number 2 from Table 3 as an example, the count is 9, which means that the number of oils in the dataset that contain the combination of c8, c9, and c12 is 9. [PERSON] et al. provide more details on the Apriori algorithm used in this investigation and the metrics of association rules [42]. The defined minimum criteria for this investigation were chosen to be a confidence of 50% and a support of 0.1%, since confidence and support are the best-known constraints for this algorithm [42].