MCPcopy Create free account
hub / github.com/rushter/MLAlgorithms / information_gain

Function information_gain

mla/ensemble/base.py:16–20  ·  view source on GitHub ↗
(y, splits)

Source from the content-addressed store, hash-verified

14
15
16def information_gain(y, splits):
17 splits_entropy = sum(
18 [f_entropy(split) * (float(split.shape[0]) / y.shape[0]) for split in splits]
19 )
20 return f_entropy(y) - splits_entropy
21
22
23def mse_criterion(y, splits):

Callers

nothing calls this directly

Calls 1

f_entropyFunction · 0.85

Tested by

no test coverage detected