bayesreg.py
def predict(self, hyp, X, y, Xs):
        """ Function to make predictions from the model """

        if (hyp != self.hyp).all() or not(hasattr(self, 'A')):
            self.post(hyp, X, y)

        # hyperparameters
        beta = np.exp(hyp[0])

        ys = Xs.dot(self.m)
        # compute xs.dot(S).dot(xs.T) avoiding computing off-diagonal entries
        s2 = 1/beta + np.sum(Xs*linalg.solve(self.A, Xs.T).T, axis=1)

        return ys, s2
 Function to make predictions from the model 
Function to make predictions from the model
Function to make predictions from the model
def predict(self, hyp, X, y, Xs):
        if (hyp != self.hyp).all() or not(hasattr(self, 'A')):
            self.post(hyp, X, y)
        beta = np.exp(hyp[0])
        ys = Xs.dot(self.m)
        s2 = 1/beta + np.sum(Xs*linalg.solve(self.A, Xs.T).T, axis=1)
        return ys, s2
def predict ( self , hyp , X , y , Xs ) : if ( hyp != self . hyp ) . all ( ) or not ( hasattr ( self , 'A' ) ) : self . post ( hyp , X , y ) beta = np . exp ( hyp [ 0 ] ) ys = Xs . dot ( self . m ) s2 = 1 / beta + np . sum ( Xs * linalg . solve ( self . A , Xs . T ) . T , axis = 1 ) return ys , s2
Function to make predictions from the model
Function to make predictions from the model
""" Function to make predictions from the model """ # hyperparameters # compute xs.dot(S).dot(xs.T) avoiding computing off-diagonal entries
self
hyp
X
y
Xs