(self, te_X, te_Y)
return accu, te_Y_predict
Test model on test set and obtain accuracy
Test model on test set and obtain accuracy
Test model on test set and obtain accuracy
def predict_and_evaluate(self, te_X, te_Y):
        ''' Test model on test set and obtain accuracy '''
        te_Y_predict = self.predict(te_X)
        N = len(te_Y)
        n = sum(te_Y_predict == te_Y)
        accu = n / N
        return accu, te_Y_predict
def predict_and_evaluate ( self , te_X , te_Y ) : te_Y_predict = self . predict ( te_X ) N = len ( te_Y ) n = sum ( te_Y_predict == te_Y ) accu = n / N return accu , te_Y_predict