fixing tutorial title order and GP J calculation
@@ -41,9 +41,9 @@ class Term(object):
@property
def J(self):
+ try:
func = theano.function(
[], [self.coefficients[0], self.coefficients[2]])
- try:
a_real, a_comp = func()
except MissingInputError:
return -1
@@ -144,6 +144,10 @@ class TermSum(Term):
self.terms = terms
super(TermSum, self).__init__(**kwargs)
+ @property
+ def J(self):
+ return sum(term.J for term in self.terms)
+
def get_coefficients(self):
coeffs = []
for t in self.terms:
