(actual, predicted)
| 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 |
nothing calls this directly
no outgoing calls
no test coverage detected