Skip to main content

An easy-to-use deep model for time series forecast

Project description

DeepForecast

An Easy-to-use Deep Model for Time Series Forecast

Methods

  • STTF
  • Seq2Seq

How to install

pip install deepforecast

How to use

Use STTF as an exapmle:

from tensorflow.keras.utils import plot_model
from deepforecast.features import SparseColumn, SequenceColumn
from deepforecast.models import STTF

attr_feats = ["age", "user", "platform"]
sequence_feats = ["history", "future"]

attr_columns = []
for feat in attr_feats:
    col = SparseColumn(name=feat, vocab_size=10, embed_dim=8)
    attr_columns.append(col)

sequence_columns = []
hist_col = SequenceColumn(name="history", num_seq=5, seq_steps=28, dim=1)
sequence_columns.append(hist_col)
fut_col = SequenceColumn(name="future", num_seq=4, seq_steps=7, dim=1)
sequence_columns.append(fut_col)

model = STTF(attr_columns, sequence_columns, attr_attention_embed_dim=12)
model.summary()
plot_model(model, show_shapes=True)
model.compile(optimizer="rmsprop",
              loss=["mse", "mse"],
              loss_weights=[0.2, 0.8],
              metrics=["mse"])

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

deepforecast-0.0.4.tar.gz (7.5 kB view hashes)

Uploaded Source

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