Multi Time Series Encoders
Project description
Multi Time Series Encoders
The objective of this python package is to make easy the encoding and the classification/regression of multivariate time series (mts) data even when these are asynchronous. We say that data are of type mts when each observation is associated with multiple time series (e.g. the vital signs of a patient at a specific period).
Installation
The current version has been developed in Python 3.7. It also works in Python 3.8. If you encounter an issue, please try to run it again in a virtual machine containing Python 3.7 or 3.8.
pip install mtse
Sample code
import mtse
### Load sample data ###
train, val, test, norm = mtse.get_sample(return_norm=True)
### Using the class `mtse` ###
mtan = mtse.mtse(device='cuda', seed=1, experiment_id='mtan')
mtan.load_data(train, val, test, norm=norm)
mtan.build_model('mtan', 'regression', learn_emb=True, early_stop=10, cuda_empty_cache=True)
mtan.train(lossf='mape', n_iters=200, save_startegy='best')
mtan.predict(checkpoint='best')
mtan.encode_ts(data_to_embed='test', embed_pandas=True)
More details and examples in the documentation
What can be implemented / improved
Encoders
- mTAN - Multi Time Attention Network - encoder
- mTAN - Multi Time Attention Network - encoder-decoder
- SeFT - Set Function for Time series
- STraTS - Self-supervised Transformer for Time-Series
- ODE-based encoders
Note that we only implemented the mTAN encoder as a baseline for now. At this stage, this model works only for supervised learning, meaning that it uses the target variable to compute the loss and update the encoder weights. Thus, the priority would be to implement an unsupervised encoder next (encoder-decoder models or self-supervised encoders).
Other features
- Cross-validation evaluation, prediction and encoding
- Support for other data inputs in the dataset classes (currently the
mtan_Dataset
class) - Support for time-series forecasting and inference tasks
References
Satya Narayan Shukla and Benjamin Marlin, "Multi-Time Attention Networks for Irregularly Sampled Time Series", International Conference on Learning Representations, 2021.
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
File details
Details for the file mtse-0.1.5.7.tar.gz
.
File metadata
- Download URL: mtse-0.1.5.7.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7124b035989b14f737b110027ef867d43c4e782ca945ed7cd8d2986a2f49124b |
|
MD5 | f3e087b30e44aceb68ca4d874012dac2 |
|
BLAKE2b-256 | 1b21976afc346316e456cd54cf0dbd0d8b2eeec680689eb01f1e32eb6c401c2d |
File details
Details for the file mtse-0.1.5.7-py3-none-any.whl
.
File metadata
- Download URL: mtse-0.1.5.7-py3-none-any.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c54d28e7663fb43bc997a14f005b1cf844b441b921a4c1e4340b342279079c6 |
|
MD5 | 2542ec7991542eabbcf5d0f6310a7447 |
|
BLAKE2b-256 | e3a0a8103569ee8468a170aafa2ae0abdaa245bf5f55f3a7e421190e30e7be33 |