Jump In pymc

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

In [1]:
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)
WARNING (aesara.configdefaults): g++ not available, if using conda: `conda install m2w64-toolchain`
WARNING (aesara.configdefaults): g++ not detected!  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.
Could not locate executable g77
Could not locate executable f77
Could not locate executable ifort
Could not locate executable ifl
Could not locate executable f90
Could not locate executable DF
Could not locate executable efl
Could not locate executable gfortran
Could not locate executable f95
Could not locate executable g95
Could not locate executable efort
Could not locate executable efc
Could not locate executable flang
don't know how to compile Fortran code on platform 'nt'
WARNING (aesara.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
       x    y  marks
0     27    7      6
1    197    5      4
2     74   15      4
3    214   18      6
4    121   22      3
..   ...  ...    ...
226   28  160      3
227  120  167      3
228   22  178      7
229  134  171      5
230  230  172      4

[231 rows x 3 columns]

C:\книгипитон\Bayes' Theorem Examples A Visual Introduction For Beginners - Dan Morris & Mark Koning.pdf

links

social