Skip to content

mpnguyen2/motion_code

Repository files navigation

Motion Code Learning for noisy time series

In this work, we employ variational inference and stochastic process modeling to develop an integrated framework called Motion Code. The framework can perform time series forecasting simultaneously with classification across different collections of time series data, while most other current methods only focus on one task at a time. Our Motion Code model is particularly robust to noise and produces competitive performance against other popular time series classification and forecasting algorithms. Motion Code can also deal with variable-length time series and missing data.

Motion Code provides an interpretable feature that effectively captures the core information of the governing dynamics from a collection of noisy time series. See below for the features captured in MoteStrain data:

Humidity sensor MoteStrain Temperature sensor MoteStrain
Weekend Chinatown Weekday Chinatown



Motion Code's forecasting prediction with uncertainty on PowerCons data:

Warm season in PowerCons Cold season in PowerCons



To build a Motion Code model, add the following code:

from motion_code import MotionCode
model = MotionCode(m=10, Q=1, latent_dim=2, sigma_y=0.1)

For training the Motion Code, we simply use:

model.fit(X_train, Y_train, labels_train, model_path)

Motion Code performs both classification and forecasting. For the classification task, use:

model.classify_predict(X_test, Y_test)

For the forecasting task, use:

mean, covar = model.forecast_predict(test_time_horizon, label=0)

See example.ipynb for more details.

Due to limited Github storage, all noisy data are stored at Noisy Datasets. Please download the data at the given link to run Motion Code notebooks and code.

Note: We are submitting our work to a conference. If you want to cite this work, please contact me directly.

About

Time series analysis on multiple collections of data using extracted signatures, called motion codes, from the most informative timestamps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published