We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1f72e64 + 081779c commit 8767db5Copy full SHA for 8767db5
python/federatedml/ensemble/basic_algorithms/decision_tree/tree_core/loss/test/cross_entropy_test.py
@@ -96,7 +96,7 @@ def test_compute_hess(self):
96
pred = np.asarray([random.random() for j in range(5)], dtype='float64')
97
label = random.randint(0, 4)
98
softmaxloss_hess = self.softmax_loss.compute_hess(label, pred)
99
- hess = pred * (1 - pred)
+ hess = 2 * pred * (1 - pred)
100
self.assertTrue(np.fabs(hess - softmaxloss_hess).all() < consts.FLOAT_ZERO)
101
102
def test_compute_loss(self):
0 commit comments