A collection of neural network machine learning error metrics.
Project description
# Example Usage
```
# Import the required functions from your package
from nn_metrics.metrics import (
mean_absolute_percentage_error,
mean_absolute_error,
mean_squared_error,
root_mean_squared_error,
binary_cross_entropy,
categorical_correntropy,
sparse_categorical_crossentropy
)
# Example usage:
actual = [10, 20, 30, 40, 50]
predicted = [12, 18, 28, 41, 48]
# Calculate and print error metrics
print("Mean Absolute Percentage Error (MAPE):", mean_absolute_percentage_error(actual, predicted))
print("Mean Absolute Error (MAE):", mean_absolute_error(actual, predicted))
print("Mean Squared Error (MSE):", mean_squared_error(actual, predicted))
print("Root Mean Squared Error (RMSE):", root_mean_squared_error(actual, predicted))
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nn_metrics-1.0.0.tar.gz
(1.7 kB
view hashes)
Built Distribution
Close
Hashes for nn_metrics-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7406e470b956375549c7cb9328dcba558f0af8dc17d91ea62e81272a7b1b1ce7 |
|
MD5 | cf77a949a758873702ae499135f5545f |
|
BLAKE2b-256 | 110334731703673486885eb35d618b67cc0b2abb88b54058aef106f5cd18db79 |