示例#1
0
 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
示例#2
0
 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