MCPcopy
hub / github.com/ddbourgin/numpy-ml / loss

Function loss

numpy_ml/tests/test_trees.py:88–89  ·  view source on GitHub ↗
(yp, y)

Source from the content-addressed store, hash-verified

86
87 # initialize model
88 def loss(yp, y):
89 return 1 - accuracy_score(yp, y)
90
91 criterion = np.random.choice(["entropy", "gini"])
92 mine = DecisionTree(

Callers 4

test_DecisionTreeFunction · 0.70
test_RandomForestFunction · 0.70
test_gbdtFunction · 0.70
_impurity_gainMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected