support/models.py
def eval(self, w):
        '''
        Evaluate a parameter vector on the test data.
        '''

        losses = self.l_te(w=w) # logistic reg loss.

        # Based on pre-specified decision rule, get classification rate.
        y_est = self.classify(w=w, X=self.X_te)
        perf = self.class_perf(y_est, self.y_te)
        
        # Specify the loss-based statistics to use here.
        rawres = [losses.mean(), losses.std(), perf["rate"]]
        # potential extension: can add per-class P/R/F1 if desired.
        
        return rawres

        Evaluate a parameter vector on the test data.
        
Evaluate a parameter vector on the test data.
Evaluate a parameter vector on the test data .
def eval(self, w):
        losses = self.l_te(w=w) 
        y_est = self.classify(w=w, X=self.X_te)
        perf = self.class_perf(y_est, self.y_te)
        rawres = [losses.mean(), losses.std(), perf["rate"]]
        return rawres
def eval ( self , w ) : losses = self . l_te ( w = w ) y_est = self . classify ( w = w , X = self . X_te ) perf = self . class_perf ( y_est , self . y_te ) rawres = [ losses . mean ( ) , losses . std ( ) , perf [ "rate" ] ] return rawres
Evaluate a parameter vector on the test data.
Evaluate a parameter vector on the test data .
'''
        Evaluate a parameter vector on the test data.
        ''' # logistic reg loss. # Based on pre-specified decision rule, get classification rate. # Specify the loss-based statistics to use here. # potential extension: can add per-class P/R/F1 if desired.
self
w