def _calculate_noise_delta(tree, node_id):
S, nS, S1, nS1, S2, nS2 = _get_variables_for_entropy_calculation(tree, node_id)
return np.log2(np.power(3, nS) - 2) \
- (nS * _calculate_entropy(S)
- nS1 * _calculate_entropy(S1)
- nS2 * _calculate_entropy(S2))
评论列表
文章目录