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

Function xgb_criterion

mla/ensemble/base.py:33–38  ·  view source on GitHub ↗
(y, left, right, loss)

Source from the content-addressed store, hash-verified

31
32
33def xgb_criterion(y, left, right, loss):
34 left = loss.gain(left["actual"], left["y_pred"])
35 right = loss.gain(right["actual"], right["y_pred"])
36 initial = loss.gain(y["actual"], y["y_pred"])
37 gain = left + right - initial
38 return gain
39
40
41def get_split_mask(X, column, value):

Callers 1

_find_best_splitMethod · 0.90

Calls 1

gainMethod · 0.80

Tested by

no test coverage detected