# High-Performance Actionable Knowledge Miner for Boosting Business Revenue
## 2 Methods
### A Distributed Algorithm for the Mining of Action Rules
From the filtered combinations, we obtain combinations (\(C_{F}\) and \(C_{T}\)) that have a decision from \(D_{F}\) value and a decision to \(D_{T}\) values in Step 11 and Step 12, respectively. In Step 14, we join \(C_{F}\) and \(C_{T}\) based on attribute names, and filter out \(D_{F}\) and \(D_{T}\) values since we know the decision action, which is not required in finding confidence of action rules. This results in action rules of the form (attributes, (fromValues, fromIndexes), (toValues, toIndexes)). We then calculate the actual support of the resultant action rules and filter out rules that have support of at least the given support threshold \(m_{(supp)}\) in Step 15. From Step 14, we have \(|Y1.Z1|\) and \(|Y2.Z2|\), or, in other words, numerator of the confidence formula. To find the denominator \(|Y1|\) and \(|Y2|\), we again use from values indexes and to values indexes in Step 17 and Step 18, respectively. We perform the join() operation with old combinations and assign values to \(A_{F}\) and \(A_{T}\) in Step 19 and Step 20, respectively. Subsequently, we perform the division operation of the confidence formula in the same steps. In Step 21, we join \(A_{F}\) and \(A_{T}\). We now join action rules with support from Step 15 and action rules with confidence from Step 21 to obtain a final set of action rules. In Step 23, we assign new combinations to the old combinations and pass the same to the next iteration. ```
0: A is data of type (\(r_{id},r_{val}\)), DF is a decision from, and DT is a decision to
1:\(d_{A}=((s,r_{id})\in r|r\in A).\)groupByKey()
2:\(\phi\gets d_{A}\)
3:\(i\gets 2\)
4:repeat
5:until parallel:
6:while\(i\
eq n\)do:
7:\(C\gets A.flatMap(r\rightarrow(comb(r_{val},i))),r_{id})\)
8:\(C_{N}\leftarrow C.groupByKey()\)
9:\(C_{V}\leftarrow C_{N}.filter()\)
10:\(C_{F}\gets C_{V}.filter(D_{F})\)
11:\(C_{T}\gets C_{V}.filter(D_{T})\)
12:if\(C_{F}==\phi\) or \(C_{T}==\phi\)then break
13:\(atomic\leftarrow\)\(C_{F}.join(C_{T}).filter()\)
14:\(action_{supp}\leftarrow(findSupp(m)|m\in atomic).filter()\)
15:endif
16:if\(action_{supp}==\phi\)then break
17:\(atomic\leftarrow\)\(atomic.filter()\)
18:\(atomic\gets\)\(atomic.filter()\)
19:\(A_{F}\leftarrow\)\(atomic.F.join(C_{O})\)
20:\(A_{T}\leftarrow\)\(atomic_{T}.join(C_{T})\)
21:\(action_{conf}\gets A_{F}.join(A_{T})\)
22:\(actions\gets action_{supp}.join(action_{(conf)})\)
23: collect actions
24:\(C_{O}=C_{N}\)
25:\(i\gets i+1\)
26:endif
27:endwhile
```

**Algorithm 3** Algorithm for distributed action rules mining: ARE (A, \(D_{F}\),\(D_{T}\)). ## 3 Results

We performed a series of experiments using the above-described methods. We measured the original and the improved mining times, as well as the impact on the generated recommendations. ### Experimental Setup

The metrics collected for evaluation included the following:

* Mining times. * The number of action rules extracted. * The number of distinct customers covered by the rules. We measured the number of distinct customers, as it directly affects the NPS impact of recommendations. In this system, the goal is to maximize that metric. The testing procedure consisted of the following steps/assumptions:

* Reading in the company's action rule output file and processing it in the recommendation algorithm. We kept track of the triggering process and recorded the set of recommendations that produced the best NPS effect. * We defined the base performance as that referring to the algorithm without any above-described modifications. * We performed the initial testing on a dataset from one year, and then the primary testing on the dataset from the following year. ### Test Cases

We chose different types of companies' datasets to perform testing on and compared the performance of recommendations before and after the changes. The following sizes of datasets were chosen for testing:

* Small datasets (200-300 rows);
- Medium datasets (1100 rows);

Figure 6: Example Vertical Distribution Strategy. The table on the left side of the image is an example decision table.