Time Series Generator
Project description
Time Series Generator
Description
Emulates Teras Tensorflow TimeSeriesGenerator functionality
Instalation
pip install time-series-generator
Usage
import numpy as np
from time_series_generator import TimeseriesGenerator
data = np.array([[i] for i in range(50)])
targets = np.array([[i] for i in range(50)])
data_gen = TimeSeriesGenerator(data, targets,
length=10, sampling_rate=2,
batch_size=2)
assert len(data_gen) == 20
batch_0 = data_gen[0]
x, y = batch_0
assert np.array_equal(x,
np.array([[[0], [2], [4], [6], [8]],
[[1], [3], [5], [7], [9]]]))
assert np.array_equal(y,
np.array([[10], [11]]))
Test
Run in the terminal at project root folder:
pytest
Development opportunities
A limitation of the TimeseriesGenerator is that it does not directly support multi-step outputs. Specifically, it will not create the multiple steps that may be required in the target sequence.
Nevertheless, if you prepare your target sequence to have multiple steps, it will honor and use them as the output portion of each sample. This means the onus is on you to prepare the expected output for each time step.
Brownlee, Jason
- The above process might be automatable.
References
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
Close
Hashes for time_series_generator-0.0.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3906820aa1df16578d469fef7b3d79402615259d0cd20e0f418b18eaf347173 |
|
MD5 | 66d4ca87905f68a68f2fc02e9b95ac28 |
|
BLAKE2b-256 | 4527f7906c8e08a34ac8851cd037a2bd81c69e4417376d158a401338d0c5c8de |
Close
Hashes for time_series_generator-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33a3d1621ff252315fc0754c58a216689f2dc773fffb82f77a20a245051a5ecb |
|
MD5 | 0fec697c9ac49787f3db7b23b3d65389 |
|
BLAKE2b-256 | 8c2dba9c8120a5256988812043121d6d068390f7482eb5f35ffacee433853400 |