# ClosedPattern

Loudni's Home page

## Developed for

A Global Constraint for Closed Frequent Pattern Mining by N. Lazaar, Y. Lebbah, S. Loudni, M. Maamar, V. LemiÃ¨re, C. Bessiere and P. Boizumault in Rueher M. (eds) Principles and Practice of Constraint Programming. CP 2016. Lecture Notes in Computer Science, vol 9892. Springer, Cham. Paper

## How to use

```
pattern_closed --dataset dataset [--fmin i | --freqmin f] [--show] [--output filename] [--lmin i] [--lmax i] [--variableordering lexico|incsup|decsup]
```

- --dataset
- A file in transactional format.
- --fmin or --freqmin
- (Optional) Minimum support, in number of transactions (--fmin) or in percet (--freqmin).
- --show
- (Optional) Display solutions in the output.
- --output
- (Optional) Output the solutions into a file.
- --lmin
- (Optional) The minimum length a pattern must be.
- --lmax
- (Optional) The maximum length a pattern must be.
- --variableordering
- (Optional) The order in which the variable will be selected (computed at startup).

If you get an `Illegal instruction`

error, it means your CPU doesn't support the AVX-2 instruction set required. You'll need to use `pattern_closed-noavx`

, which may be slower.

### Examples

`pattern_closed --dataset mushroom.dat --fmin 200`

- This will compute all the closed patterns in mushroom.dat with a support of at least 200.
`pattern_closed --dataset mushroom.dat --freqmin 0.75 --show`

- This will compute all the closed patterns in mushroom.dat with a support of at least 75% of the transactions and show the solution in the output.
`pattern_closed --dataset mushroom.dat --lmin 10 --output solutions.txt`

- This will compute all the closed patterns in mushroom.dat, which are at least of size 10 and output the solution in the file solutions.txt.

### ClosedPattern-WC

The weak consistency version which doesn't use the third rule (about the inclusion) is also included in the archive. It is used the same way as the full consistency version.

`pattern_closed_wc --dataset mushroom.dat --fmin 200`

- This will compute all the closed patterns in mushroom.dat with a support of at least 200, using the weak consistency version.

## Download link (Linux)

closedpattern.tar.gz - SHA256 checksum 4a75fc48ba60cd7af5775d71f8caa5eb55d0e05261c4ad1ed2696fe862c088ec

This software includes a copy of the or-tools solver library, available on GitHub, which is licensed under the Apache License 2.0