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
10
votes
3 answers

import pystan._api failed:ImportError: DLL load failed: The specified module could not be found

I have installed python 3.7 and want to do some forecasting using fbprophet (https://facebook.github.io/prophet/docs/installation.html#python) But I get this error when installing the package using the command (pip install fbprophet) import pystan …
VanodyaPerera
  • 137
  • 1
  • 1
  • 10
6
votes
3 answers

'StanModel' object has no attribute 'fit_class' while using Prophet

I am trying to use prophet. I have installed all required packages: pip install pandas numpy jupyterlab seaborn conda install pywin32 conda install -c anaconda pystan=2.19.1.1=py38hac22706_0 conda install -c conda-forge prophet conda install -c…
Dexter
  • 91
  • 1
  • 5
6
votes
0 answers

DLL Load failed when importing PyStan on Windows

I am trying to import PyStan in Windows 10, but I keep getting the following error: Traceback (most recent call last): import pystan File "C:\Users\User\AppData\Local\Continuum\Anaconda2\envs\test\lib\site-packages\pystan\__init__.py", line 9, in…
Tim
  • 187
  • 1
  • 3
  • 9
6
votes
2 answers

a nice pystan trace plot for a stan vector parameter

I am doing a multiple regression in Stan. I want a trace plot of the beta vector parameter for the regressors/design matrix. When I do the following: fit = model.sampling(data=data, iter=2000, chains=4) fig = fit.plot('beta') I get a pretty horrid…
Mark Graph
  • 4,969
  • 6
  • 25
  • 37
6
votes
1 answer

logger.warning("MSVC is not supported") Error when installing pystan on windows 10

My goal is to install fbprophet on my windows 10 computer. I'm trying to install pystan (prophet's main dependency) using pip, but after a minute or so, i get the following error: Traceback (most recent call last): File "", line 1, in…
johan855
  • 1,578
  • 4
  • 26
  • 51
5
votes
1 answer

How to silence fbprophet fit outputs/logs

I am using fbprophet version 0.7.1 with pystan 2.19.1.1 on a quarterly time-series data, working on Jupyter Notebook. Using extra regressors, here's my code. model = Prophet(daily_seasonality = False, weekly_seasonality = False) for…
meliksahturker
  • 922
  • 2
  • 11
  • 20
4
votes
2 answers

Why is pystan installation so slow?

I have a python project which relies on pystan (for fbprophet). As part of a CI/CD workflow I am trying to set up jenkins to build the images and push to a docker registry. However, the pip installation of pystan is super slow. Seems to be stuck at…
erncyp
  • 1,649
  • 21
  • 23
4
votes
0 answers

speed up model compilation in PyStan

I'm trying to integrate PyStan into my workflow, but just compiling a seemingly simple model can take 10+ minutes. This slow compilation time shouldn't be an issue once the model is finished. But for development, it would be nice to iterate through…
lhk
  • 27,458
  • 30
  • 122
  • 201
4
votes
2 answers

Pystan Posterior Uncertainty Intervals

I saw on another forum that PyStan doesn’t have the same function as RStan where they use posterior_interval(), but we can use numpy.percentile() instead. I’m currently using the pystan.StanModel.optimizing() function in PyStan to get the set of…
3
votes
1 answer

ModuleNotFoundError: No module named 'pystan'

Pystan has been installed successfully on EMR nodes (master, task and core nodes), but I still get this error ModuleNotFoundError: No module named pystan I installed pystan using pip install pystan through boostrap_scrtip_actions. Does anyone know…
Ima Vafaei
  • 927
  • 1
  • 14
  • 32
3
votes
0 answers

PyStan successfully installed via PIP, but I have bug with IMPORT

Getting ImportError: DLL load failed: The specified module could not be found. while trying to import pystan. After installing and uninstaling pystan from several resources, I can easily do pip install, but I can't import it in Jupyter…
3
votes
0 answers

How to solve or suppress wall of warnings using any pystan code

When I run any pystan code, the output is what I expect, but I get a wall of warnings. I've tried updating pystan and cython, as these are mentioned in the wall of warnings. My pystan is now version 2.17.1 and cython 0.29.2. I'm running…
Femkemilene
  • 183
  • 2
  • 15
3
votes
1 answer

Code works line-by-line in Spyder, but not when the whole script is run

I've installed pystan and am trying to verify that the installation has worked correctly. When I go to the IPython console in Spyder and run the following code line by line, it generates the correct answer. import pystan model_code = 'parameters…
3
votes
0 answers

CompileError : command 'C:\\MinGW\\bin\\gcc.exe' failed with exit status 1 while installing pystan

i'm trying to get pystan to work on Windows 10 in order to use the fbprophet package for time series. I have already installed MinGW, added its directories to my PATH environment variable and tried this piece of code to verify everything is working…
Miguel 2488
  • 1,410
  • 1
  • 20
  • 41
3
votes
2 answers

How to extract Posterior samples of Log Likelihood from PyStan?

I need posterior samples of log likelihood terms to run PSIS here such that log_lik : ndarray Array of size n x m containing n posterior samples of the log likelihood terms :math:`p(y_i|\theta^s)`. where small example here is such that pip…
hhh
  • 50,788
  • 62
  • 179
  • 282
1
2 3 4 5 6