7 def __init__(self, M, ALPHA, BETA, xlist, tlist):
14 def y(self, x, wlist):
16 for i
in range(1, self.
M + 1):
17 ret += wlist[i] * (x ** i)
22 for i
in range(0, self.
M + 1):
24 ret = numpy.matrix(data).reshape((self.
M + 1, 1))
29 sums = pylab.matrix(pylab.zeros((self.
M + 1, 1)))
30 for n
in range(len(self.
xlist)):
32 ret = self.
BETA * self.
phi(x).transpose() * S * sums
37 ret = 1.0 / self.
BETA + self.
phi(x).transpose() * S * self.
phi(x)
41 sums = pylab.matrix(pylab.zeros((self.
M + 1, self.
M + 1)))
42 for n
in range(len(self.
xlist)):
44 I = pylab.matrix(numpy.identity(self.
M + 1))
53 m = self.
mean(x, S)[0, 0]
54 s = numpy.sqrt(self.
variance(x, S)[0, 0])
60 return([xs, means, uppers, lowers])
double min(const OneDataStat &d)
wrapper function for min method for boost::function
double max(const OneDataStat &d)
wrapper function for max method for boost::function
def __init__(self, M, ALPHA, BETA, xlist, tlist)