Get confidence limits from Gaussian Process model in Python GPy

青春壹個敷衍的年華 提交于 2019-12-13 15:47:04

问题


I calcualted a Gaussian Process model in Python using GPy:

ker0 = GPy.kern.Bias(input_dim=1,variance=1e-2)
...
m = GPy.models.GPRegression(x, y, ker0+ker2)

I can plot it with

m.plot()
plt.show

and it visualizes the points, the spline and the confidence limits. Now I want to extract the parameters and the confidence limits to use the data in another plot. My question is, how can I access these data.

if I print m I get

Name : GP regression
Objective : 31.9566881665
Number of Parameters : 4
Number of Optimization Parameters : 4
Updates : True
Parameters:
  GP_regression.           |              value  |  constraints  |  priors
  sum.bias.variance        |  7.48802926977e-61  |      +ve      |
  sum.spline.variance      |     -2.99999065833  |   -3.0,-1.0   |
  sum.spline.c             |      19.8308670902  |   0.0,300.0   |
  Gaussian_noise.variance  |      50.2314402955  |      +ve      |

thx!


回答1:


Try

m.sum.bias.variance

notice the m. at the beginning.



来源:https://stackoverflow.com/questions/40504866/get-confidence-limits-from-gaussian-process-model-in-python-gpy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!