Skip to main content

Mr. Estimator

Latest Version Documentation License Supported Python Versions

Welcome to the Toolbox for the Multistep Regression Estimator ("Mister Estimator").

If you find bugs, encounter unexpected behaviour or want to comment, please let us know via mail or open an issue on github. Any input is greatly appreciated.

If you use our toolbox for a scientific publication please cite it as Spitzner FP, Dehning J, Wilting J, Hagemann A, P. Neto J, Zierenberg J, et al. (2021) MR. Estimator, a toolbox to determine intrinsic timescales from subsampled spiking activity. PLoS ONE 16(4): e0249447. https://doi.org/10.1371/journal.pone.0249447

Dependencies

  • Python (>=3.5)
  • numpy (>=1.11.0)
  • scipy (>=1.0.0)
  • matplotlib (>=1.5.3)

Optional Dependencies

  • numba (>=0.44), for parallelization
  • tqdm, for progress bars

We recommend (and develop with) the latest stable versions of the dependencies, at the time of writing that is Python 3.7.0, numpy 1.15.1, scipy 1.1.0 and matplotlib 2.2.3.

What's new

18.10.2021 v0.1.8

  • is a quick bugfix. We had to disable numba parallelization for the time being.

07.05.2021 Now published in PLOS ONE.

08.07.2020 Our paper draft is now on arXiv

  • arXiv:2007.03367: "MR. Estimator, a toolbox to determine intrinsic timescales from subsampled spiking activity".
  • Additional scripts and downloadable data to recreate the figure on triallength are available on gin.

Installation

Assuming a working Python3 environment, usually you can install via pip (also installs the optional dependencies):

pip3 install 'mrestimator[full]'

To install (or update an existing installation) with optional dependencies:

pip3 install -U 'mrestimator[full]'

If you run into problems during installation, they are most likely due to numpy and scipy. You may check the official scipy.org documentation or try using anaconda as outlined below.

Install Using Anaconda

We sincerely recommend using conda, more so if you are unsure about the dependencies on your system or lack administrator priviliges. It is easy to install, allows you to manage different versions of Python and if something breaks, you can role back and reinstall easily - all without leaving your user directory.

Head over to anaconda.com, and download the installer for Python 3.7.

After following the installation instructions (default settings are fine for most users), start a new python session by typing python in a new terminal window. You will see something similar to the following:

Python 3.7.0 (default, Jun 28 2018, 07:39:16)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

End the session (exit() or Ctrl-D) and type conda list, which will output a list of the packages that came bundled with anaconda. All dependencies for Mr. Estimator are included.

Optionally, you can create a new environment (e.g. named 'myenv') for the toolbox conda create --name myenv and activate it with source activate myenv (activate myenv on windows). For more details on managing environments with conda, see here.

Now install using pip: pip install 'mrestimator[full]' and afterwards you should be able to import the module into any python3 session

python
>>> import mrestimator as mre
INFO     Loaded mrestimator v0.1.6, writing to /tmp/mre_paul/

Manual Installation

Clone the repository via ssh or https

git clone git@github.com:Priesemann-Group/mrestimator.git
git clone https://github.com/Priesemann-Group/mrestimator.git

And optionally,

export PYTHONPATH="${PYTHONPATH}:$(pwd)/mrestimator"

This line adds the downloaded directory to your PYTHONPATH environment variable, so that it will be found automatically when importing. If you want to add the path automatically when you login, you can add it to your ~/.bashrc or ~/.profile:

echo 'export PYTHONPATH="${PYTHONPATH}:'$(pwd)'/mrestimator"' >> ~/.bashrc

Pre-release versions

You can upgrade to pre-release versions using pip

pip install -U --pre 'mrestimator[full]'

To revert to the stable version, run

pip install mrestimator==0.1.6

or

pip install --force-reinstall mrestimator

for a complete (longer) reinstall of all dependencies.

Parallelization and running on clusters

Per default, the toolbox and its dependencies use all threads available on the host machine. While this is great if running locally, it is undesired for distributed computing as the workload manager expects jobs of serial queues to only use one thread. To disable multi-threading, you can set the following environment variables (e.g. at the beginning of a job file)

export OPENBLAS_NUM_THREADS=1
export MKL_NUM_THREADS=1
export NUMEXPR_NUM_THREADS=1
export OMP_NUM_THREADS=1
export NUMBA_NUM_THREADS=1

Metadata

Release files for mrestimator 0.2.0

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

Source distribution (sdist)

Source distribution for mrestimator 0.2.0
File Size Uploaded Provenance Actions
mrestimator-0.2.0.tar.gz 159.6 kB With provenance Details for mrestimator-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 204.4 kB

Release files / mrestimator-0.2.0.tar.gz

Download URL mrestimator-0.2.0.tar.gz
Size 159.6 kB
Tags Source
SHA-256 checksum
How to use checksums
131094c8dfaf803a66a815de63bfeb3d2654f03acfd2c409e600b29ba9dbce15
BLAKE2b-256 checksum
How to use checksums
b3319fb9523de1280ad25792eb5f1917335197ef0f2265344ddd45885687b50f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 26, 2025.

Transparency log

Release files / mrestimator-0.2.0-py3-none-any.whl

Download URL mrestimator-0.2.0-py3-none-any.whl
Size 44.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
63c5012ea2fec356558260d62d67f34015c487ce69a02c8a41f227b1b6adc95c
BLAKE2b-256 checksum
How to use checksums
b6c507880d452d12fc30e21cfc4e9e4b579214022038c9294589312643a736a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 26, 2025.

Transparency log

Security for mrestimator 0.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mrestimator-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 26, 2025.

Transparency log

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