Install¶
To simply install pymc was not enough on my computer, neither on Google Colab it worked to simply use library after !pip install
. Apparently my laptop hadn't a working fortran of C compiler- the message that I got was:
Aesara will be unable to compile C-implementations and will default to Python. Performance may be severely degraded. To remove this warning, set Aesara flags cxx to an empty string.
To be able to run pymc on Windows I needed to use miniconda and then open up Anaconda Prompt and execute conda install -c conda-forge pymc
. Installation took me 20 minutes.
First example¶
First code snippet is pulled from official documentation to the version of pymc, data was included in installation of pymc module: https://www.pymc.io/projects/examples/en/latest/case_studies/log-gaussian-cox-process.html
import pymc as pm
import pandas as pd
from itertools import product
import arviz as az
data = pd.read_csv(pm.get_data("anemones.csv"))
n = data.shape[0]
print(data)
C:\книгипитон\Bayes' Theorem Examples A Visual Introduction For Beginners - Dan Morris & Mark Koning.pdf