urbanlc.analyze.metrics.accuracy#
- urbanlc.analyze.metrics.accuracy(m: ndarray) float #
Calculate accuracy from a confusion matrix.
- Parameters:
m (np.ndarray) – Confusion matrix.
- Returns:
Accuracy calculated as the sum of diagonal elements divided by the sum of all elements in the matrix.
- Return type:
float