# High-Performance Actionable Knowledge Miner for Boosting Business Revenue
## 2 Methods
### A Distributed Algorithm for the Mining of Action Rules  
Another method we propose within this research to improve the times of action rule mining is based on the parallel version of the mining algorithm. It uses a distributed implementation in Spark [25]. Most of the existing approaches split large datasets into chunks of a small number of data records [34; 35]. These methods prove to be inefficient when the dimensionality of the dataset grows. We propose to use a new data distribution strategy by splitting the datasets vertically (that is, by attributes) and extract action rules from multiple partitions using Spark as a distributed framework. Once all parallel processes are complete, action rules from each partition are combined to yield the final recommendation of action rules. The proposed distributed action rule extraction algorithm is primarily imposed for the association action rules extraction, introduced by [PERSON] et al. [22], to retrieve all possible action rules from the given decision system. Association action rules extraction is one of the most complex and computationally expensive of all action rules extraction algorithms because of the apriori algorithm [36; 37] nature. The apriori algorithm starts with two element patterns and continues n iterations until it finds n element patterns, where n is the number of attributes in the given data. The sample association rule, which means that when a pattern (\(a_{1}\cap b_{2}\)) occurs together in the data, a pattern (\(c_{1}\cap d_{2}\)) also occurs in the same data, is given in the below equation:  
\[(a,a_{1})\cap(b,b_{2})\rightarrow(c,c_{1})\cap(d,d_{2})\]  
Action rules also can be related to association rules in such a way that an actionable pattern \(t_{1}\cap t_{2}\cap...\cap t_{n}\) occurs, where \(t_{i}\) represents an atomic action, and the actionable pattern with decision attribute \(d_{i}\) also occurs at least with minimum support (\(m_{(supp)}\)) and minimum confidence (\(m_{(conf)}\)). The association action rules algorithm starts by extracting an atomic action on the left side of the rule and decision action on the right side. The algorithm continues for a maximum of \(n-1\) iterations, where \(n\) is the number of attributes in the data and gives all actionable patterns in the data. We propose a method that provides very broad recommendations using the association action rules method and works comparatively faster in terms of execution time than the existing action rules extraction approaches [34; 35]. We propose this method that suits data that have large attribute space like the business data used in our experiments. In this method, we split the data vertically into two or more partitions, and each partition can be split horizontally by the default settings of the Spark framework [25]. Figure 6 presents an example of vertical data partitioning with the sample decision table. The distributed action rule extraction algorithm, as given in Algorithm 3, runs separately on each partition, performs transformations such as map(), flatmap() functions, and combines results with join() and groupBy() operations. ```
1:\(\mathcal{P}\leftarrow\{(c_{1},c_{2})\}\a seed for all following transformations. The proposed algorithm only takes a maximum of \(n\) iterations, where \(n\) is the number of attributes in the data. During the \(i\)th iteration, the algorithm extracts action rules with \(i-1\) action set pairs on the left-hand side of the rule. Step 8 uses flatMap() transformation on the data to collect all possible \(i\) combinations from a data record. We sort the combination of attribute values since they act as the key for upcoming join() and groupBy() operations. We also attach \(r_{id}\) to all combinations to obtain the support (which data records contain a particular pattern) of each combination with the use of Spark's groupByKey() method in Step 9. We perform sequential filtering in the following steps. In Step 10, we filter out combinations for which the indexes count is lower than the given support threshold \(m_{(supp)}\).