Skip to content

pm.gp.util.stabilize needs a docstring with usage instructions #4763

Open
@michaelosthege

Description

@michaelosthege
with pm.Model():
    cov = pm.gp.cov.ExpQuad(input_dim=2, ls=1)
    cov = pm.gp.util.stabilize(cov)
AttributeError                            Traceback (most recent call last)
<ipython-input-44-f4041194b996> in <module>
      1 with pm.Model():
      2     cov = pm.gp.cov.ExpQuad(input_dim=2, ls=1)
----> 3     cov = pm.gp.util.stabilize(cov)

~\AppData\Local\Continuum\miniconda3\envs\murefi_env\lib\site-packages\pymc3\gp\util.py in stabilize(K)
     38 def stabilize(K):
     39     """ adds small diagonal to a covariance matrix """
---> 40     return K + 1e-6 * tt.identity_like(K)
     41 
     42 

~\AppData\Local\Continuum\miniconda3\envs\murefi_env\lib\site-packages\theano\tensor\basic.py in identity_like(x)
   2922 
   2923 def identity_like(x):
-> 2924     return eye(x.shape[0], x.shape[1], k=0, dtype=x.dtype)
   2925 
   2926 

AttributeError: 'ExpQuad' object has no attribute 'shape'

Versions and main components

  • PyMC3 Version: 3.11.2 (did not check with main)
  • Aesara/Theano Version: 1.1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    GPGaussian Processdocsneeds infoAdditional information required

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions