Questions tagged [pystan]

The Python Interface to Stan

PyStan provides an interface to Stan, a package for Bayesian inference using the No-U-Turn sampler, a variant of Hamiltonian Monte Carlo.

Resources:

86 questions
1
vote
0 answers

Pystan 2.19.1.1- C++/MSVC compiler issues- cl.exe failed with exit status 2

Happy Halloween Weekend! Sorry that I have to reach out to ask for your expertise and your guidance regarding this issue I am facing with installing pystan and the C++ configuration. I have followed every single step in this…
1
vote
1 answer

Extract and plot pystan3 prediction

I have been tasked to convert an R-stan script into python pystan3 for a research project. The collegue who wrote the R code left time ago and won't help much so I was left on my own devices. Here is the stan-model code, my python implementation of…
DG_
  • 11
  • 2
1
vote
0 answers

How to fix the distutils.errors.LinkError when configuring PyStan on Windows

I am configuring PyStan on Windows and getting an error in the execution of the pystan.StanModel step. Configure exactly according to the official documentation: https://pystan2.readthedocs.io/en/latest/windows.html#installing-c-compiler. …
kongzue
  • 11
  • 2
1
vote
1 answer

Stan variable declarations: difference in use between var_type var_name[length] and vector[length] var_name

I am new at Stan and I'm struggling to understand the difference in how different variable declaration styles are used. In particular, I am confused about when I should put square brackets after the variable type and when I should put them after the…
gimi
  • 395
  • 3
  • 13
1
vote
1 answer

STAN, PyStan RuntimeError: Initialization failed

I try to use STAN for inference of an SIR-model expressed as a three-dimensional SDE: The code for the model compiles without problems. toy_model = """ functions{ vector mu(vector x, real alpha, real beta) { vector[3] m; m[1] =…
Vincent
  • 33
  • 4
1
vote
2 answers

ERROR: Failed building wheel for pystan in Anaconda distribution. How to fix this error?

When trying to install Darts library its dependencies Pystan and Prophet were throwing errors: ERROR: Failed building wheel for pystan Building wheel for prophet (setup.py) error Followed solution from here which redirected me to the pystan docs,…
1
vote
0 answers

How to fix "WARNING: pystan : MSVC compiler is not supported" while installing fbprophet on Windows?

While trying to install kats on Windows, it is requiring that fbprophet is installed. This is resulting in the following error: Building wheels for collected packages: fbprophet Building wheel for fbprophet (setup.py) error ERROR: Command…
sai p
  • 11
  • 3
1
vote
0 answers

Does pystan/stan still have a module for misc? Function for stan_rdump?

When I import pystan I get this error: ModuleNotFoundError: No module named 'pystan'. From another forum thread, I now import stan (instead of pystan). However, the problem happens when I use stan.misc.stan_rdump. The error is: AttributeError:…
maia
  • 11
  • 1
1
vote
1 answer

EMR stuck at bootstrap script

Am trying to run a bootstrap file at EMR to installed facebook prophet which seems to have an issue requiring to install dev-tools, the bootstrap.sh simply runs bootstrap.sh #!/bin/bash -xe sudo yum install python3-devel python3-libs…
Exorcismus
  • 2,243
  • 1
  • 35
  • 68
1
vote
1 answer

STAN on Databricks - AttributeError: 'ConsoleBuffer' object has no attribute 'closed'

Running STAN (pystan) on Databricks 8.2 ML throws the following Error To reproduce, just run the simple example from https://pystan.readthedocs.io/en/latest/ Seems like the ConsoleBuffer Class doesn't have an implementation for closed? Have others…
1
vote
0 answers

Python Too many open files - fbprohet

I'm working on a project where I calculate multiple models with fbprophet. Fbprohet has the problem, that there is no default way to surpress the messages of pystan. So there is a workaround mentioned on github to use this as decorator: class…
1
vote
0 answers

Livy session gets corrupted

we are using a Apache Livy server to communicate with a spark cluster. We have noticed that some statements when executed error out and afterwards livy session becomes unusable. For example we are using fbprophet for timeseries models. fbprophet and…
user3104078
  • 107
  • 1
  • 7
1
vote
0 answers

save_warmup in Pystan

I've been using Stan for a bit through Pystan and is really nice. Just recently however I tried to reduce the size of the output (particularly, the generated_quantities bit) using the same syntax than in STAN, by declaring save_warmup=False.…
1
vote
1 answer

trouble installing pystan and fbprophet

In my ubuntu, not performing well when I am going to install pystan and fbprophet, using pip3 command. So, my system hangs badly. I am tried so many logics still got errors, kindly please guide me how i can rectify this issues ?
Ravindra
  • 11
  • 2
1
vote
0 answers

pickle files dumped from fbprophet trained models in linux environment are larger than windows

I am using python 3.6 in both windows & Linux environments. I could not run the prophet model on Linux with pystan 2.18.1.0 on Linux but I can only run it on windows with that version. I am saving the trained model to Pickle files. Can anyone help…
zimboy
  • 11
  • 2