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

        model_params = self.problem_wrapper.solve(lambdas, quick_run=True)
        validation_cost = testerror_matrix_completion(self.data,
                                                      self.data.validate_idx,
                                                      model_params)
        self.log("validation_cost %f" % validation_cost)
        return validation_cost
Ejemplo n.º 2
0
 def get_validation_cost(self, model_params):
     return testerror_matrix_completion(self.data, self.data.validate_idx,
                                        model_params)
 def get_validation_cost(self, model_params):
     return testerror_matrix_completion(self.data, self.data.validate_idx, model_params)