TimeDiffusion - Unified Framework for Multiple Time Series Tasks
Project description
TimeDiffusion - Unified Framework for Multiple Time Series Tasks
Supports 2D (image) and 3D (video) data as input for research purposes.
Install
pip install timediffusion
Quick Start
Forecasting time series
# train sequence in shape [channels, sequence_length]
model = TD(input_dims=train.shape).to(device=device)
training_losses = model.fit(train)
# horizon : int - how many future values to forecast
predictions = model.forecast(horizon)
Creating synthetic time series
# sequence in shape [channels, sequence_length]
model = TD(input_dims=seq.shape).to(device=device)
training_losses = model.fit(seq)
# proximity - how close to original, samples - total synthetic time series
synthetic_data = model.synth(proximity=0.9, samples=3, batch_size=2, step_granulation=10)
Time series Imputation
# sequence in shape [channels, sequence_length]
model = TD(input_dims=seq.shape).to(device=device)
# mask - binary array of same shape, as sequence, with 1 in positions, that are unknown
training_losses = model.fit(seq, mask=mask)
restored_seq = model.restore(example=seq, mask=mask)
Examples
Philosophy
Main synopsis behind TimeDiffusion model is that in reality, when working with time series we don’t have many samples, as it could be in other machine learning fields (e.g. cv, nlp). Thus, classical autoregressive approaches like ARIMA has the most suitable approach of fitting / training only on original sequence (maybe with some exogenous data).
TimeDiffusion takes inspiration from these established methods and only trains on the input sample. Model incorporates most powerful modern deep learning techniques such as diffusion process, exponential dilated convolutions, residual connections and attention mechanism
Model architecture
Presented below are diagrams depicting model components, each new scheme representing a higher level of abstraction.
- Temporal Block
- TimeDiffusionProjector
- TimeDiffusion
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
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 timediffusion-0.2.2.tar.gz.
File metadata
- Download URL: timediffusion-0.2.2.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5429e334c0ed9fe660661e98068fb3f2102f597d09af72db10f17b3a531ea37d
|
|
| MD5 |
d8b9ea412afefcbdd75ae94895845b22
|
|
| BLAKE2b-256 |
ec1d1345a8d7f8135cf4b36698d9bb2fb514b7a0b609a670c11e02d2a63008ad
|
File details
Details for the file timediffusion-0.2.2-py3-none-any.whl.
File metadata
- Download URL: timediffusion-0.2.2-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d053a7dfa1292f0aa8951a776afe003d3f341d34544eb28fe8c351c4a316658
|
|
| MD5 |
c72f9228e99014d46716b1669734fa5d
|
|
| BLAKE2b-256 |
732f0ffc18fa734eeb43bd22bff173cd0c0d67b0d2e6440c1ec3de5565ff583c
|