Skip to content

Latest commit

 

History

History
44 lines (36 loc) · 2.57 KB

README.md

File metadata and controls

44 lines (36 loc) · 2.57 KB

Build Status

T-GRAANK

A python implementation of the Temporal-GRAdual rANKing algorithm. The algorithm extends the GRAANK algorithm to the case of temporal gradual tendencies. We have optimized the implementation of the algorithm by: (1) using Numpy functions for operations that are time consuming, (2) allowed parallel multi-processing and (3) allowed secondary storage of large data in order to free CPU memory during processing through HDF5 storage (enabled gzip compression) and h5py. The research paper is available via:

  • D. Owuor, A. Laurent and J. Orero, "Mining Fuzzy-Temporal Gradual Patterns," 2019 IEEE International Conference on Fuzzy Systems (FUZZ-IEEE), 2019, pp. 1-6, doi: 10.1109/FUZZ-IEEE.2019.8858883.

List of (important) Files:

  1. README.md (this file)
  2. init_tgraank.py
  3. DATASET.csv

Usage:

Use it a command line program with the local package:

$python src/init_tgraank.py -f data/DATASET.csv -c refColumn -s minSupport  -r minRepresentativity

The input parameters are: fileName.csv, refColumn, minSupport, minRepresentativity. You are required to use a file in csv format and make sure the timestamp column is the first column in the file. You specify:

  • reference item - column\attribute that is the base of the temporal transformations
  • minimum support - threshold count of frequent FtGPs
  • mimimum representativity item - threshold count of transformations to be performed on the data-set

Example with a data-set and specified values

$python src/init_tgraank.py -f data/DATASET.csv -c 0 -s 0.5 -r 0.5

Output:

Dataset Ok
{'Transformation': 'n+3', 'Representativity': 0.94, 'Included Rows': 47, 'Total Rows': 50}
1 : exercise_hours**
2 : stress_level
Pattern : Support
{'1+', '2+'} : 0.5060129509713228 | ~ +6.0 days : 1.0
-------------------------------------------------------------------------------------------
# can be interpreted as: the more exercise_hours, the more stress_level almost 6 days later

License:

  • MIT

Reference:

  • Anne Laurent, Marie-Jeanne Lesot, and Maria Rifqi. 2009. GRAANK: Exploiting Rank Correlations for Extracting Gradual Itemsets. In Proceedings of the 8th International Conference on Flexible Query Answering Systems (FQAS '09), Troels Andreasen, Ronald R. Yager, Henrik Bulskov, Henning Christiansen, and Henrik Legind Larsen (Eds.). Springer-Verlag, Berlin, Heidelberg, 382-393.