Skip to main content

Online latent state estimation with Apache Spark.

Project description


Build Status codecov Maven Central PyPI Documentation Status

Model-parallel online latent state estimation with Apache Spark.


This library provides supports for model-parallel latent state estimation with Apache Spark, with a focus on online learning compatible with structured streaming. Mainly developed for time series estimation of latent variables of many small scale systems, this library could fit to your use case if you're looking for:

  • Model-parallelism. Model-parallelism is the main mode of parallelism, such as training multiple similar time series models from online measurements/multiple sensors, or same models with different priors/hyperparameters etc,..
  • Online learning. Model parameters are updated sequentially with measurements with a single pass. The state used by the algorithms are bounded with #models and model parameters.
  • Latent state estimation. Focusing on methods for hidden state estimation, implemented methods include solutions for filtering (Kalman filters, EKF, UKF, Multiple-Model Adaptive filters, etc..) problems, smoothing (RTS) problems, finite mixture models (Multivariate Gaussian, Poisson, Bernoulli, etc,..).

Artan requires Scala 2.12, Spark 3.0+ and Python 3,6+


This project has been published to the Maven Central Repository. When submitting jobs on your cluster, you can use spark-submit with --packages parameter to download all required dependencies including python packages.

spark-submit --packages='com.github.ozancicek:artan_2.12:0.5.1'

For SBT:

libraryDependencies += "com.github.ozancicek" %% "artan" % "0.5.1"

For python:

pip install artan

Note that pip will only install the python dependencies. To submit pyspark jobs, --packages='com.github.ozancicek:artan_2.12:0.5.1' argument should be specified in order to download necessary jars.

Docs and Examples

Visit docs to get started and see examples for all sample scripts.

Structured streaming examples

  • Local linear trend filtering with Linear Kalman Filter (python, scala)
  • Recursive least squares (python, scala)
  • Nonlinear estimation with Extended Kalman Filter (scala)
  • Nonlinear estimation with Unscented Kalman Filter (scala)
  • Multiple-Model Adaptive estimation (scala)
  • Online Gaussian Mixture Model (python, scala)

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

artan-0.5.1.tar.gz (14.3 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