/usr/lib/python2.7/dist-packages/pymc/examples/gp/mean.py is in python-pymc 2.2+ds-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | from pymc.gp import *
# Generate mean
def quadfun(x, a, b, c):
return (a * x ** 2 + b * x + c)
M = Mean(quadfun, a = 1., b = .5, c = 2.)
#### - Plot - ####
if __name__ == '__main__':
from pylab import *
x=arange(-1.,1.,.1)
clf()
plot(x, M(x), 'k-')
xlabel('x')
ylabel('M(x)')
axis('tight')
# show()
|