Metadata-Version: 2.1
Name: grailts
Version: 0.0.1
Summary: Python implementation of GRAIL
Home-page: https://github.com/karhankaan/GRAIL
Author: Karhan Kaan Kayan
Author-email: kayankarhankaan@gmail.com
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/karhankaan/GRAIL/issues
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE

# GRAIL

A Python implementation of [GRAIL](http://people.cs.uchicago.edu/~jopa/Papers/PaparrizosVLDB2019.pdf), a generic framework to learn compact time series representations. 

## Installation
Installation using pip:
`pip install -m grailts`

## Usage
```
from GRAIL.Representation import GRAIL
from GRAIL.TimeSeries import TimeSeries
from GRAIL.kNN import kNN


TRAIN, train_labels = TimeSeries.load("ECG200_TRAIN", "UCR")
TEST, test_labels = TimeSeries.load("ECG200_TEST", "UCR")

representation = GRAIL(kernel="SINK", d = 100, gamma = 5)
repTRAIN, repTEST = representation.get_rep_train_test(TRAIN, TEST, exact=True)
neighbors, _, _ = kNN(repTRAIN, repTRAIN, method="ED", k=5, representation=None,
                              pq_method='opq')

print(neighbors)
```

