gituser/production/: cmdstanpy-0.9.68 metadata and description

Homepage Simple index

Python interface to CmdStan

author Stan Dev Team
classifiers
  • Programming Language :: Python :: 3
  • License :: OSI Approved :: BSD License
  • Operating System :: OS Independent
  • Development Status :: 4 - Beta
  • Intended Audience :: Science/Research
  • Natural Language :: English
  • Programming Language :: Python
  • Topic :: Scientific/Engineering :: Information Analysis
description_content_type text/markdown
provides_extras tests
requires_dist
  • pandas
  • numpy (>=1.15)
  • ujson
  • tqdm ; extra == 'all'
  • sphinx ; extra == 'docs'
  • sphinx-gallery ; extra == 'docs'
  • sphinx-rtd-theme ; extra == 'docs'
  • numpydoc ; extra == 'docs'
  • matplotlib ; extra == 'docs'
  • flake8 ; extra == 'tests'
  • pylint ; extra == 'tests'
  • pytest ; extra == 'tests'
  • pytest-cov ; extra == 'tests'
  • testfixtures ; extra == 'tests'
  • tqdm ; extra == 'tests'
File Tox results History
cmdstanpy-0.9.68-py3-none-any.whl
Size
48 KB
Type
Python Wheel
Python
3

CmdStanPy

codecov

CmdStanPy is a lightweight pure-Python interface to CmdStan which provides access to the Stan compiler and all inference algorithms. It supports both development and production workflows. Because model development and testing may require many iterations, the defaults favor development mode and therefore output files are stored on a temporary filesystem. Non-default options allow all aspects of a run to be specified so that scripts can be used to distributed analysis jobs across nodes and machines.

CmdStanPy is distributed via PyPi: https://pypi.org/project/cmdstanpy/

Goals

Source Repository

CmdStanPy and CmdStan are available from GitHub: https://github.com/stan-dev/cmdstanpy and https://github.com/stan-dev/cmdstan

Docs

The latest release documentation is hosted on https://mc-stan.org/cmdstanpy, older release versions are available from readthedocs: https://cmdstanpy.readthedocs.io

Licensing

The CmdStanPy, CmdStan, and the core Stan C++ code are licensed under new BSD.

Example

::

import os
from cmdstanpy import cmdstan_path, CmdStanModel

# specify locations of Stan program file and data
bernoulli_stan = os.path.join(cmdstan_path(), 'examples', 'bernoulli', 'bernoulli.stan')
bernoulli_data = os.path.join(cmdstan_path(), 'examples', 'bernoulli', 'bernoulli.data.json')

# instantiate a model; compiles the Stan program by default
bernoulli_model = CmdStanModel(stan_file=bernoulli_stan)

# obtain a posterior sample from the model conditioned on the data
bernoulli_fit = bernoulli_model.sample(chains=4, data=bernoulli_data)

# summarize the results (wraps CmdStan `bin/stansummary`):
bernoulli_fit.summary()