def learn_weights(self, pred_y, true_y): x, status = scipy_solve(pred_y, true_y, 3, debug=True) if status: x[x < 1e-3] = 0. else: x = self.w.copy() return status, x
def learn_source_weights(self, pred_y, true_y): x, status = scipy_solve(pred_y, true_y, 3, debug=True) if status: x[x < 1e-3] = 0. return status, x