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

Function test_classification_error

mla/metrics/tests/test_metrics.py:28–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26
27
28def test_classification_error():
29 f = metric("classification_error")
30 assert f([1, 2, 3, 4], [1, 2, 3, 4]) == 0
31 assert f([1, 2, 3, 4], [1, 2, 3, 5]) == 0.25
32 assert f([1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 0, 0]) == (1.0 / 6)
33
34
35def test_absolute_error():

Callers

nothing calls this directly

Calls 1

metricFunction · 0.85

Tested by

no test coverage detected