def get_validation_cost(self, thetas): validation_cost = testerror_sparse_add_smooth( self.data.y_validate, self.data.validate_idx, thetas ) return validation_cost
def get_validation_cost(self, lambdas): # if any are not positive, then just return max value for l in lambdas: if l <= 0: return self.MAX_COST thetas = self.problem_wrapper.solve(lambdas, quick_run=True) validation_cost = testerror_sparse_add_smooth( self.data.y_validate, self.data.validate_idx, thetas ) self.log("validation_cost %f" % validation_cost) return validation_cost
def get_validation_cost(self, model_params): return testerror_sparse_add_smooth(self.data.y_validate, self.data.validate_idx, model_params)
def get_validation_cost(self, thetas): validation_cost = testerror_sparse_add_smooth(self.data.y_validate, self.data.validate_idx, thetas) return validation_cost