Giter Club home page Giter Club logo

eclat's Introduction

eclat

Python implementation of ECLAT algorithm for association rule mining.

This implementation mines rules equation, such that equation is an element in a transaction and equation is an element in hierarchy that a belongs to. This kind of rule is mined on the condition that there are transactions equation , where equation is an itemset belonging to an element in hierarchy equation.

Setup

$ conda env create -f environment.yml
$ conda activate eclat

Execution

Execute with default parameters:

$ python main.py

Parameters

Predefined Datasets

To execute for a predefined dataset:

$ python main.py --dataset=<dataset_id>

Possible dataset_id values:

Custom Dataset

To execute for a custom dataset:

$ python main.py --data=<path/to/transactions.txt> --taxonomy=<path/to/taxonomy.txt>

File with taxonomy is optional. Rules based on hierarchy of items are not mined if taxonomy is not provided.

Example of transactions.txt file format:

1 2 3
1 2
1 3

Example of taxonomy.txt file format:

1,11
2,11
3,22
11,111
22,111

ECLAT parameters

An example of execution with ECLAT parametrization:

$ python main.py --min_sup=5 --min_conf=0.8 --min_len=3 --max_len=10

The options are:

  • min_sup - minimum support of the base of mined rules (type=int, default=1),
  • min_conf - minimum confidence of mined rules (type=float, default=0.5),
  • min_len - minimum length of mined rules (type=int, default=1),
  • max_len - maximum length of mined rules (type=int, default=None - not limited by default).

Unit Tests

To execute unit tests run the following command in the main directory:

$ python -m unittest test.test_eclat

Experiments

To run efficiency experiments:

$ python -m test.test_efficiency

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.