Skip to main content

Time series models

PyPI version travis codecov GitHub license Requirements Status

Description

Time series neural network models for Time series predictor

Installation

pip install time-series-models

Usage example

from time_series_models import BenchmarkLSTM
from skorch.callbacks import EarlyStopping
from skorch.dataset import CVSplit
from torch.optim import Adam
from flights_time_series_dataset import FlightSeriesDataset
from time_series_predictor import TimeSeriesPredictor

tsp = TimeSeriesPredictor(
    BenchmarkLSTM(),
    lr = 1e-3,
    lambda1=1e-8,
    optimizer__weight_decay=1e-8,
    iterator_train__shuffle=True,
    early_stopping=EarlyStopping(patience=50),
    max_epochs=250,
    train_split=CVSplit(10),
    optimizer=Adam
)

past_pattern_length = 24
future_pattern_length = 12
pattern_length = past_pattern_length + future_pattern_length
fsd = FlightSeriesDataset(pattern_length, past_pattern_length, pattern_length, stride=1)
tsp.fit(fsd)
mean_r2_score = tsp.score(tsp.dataset)
print(f"Achieved R2 score: {mean_r2_score}")
assert mean_r2_score > -20

Oze dataset history

Metadata

Release files for time-series-models 0.3.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for time-series-models 0.3.9
File Size Uploaded
time-series-models-0.3.9.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for time-series-models 0.3.9
File Interpreter ABI Platform
time_series_models-0.3.9-py3-none-any.whl Python 3 none any Details

Total release size: 11.2 kB

Release files / time-series-models-0.3.9.tar.gz

Download URL time-series-models-0.3.9.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6eff8b88685f12c19e07c198573ef7e50a70e880fbc3109478d9104e0a0d576e
BLAKE2b-256 checksum
How to use checksums
c486f58cf7567f92254cf7f3a375eee75e34146b091366b436d9b206ad4de464
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2

Release files / time_series_models-0.3.9-py3-none-any.whl

Download URL time_series_models-0.3.9-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7642eaf800e44b9aa0587b7a48b418fe29622e9047e5ae7be6f632bc9fa5464e
BLAKE2b-256 checksum
How to use checksums
93ff09b5d663399a4551bc4c51585c7c78174d284fbd819e1be2cee7bac2d723
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2

Release history Release notifications | RSS feed

This release

0.3.9 This release

2 release files

0.3.7

1 release file

0.3.6

1 release file

0.3.5

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page