ceem

Certainty-Equivalent Expectation Maximization: a scalable algorithm for system identification of partially observed systems

https://github.com/sisl/ceem

Science Score: 20.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org, zenodo.org
  • Committers with academic emails
    1 of 3 committers (33.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.0%) to scientific vocabulary

Keywords

machine-learning partially-observable-environment robotics system-identification
Last synced: 6 months ago · JSON representation

Repository

Certainty-Equivalent Expectation Maximization: a scalable algorithm for system identification of partially observed systems

Basic Info
Statistics
  • Stars: 8
  • Watchers: 16
  • Forks: 1
  • Open Issues: 2
  • Releases: 0
Topics
machine-learning partially-observable-environment robotics system-identification
Created almost 6 years ago · Last pushed over 2 years ago
Metadata Files
Readme License

README.md

CE-EM

Official implementation of the the algorithm CE-EM and baseline Particle EM from "Scalable Identification of Partially Observed Systems with Certainty-Equivalent EM".

Website

Usage

Ensure you are using at least Python 3.6

pip install CEEM

Run python -m pytest to ensure everything works.

A Jupyter notebook demonstrating usage can be found in the examples subfolder.

Code overview

  • ceem/dynamics.py defines the system API used by the CEEM algorithm.
  • ceem/systems/*.py define various systems used in the experiments
  • ceem/ceem.py contains the CEEM algorithm.
  • ceem/smoother.py defines different smoothing routines used by the CEEM algorithm in the smoothing step.
  • ceem/learner.py defines different learning routines used by the CEEM algorithm in the learning step.
  • ceem/opt_criteria.py defines different optimization criteria used by the CEEM algorithm.
  • ceem/particleem.py implements Particle EM

Experiments

Lorenz

Unbiased Estimation in Deterministic Settings

To regenerate the data in data/lorenz/bias_experiment run: python experiments/lorenz/bias_experiment.py To generate Table 1 run: python experiments/lorenz/plotting/process_bias.py

Comparison to Particle Based Methods

To regenerate the data in data/lorenz/comp run: python experiments/lorenz/comp_pem.py python experiments/lorenz/comp_ceem.py To generate Figure 2 run: python experiments/lorenz/plotting/process_comp.py

Convergence of CE-EM on High Dimensional Problems

To regenerate data in data/lorenz/convergence_experiment run: python experiments/lorenz/convergence_experiment_pem.py python experiments/lorenz/convergence_experiment_ceem.py To generate Figure 3 run: python experiments/lorenz/plotting/process_convergence.py

Helicopter

The following are scripts for training models in Section 4.2. Pretrained models are provided in the pretrained_models folder.

Data download

The dataset used in our experiments can be downloaded by running: wget 'https://zenodo.org/record/3662987/files/datasets.zip?download=1' -O datasets.zip unzip datasets.zip

Baselines

Naive

Run the experiment with default parameters: python experiments/heli/baselines.py --model naive

H25

Run the experiment with default parameters: python experiments/heli/baselines.py --model H25 cp data/h25/best_net.th trained_models/h25.th

SID

Prepare the data first for residual training: cp data/naive/best_net.th trained_models/naive_baseline.th python experiments/heli/prepare_residual_dataset.py

Ensure you have MATLAB with the System Identification Toolbox installed then run from within MATLAB: run_n4sid.m

LSTM

python experiments/heli/train_lstm.py cp data/heli_lstm/ckpts/best_model.th trained_models/lstm.th

NL (Ours)

Prepare the data first for residual training: cp data/naive/best_net.th trained_models/naive_baseline.th python experiments/heli/prepare_residual_dataset.py

Run the experiment with default parameters: python experiments/heli/ceemnl.py

Move the best model to trainedmodels ``` cp data/NLobsLdyn/ckpts/bestmodel.th trainedmodels/NLmodel.th ```

Evaluating and plotting test trajectories

First evaluate the models (uses pretrained by default) by running:

python experiments/heli/evaluate_models.py

python experiments/heli/plotting/plotbar.py

Then plot the n th trajectory in the test set by running:

python experiments/heli/plotting/plot_trajectories.py --trajectory 9

To plot the circular acceleration prediction (instead of horizontal) on the n th trajectory in the test set:

python experiments/heli/plotting/plot_trajectories.py --trajectory 9 --moments

Owner

  • Name: Stanford Intelligent Systems Laboratory
  • Login: sisl
  • Kind: organization
  • Location: Stanford, CA

GitHub Events

Total
Last Year

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 24
  • Total Committers: 3
  • Avg Commits per committer: 8.0
  • Development Distribution Score (DDS): 0.542
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
kunalmenda k****a@g****m 11
rejuvyesh m****l@r****m 11
Kunal Menda k****a@s****u 2
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 0
  • Total pull requests: 4
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 day
  • Total issue authors: 0
  • Total pull request authors: 3
  • Average comments per issue: 0
  • Average comments per pull request: 2.5
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • kunalmenda (2)
  • rejuvyesh (1)
  • dependabot[bot] (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 91 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 3
  • Total maintainers: 1
pypi.org: ceem

Official implementation of CE-EM algorithm

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 91 Last month
Rankings
Dependent packages count: 10.0%
Stargazers count: 18.5%
Dependent repos count: 21.7%
Average: 22.0%
Forks count: 22.6%
Downloads: 37.3%
Maintainers (1)
Last synced: 6 months ago

Dependencies

requirements.txt pypi
  • matplotlib >=3.0.1
  • numpy >=1.14.5
  • python_dateutil ==2.8.0
  • scipy ==1.2.1
  • tensorboard *
  • termcolor ==1.1.0
  • torch >=1.2
  • typing ==3.6.4
setup.py pypi
  • click *
  • future *
  • joblib *
  • matplotlib *
  • numpy *
  • pandas *
  • pytest *
  • python_dateutil *
  • scipy *
  • tensorboard *
  • termcolor *
  • torch *
  • tqdm *