Mining Correlated High-Utility Itemsets in a Database with Utility Information using the ECHUM Algorithm (SPMF documentation)

This example explains how to run the ECHUM algorithm using the SPMF open-source data mining library.

How to run this example?

What is ECHUM?

ECHUM is an algorithm for discovering correlated high-utility itemsets in a transaction database containing utility information, using the Kulc correlation measures. This is different from other algorithms in SPMF for correlated high utility itemset mining that use the bond or all-confidence measure (FCHM_bond and FCHM_all_confidence).

A limitation of traditional high utility itemset mining algorithms is that they may find many itemsets having a high utility but containing items that are weakly correlated. The ECHUM is an algorithm that can address this issue by combining the idea of correlated pattern with high-utility pattern, to find high-utility itemsets where items are highly correlated.

What is the input?

ECHUM takes as input a transaction database with utility information, a minimum utility threshold min_utility (a positive integer), and a mincorr threshold (a double number in the [0,1] interval). Let's consider the following database consisting of 5 transactions (t1,t2...t5) and 7 items (1, 2, 3, 4, 5, 6, 7). This database is provided in the text file "DB_utility.txt" in the package ca.pfv.spmf.tests of the SPMF distribution.


Items Transaction utility Item utilities for this transaction
t1 3 5 1 2 4 6 30 1 3 5 10 6 5
t2 3 5 2 4 20 3 3 8 6
t3 3 1 4 8 1 5 2
t4 3 5 1 7 27 6 6 10 5
t5 3 5 2 7 11 2 3 4 2

Each line of the database is:

Note that the value in the second column for each line is the sum of the values in the third column.

What are real-life examples of such a database? There are several applications in real life. One application is a customer transaction database. Imagine that each transaction represents the items purchased by a customer. The first customer named "t1" bought items 3, 5, 1, 2, 4 and 6. The amount of money spent for each item is respectively 1 $, 3 $, 5 $, 10 $, 6 $ and 5 $. The total amount of money spent in this transaction is 1 + 3 + 5 + 10 + 6 + 5 = 30 $.

What is the output?

The output of ECHUM is the set of correlated high utility itemsets having a utility no less than a min_utility threshold (a positive integer) set by the user, and a correlation no less than a mincorr threshold also set by the user.

To explain what is a correlated high utility itemset in this context, it is necessary to review some definitions.

An itemset is an unordered set of distinct items. The utility of an itemset in a transaction is the sum of the utility of its items in the transaction. For example, the utility of the itemset {1 4} in transaction t1 is 5 + 6 = 11 and the utility of {1 4} in transaction t3 is 5 + 2 = 7. The utility of an itemset in a database is the sum of its utility in all transactions where it appears. For example, the utility of {1 4} in the database is the utility of {1 4} in t1 plus the utility of {1 4} in t3, for a total of 11 + 7 = 18. A high utility itemset is an itemset such that its utility is no less than min_utility.

A correlated itemset is an itemset such that its correlation is no less than a mincorr threshold set by the user.

The correlation of an itemset X containining k items is measured by this algorithm using the KullC measure, which is defined as : Kulc(X) = (1 / k) * SUM( sup(X) / sup(i) ) for each item i from X.

The notation sup(X) means the support of X, that is the number of transaction where all the items from X appears.

The notation sup(i( means the support of an item i, that is the number of transactions containing that item.

The Kulc is a value in the [0,1] interval. A high value means a highly correlated itemset. A correlated high-utility itemset with the Kulc measure is a high-utility itemset that is also a correlated itemset.

For example, if we run ECHUM with a minimum utility of 30 and mincorr = 0.6, we obtain 4 correlated high-utility itemsets:

itemsets kulc correlation utility
{2 4} 0.66 30
{2 5} 0.87 31
{2 5 3} 0.78 37
{2 4 5} 0.61 36

If the database is a transaction database from a store, we could interpret these results as all the groups of items bought together that generated a profit of 30 $ or more, and containing items that are correlated (are likely to be bought together).

Input file format

The input file format of ECHUM is defined as follows. It is a text file. Each lines represents a transaction. Each line is composed of three sections, as follows.

For example, for the previous example, the input file is defined as follows:

3 5 1 2 4 6:30:1 3 5 10 6 5
3 5 2 4:20:3 3 8 6
3 1 4:8:1 5 2
3 5 1 7:27:6 6 10 5
3 5 2 7:11:2 3 4 2

Consider the first line. It means that the transaction {3, 5, 1, 2, 4, 6} has a total utility of 30 and that items 3, 5, 1, 2, 4 and 6 respectively have a utility of 1, 3, 5, 10, 6 and 5 in this transaction. The following lines follow the same format.

Output file format

The output file format of ECHUM is defined as follows. It is a text file, where each line represents a correlated high utility itemset. On each line, the items of the itemset are first listed. Each item is represented by an integer, followed by a single space. After, all the items, the keyword " #UTIL: " appears and is followed by the utility of the itemset. Then, there is a single space, followed by the keyword "#COR: ", followed by the bond of the itemset. For example, we show below the output file for this example.

2 4 #UTIL: 30 #COR: 0.6666666666666666
2 4 5 #UTIL: 36 #COR: 0.611111111111111
2 5 #UTIL: 31 #COR: 0.8749999999999999
2 5 3 #UTIL: 37 #COR: 0.7833333333333332

For example, the first line indicates that the itemset {2, 4} has a utility of 30 and a correlation of 0.66 according to the Kulc measure. The following lines follows the same format.

Performance

This is the original implementation of ECHUM

Note that the input format is not exactly the same as described in the original article. But it is equivalent.

Note that there are other algorithms in SPMF that uses different correlation measures such as FCHM_bond and FCHM_allconfidence, which use the all_confidence and bond measure, respectively.

Where can I get more information about the ECHUM algorithm?

This is the reference of the article describing the first version of ECHUM algorithm:

Ramesh, D., Sethi, K.K., Rathore, A. (2021). Positive Correlation Based Efficient High Utility Pattern Mining Approach. In: ICInPro 2021.

Besides, for a general overview of high utility itemset mining, you may read this survey paper.

You can also view a video presentation of the FCHM algorithm