Skip to main content

LQG: Inverse Optimal Control for Continuous Psychophysics

Experimenter-actor-loop image

Static Badge PyPI - Version Static Badge

This repository contains the official JAX implementation of the inverse optimal control method presented in the paper:

Straub, D., & Rothkopf, C. A. (2022). Putting perception into action with inverse optimal control for continuous psychophysics. eLife, 11, e76635.

Installation

The package can be installed via pip

python -m pip install lqg

Since publication of our eLife paper, I have substantially updated the package. If you want to use the package as described in the paper, please install an older version <0.2.0:

python -m pip install lqg==0.1.9

If you want the latest development version, I recommend cloning the repository and installing locally in a virtual environment:

git clone git@github.com:dominikstrb/lqg.git
cd lqg
python -m venv env
source env/bin/activate
python -m pip install -e .

Usage examples

The notebooks in the documentation illustrate how to use the lqg package to define optimal control models, simulate trajectories, and infer parameters from observed data.

  • Overview explains the model and its parameters in more detail, including the extension to subjective internal models (based on my tutorial at CCN 2022)
  • Data applies the method to data from a tracking experiment

Citation

If you use our method or code in your research, please cite our paper:

@article{straub2022putting,
  title={Putting perception into action with inverse optimal control for continuous psychophysics},
  author={Straub, Dominik and Rothkopf, Constantin A},
  journal={eLife},
  volume={11},
  pages={e76635},
  year={2022},
  publisher={eLife Sciences Publications Limited}
}

Extensions

Signal-dependent noise

This implementation supports the basic LQG framework. For the extension to signal-dependent noise (Todorov, 2005), please see our NeurIPS 2021 paper and its implementation.

Non-linear dynamics

We have recently extended this approach to non-linear dynamics and non-quadratic costs. Please check out our NeurIPS 2023 paper and its implementation.

Metadata

Release files for lqg 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lqg 0.3.2
File Size Uploaded Provenance Actions
lqg-0.3.2.tar.gz 21.6 kB Without provenance Details for lqg-0.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lqg 0.3.2
File Interpreter ABI Platform Actions
lqg-0.3.2-py3-none-any.whl Python 3 none any Details for lqg-0.3.2-py3-none-any.whl

Total release size: 48.0 kB

Release files / lqg-0.3.2.tar.gz

Download URL lqg-0.3.2.tar.gz
Size 21.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ac44d197a33713808c0731584fb1cab8839cf531ff1b233951584a128d7e4381
BLAKE2b-256 checksum
How to use checksums
9caebcb7b65edbc2c121fd528a365aa089a8833a95097138b950cbce8eba6b17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / lqg-0.3.2-py3-none-any.whl

Download URL lqg-0.3.2-py3-none-any.whl
Size 26.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a91312b83fcf5f7f392000b67b0bc80ef88feb6ec5ecf26b349b9d07b1ab6d79
BLAKE2b-256 checksum
How to use checksums
44f2ee0e7e0956948c009a8cc3ec7849924e5cd00e64ca1c0d410a57170d3292
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for lqg 0.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page