MCPcopy
hub / github.com/MingchaoZhu/DeepLearning / score

Method score

code/chapter7.py:352–355  ·  view source on GitHub ↗
(self, X, y)

Source from the content-addressed store, hash-verified

350 return y_pred
351
352 def score(self, X, y):
353 y_pred = self.predict(X)
354 accuracy = np.sum(y == y_pred, axis=0) / len(y)
355 return accuracy
356
357
358#####----RandomForest----#######

Callers

nothing calls this directly

Calls 1

predictMethod · 0.95

Tested by

no test coverage detected