View Closed high utility Occupancy itemsets with the Visual Pattern Viewer (SPMF documentation)
Closed h igh utility occupancy itemsets are a type of patterns that can be produced by algorithms such as CloFHUOIM.
This page explains how to visualize the closed high utility occupancy itemsets found by an algorithm using the Visual Pattern Viewer.
How to run this example?
If you want to run this example using the graphical user interface of SPMF, follow these steps.
1) First, select a closed high utility occupancy itemset mining algorithm offered in SPMF. Then, in the user interface of SPMF, after selecting an algorithm and setting its input file path, output file path, and parameters, click on "Run algorithm".
2) When the algorithm terminates, click on the button "View output file using:", and select "Visualize_Closed_High_Utility_Occupancy_itemsets" so that the discovered patterns will be opened with the visual pattern viewer.
3) Then click on "Run algorithm" to run the algorithm.
After the algorithm terminates, the discovered patterns will be displayed using the Visual Pattern Viewer:
The Visual Pattern Viewer interface is quite intuitive. It displays each pattern with its value for each evaluation measure using a colored bar.
The Visual Pattern Viewer offers several features such as:
- Viewing patterns using different layouts (grid, horizontal and vertical layout).
- Sorting patterns by size and measure values.
- Searching and filtering using measure values
- Displaying statistics about the number of patterns found.
Other ways of running the Visual Pattern Viewer
It is also possible to run the Visual Pattern Viewer as an algorithm from the GUI of SPMF..
In this case, in the user interface of SPMF, select "Visualize_Closed_High_Utility_Occupancy_itemsets" as algorithm. Then, select a file containing closed high utility occupancy itemsets as input file. Then, click "run algorithm".
This will display the patterns from the file using the Visual Pattern Viewer.
Besides, it is also possible to call the Visual Pattern Viewer from the command line interface of SPMF. To open a file called patternsHUOccupancy.txt, this syntax can be used:
java -jar spmf.jar run Visualize_Closed_High_Utility_Occupancy_itemsets patternsClosedHUOccupancy.txt in a folder containing spmf.jar and the input file.
What is the input file format?
The algorithm takes as input a file containing closed high utility occupancy itemsets.
The file format is defined as follows. It is a text file, where each line represents a closed high utility-occupancy itemset. On each line, the items of the itemset are first listed in ascending order, each separated by a single space. After the items, the keyword " #SUP: " appears and is followed by the support of the itemset (a number of transactions). Then, the keyword " #UO: " appears and is followed by the mean utility occupancy of the itemset (a number between 0 and 1). For example, we show below the output file for this example.
@FILETYPE="Closed high utility-occupancy itemsets"
@SOURCE="SPMF SOFTWARE https://philippe-fournier-viger.com/spmf/"
5 #SUP: 4 #UO: 0.4022031933180282
3 5 #SUP: 3 #UO: 0.8775510204081632
1 2 4 #SUP: 3 #UO: 0.4959031067129181
1 4 #SUP: 5 #UO: 0.3609049017237591
1 3 4 #SUP: 4 #UO: 0.8971535982814178
2 4 #SUP: 4 #UO: 0.361989575813069
2 3 #SUP: 3 #UO: 0.6553884711779449
3 4 #SUP: 5 #UO: 0.6880905840686649
3 #SUP: 8 #UO: 0.646822165799868
For example, the sixth line indicates that the itemset {3, 5} appears in 3 transactions and has a mean utility occupancy of about 0.8776. The following lines follow the same format. Note that the itemsets are not written in any particular order of size or support, because they are output in the order in which the depth-first search discovers them.