Update authored by VERNEREY Charles's avatar VERNEREY Charles
......@@ -516,3 +516,77 @@ for (int i = 0; i < itemsets.size(); i++) {
```
Finally, we get all the diverse itemsets with their cover and we print them.
## Command-Line Interface (CLI)
You can also use this application in CLI. First, clone the project and then run in the root folder
```bash
mvn package
```
Then, you can run the application by typing
```bash
java -jar target/data-mining-1.0.2-SNAPSHOT-jar-with-dependencies.jar
```
Three subcommands are available:
**closedsky**
This subcommand can be used for both sky and closed patterns mining with ClosedSky. For skypattern mining:
```bash
closedsky -d <data path> --skym <measures> -s -p --json <name of result file>
```
The arguments are the following:
- **-d**: Specify the path of the transactional database
- **--skym**: Specify the list of skypattern measures
- **-s**: Print stats of the search (number of nodes/fails/backtracks, time to complete the search, etc...)
- **-p**: Print the skypatterns
- **--json**: Save result (skypatterns + stats) in a file with .json extension
The following measures are available:
- f: frequency
- a: area
- g: growth-rate
- l: length
- c: all-confidence
- z: negative frequency
- n{i}: mean value, replace i by an integer that represents the ith value file (ex: 0)
- m{i}: min value
- M{i}: max value
Another interesting arguments can be specified:
- **--wc**: Use weak consistency version of the constraint **AdequateClosure**. It was shown experimentally that the weak consistency version is more time efficient than the domain consistency one so it might be interesting to specify --wc each time you run this command.
- **--nc**: Recall that by default class items are ignored during the mining. If we want to override this behaviour, we can specify the argument --nc.
For closed pattern mining, the command line is similar:
```bash
closedsky -d <data path> --clom <measures> -s -p --jsonl <name of result file>
```
The only difference is that we specify the argument **--clom** with the closed measures:
- f: frequency
- 1: frequency1
- n{i}: mean value
- m{i}: min value
- M{i}: max value
- F: max frequency
Since many closed patterns might be generated, it is interesting to specify the argument --jsonl instead of --json. --jsonl will generate two files: one with the skypatterns, where each line of the file represents a skypattern, and another one with the search stats.
**cpsky**
For closed/sky pattern mining with CP+SKY. The arguments are similar to the ones of closedsky. CP+SKY is less efficient than Closedsky so it is not advised to use this subcommand.
**arm**
For association rule mining.
\ No newline at end of file