Commit 74c736b4 authored by Peter  Büchel's avatar Peter Büchel
Browse files

packages

parent 70859b4b
Pipeline #438019 failed with stage
in 60 minutes and 1 second
%% Cell type:code id:aff9571b-3bd8-41ab-8569-9ecc44ad1471 tags:
``` python
import pymc3
```
%%%% Output: error
---------------------------------------------------------------------------
NoSectionError Traceback (most recent call last)
/opt/conda/lib/python3.9/site-packages/theano/configparser.py in fetch_val_for_key(self, key, delete_key)
237 try:
--> 238 return self._theano_cfg.get(section, option)
239 except InterpolationError:
/opt/conda/lib/python3.9/configparser.py in get(self, section, option, raw, vars, fallback)
780 try:
--> 781 d = self._unify_values(section, vars)
782 except NoSectionError:
/opt/conda/lib/python3.9/configparser.py in _unify_values(self, section, vars)
1151 if section != self.default_section:
-> 1152 raise NoSectionError(section) from None
1153 # Update with the entry specific variables
NoSectionError: No section: 'blas'
During handling of the above exception, another exception occurred:
KeyError Traceback (most recent call last)
/opt/conda/lib/python3.9/site-packages/theano/configparser.py in __get__(self, cls, type_, delete_key)
353 try:
--> 354 val_str = cls.fetch_val_for_key(self.name, delete_key=delete_key)
355 self.is_default = False
/opt/conda/lib/python3.9/site-packages/theano/configparser.py in fetch_val_for_key(self, key, delete_key)
241 except (NoOptionError, NoSectionError):
--> 242 raise KeyError(key)
243
KeyError: 'blas__ldflags'
During handling of the above exception, another exception occurred:
AttributeError Traceback (most recent call last)
/tmp/ipykernel_677/1179053686.py in <module>
----> 1 import pymc3
/opt/conda/lib/python3.9/site-packages/pymc3/__init__.py in <module>
21
22 import semver
---> 23 import theano
24
25 _log = logging.getLogger("pymc3")
/opt/conda/lib/python3.9/site-packages/theano/__init__.py in <module>
81 __api_version__ = 1
82
---> 83 from theano import scalar, tensor
84 from theano.compile import (
85 In,
/opt/conda/lib/python3.9/site-packages/theano/tensor/__init__.py in <module>
18 verify_grad,
19 )
---> 20 from theano.tensor import nnet # used for softmax, sigmoid, etc.
21 from theano.tensor import sharedvar # adds shared-variable constructors
22 from theano.tensor import (
/opt/conda/lib/python3.9/site-packages/theano/tensor/nnet/__init__.py in <module>
1 import warnings
2
----> 3 from . import opt
4 from .abstract_conv import conv2d as abstract_conv2d
5 from .abstract_conv import conv2d_grad_wrt_inputs, conv3d, separable_conv2d
/opt/conda/lib/python3.9/site-packages/theano/tensor/nnet/opt.py in <module>
30
31 # Cpu implementation
---> 32 from theano.tensor.nnet.conv import ConvOp, conv2d
33 from theano.tensor.nnet.corr import CorrMM, CorrMM_gradInputs, CorrMM_gradWeights
34 from theano.tensor.nnet.corr3d import Corr3dMM, Corr3dMMGradInputs, Corr3dMMGradWeights
/opt/conda/lib/python3.9/site-packages/theano/tensor/nnet/conv.py in <module>
18 from theano.graph.basic import Apply
19 from theano.graph.op import OpenMPOp
---> 20 from theano.tensor import blas
21 from theano.tensor.basic import (
22 NotScalarConstantError,
/opt/conda/lib/python3.9/site-packages/theano/tensor/blas.py in <module>
161 from theano.scalar import bool as bool_t
162 from theano.tensor import basic as tt
--> 163 from theano.tensor.blas_headers import blas_header_text, blas_header_version
164 from theano.tensor.opt import in2out, local_dimshuffle_lift
165 from theano.tensor.type import values_eq_approx_remove_inf_nan
/opt/conda/lib/python3.9/site-packages/theano/tensor/blas_headers.py in <module>
1014
1015
-> 1016 if not config.blas__ldflags:
1017 _logger.warning("Using NumPy C-API based implementation for BLAS functions.")
1018
/opt/conda/lib/python3.9/site-packages/theano/configparser.py in __get__(self, cls, type_, delete_key)
356 except KeyError:
357 if callable(self.default):
--> 358 val_str = self.default()
359 else:
360 val_str = self.default
/opt/conda/lib/python3.9/site-packages/theano/link/c/cmodule.py in default_blas_ldflags()
2619 # If the old private interface is available use it as it
2620 # don't print information to the user.
-> 2621 blas_info = numpy.distutils.__config__.blas_opt_info
2622 else:
2623 # We do this import only here, as in some setup, if we
AttributeError: module 'numpy.distutils.__config__' has no attribute 'blas_opt_info'
%% Cell type:markdown id: tags:
# Bestimmung 95%-HDI für die Betaverteilung
Die folgende Prozedur definiert, das HDI für die Beta-Verteilung:
%% Cell type:code id: tags:
``` python
from scipy.stats import beta
import numpy as np
def hdi(a,b, prob = 0.95):
k = 0
x = np.linspace(0,1,1000)
y = beta.pdf(x,a,b)
while True:
k = k+0.0001
if np.sum(y[y > k])/np.size(x) < prob:
break
return x[np.argwhere(y > k)][0] ,x[np.argwhere(y > k)][np.argwhere(y > k).size-1]
```
%% Cell type:markdown id: tags:
In hdi(...) müssen nur noch die Parameter $a$ und $b$ eingegeben werden. Wenn die Prozentzahl noch geändert soll, fügen Sie ein zusätzliches prob=... ein. prob=0.5 würde dann bedeuten, dass 50% der glaubwürdigsten Parameter im HDI enthalten sind.
%% Cell type:code id: tags:
``` python
hdi(5,5)
```
%%%% Output: execute_result
(array([0.21201212]), array([0.78798788]))
(array([0.21221221]), array([0.78778779]))
......
......@@ -9,7 +9,6 @@ pillow==8.3.2
scikit-learn==1.0
seaborn==0.11.2
selenium==3.141.0
tensorflow==2.6.0
vega_datasets==0.9.0
arviz==0.11.4
pymc3==3.11.4
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment