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

Function mse_criterion

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

Source from the content-addressed store, hash-verified

21
22
23def mse_criterion(y, splits):
24 y_mean = np.mean(y)
25 return -sum(
26 [
27 np.sum((split - y_mean) ** 2) * (float(split.shape[0]) / y.shape[0])
28 for split in splits
29 ]
30 )
31
32
33def xgb_criterion(y, left, right, loss):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected