tslearn-team / tslearn-team/tslearn
Index of changes in PAA and SAX
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.2k
- Forks
- 384
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 11
Description
Is your feature request related to a problem? Please describe.
I'm running the tutorial of PAA and SAX in the doc
import numpy
import matplotlib.pyplot as plt
from tslearn.generators import random_walks
from tslearn.preprocessing import TimeSeriesScalerMeanVariance
from tslearn.piecewise import PiecewiseAggregateApproximation
from tslearn.piecewise import SymbolicAggregateApproximation, \
OneD_SymbolicAggregateApproximation
numpy.random.seed(0)
# Generate a random walk time series
n_ts, sz, d = 1, 100, 1
dataset = random_walks(n_ts=n_ts, sz=sz, d=d)
scaler = TimeSeriesScalerMeanVariance(mu=0., std=1.) # Rescale time series
dataset = scaler.fit_transform(dataset)
n_paa_segments = 10
paa = PiecewiseAggregateApproximation(n_segments=n_paa_segments)
paa_data = paa.fit_transform(dataset)
paa_dataset_inv = paa.inverse_transform(paa_data)
After reading the docs, it seems that there is no function to find the index when the paa_data changes occured.
Describe the solution you'd like
paa.get_index(paa_data) should return the index where the paa_data changes occured. That will be nice.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked PAA and SAX tutorial and the PiecewiseAggregateApproximation API and implementation. Determine how the requested index should be represented for paa_data changes, then add get_index behavior and tests showing the expected indices for the tutorial data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100