A small package for time series classification
Project description
RandomShapeletClassifier
What? Classifying timeseries or any other ordered data using shapelets A shapelet is a subsequence of a series (i.e. a sample from the complete series)
How? The trick is to identify shapelets that are representative of a class of timeseries. In the old days, people used to
- calculate each possible shapelet of a timeseries
- check for each shapelet if it is representative of the timeseries (by checking how often a somewhat similar pattern occurs in the same series)
- check if the most representative shapelets of a series can also be found in other timeseries.
- If so: these series probably belong to the same class (the degree depends on how often a similar shapelet can be found in a different timeseries or how similar on average a set of shapelets is to shapelets found in other series)
This is computationally expensive and takes ages. LAME!
In the "randomized" approach, we
- sample n shapelets of varying length from random timeseries (ideally n is >> number of series)
- we calculate the highest correlation of each shapelet with each timeseries S (we compare each shapelet with each subsample of the same length from all S)
- the highest correlation between a shapelet and a timeseries becomes a "feature". So for each series S we eventually have n features. Each feature descibes the correlation between S and each of the n shapelets.
- We can now use these features for a standard classification model
ATTENTION!
Normally the data you put into a classifier would be of shape(N observations x F features) Your labels would be of shape (N x 1)
In this case we classify timeseries (so usually the column-entries). So your original data is most likely of shape(N observations x S series). The idea is to classify the series and not the single observations. So your labels need to be provided in the shape(Sx1).
So what the code does is to first transform the data from (NxS) to (Sxn). The classification output will be of shape(Sx1) N = length of the timeseries S = number of timeseries in the dataset n = number of shapelets
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file RandomShapelets-0.0.9.tar.gz.
File metadata
- Download URL: RandomShapelets-0.0.9.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c513bcfcc4225cf2a1e2105e1e073e2c1070b57b1d0caf54d6d2647c5062cd5
|
|
| MD5 |
494799121cfb20ed288a54acc78007d8
|
|
| BLAKE2b-256 |
c299c819fb3bcb351d85a59b108d595dd3d167b40a1a069dfd95dfb5607da8ba
|
File details
Details for the file RandomShapelets-0.0.9-py3-none-any.whl.
File metadata
- Download URL: RandomShapelets-0.0.9-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9047b5e7ccab3b949805935865dce1075eae272b382aaed46e780e2aa647992e
|
|
| MD5 |
0fead82d12bbb21e613bb31d61949175
|
|
| BLAKE2b-256 |
dae2fc8b942ae6475e5467b2606e749657f24712f11212fc7cb754bbcdb40d8c
|