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

Function wrapper

mla/metrics/metrics.py:10–15  ·  view source on GitHub ↗
(actual, predicted)

Source from the content-addressed store, hash-verified

8 """Convert one-hot representation into one column."""
9
10 def wrapper(actual, predicted):
11 if len(actual.shape) > 1 and actual.shape[1] > 1:
12 actual = actual.argmax(axis=1)
13 if len(predicted.shape) > 1 and predicted.shape[1] > 1:
14 predicted = predicted.argmax(axis=1)
15 return function(actual, predicted)
16
17 return wrapper
18

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected