Skip to main content

Python implementation of GRAIL

Project description

GRAIL

A Python implementation of GRAIL, 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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grailts-0.0.1.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

grailts-0.0.1-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

Details for the file grailts-0.0.1.tar.gz.

File metadata

  • Download URL: grailts-0.0.1.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for grailts-0.0.1.tar.gz
Algorithm Hash digest
SHA256 dc5abd174f2fef8f34dbda32646d021f2e7b979ed7dd983dbe00f28d00022a95
MD5 18b15a357f041a0dee05a4332a3e81de
BLAKE2b-256 212f1fd78e37e8283616b781c098dadd3a2384e3906796963ad199650565d783

See more details on using hashes here.

File details

Details for the file grailts-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: grailts-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 21.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for grailts-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a4149b2fd69dbff3798d826fe1f1f8f39565acee0a7d0cc19e9f18dbffd89fc2
MD5 f3eb36e522d0e532d88fc9a543a8a49e
BLAKE2b-256 5396211e10bd7cba006b811e97b687192efab6d2470dfcff71c4dba6556cd916

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page