Additional metrics integrated with the keras NN library, taken directly from `Tensorflow <https://www.tensorflow.org/api_docs/python/tf/metrics/>`_
Project description
Additional metrics integrated with the Keras NN library.
How do I install this package?
As usual, just download it using pip:
pip install extra_keras_metrics
Tests Coverage
Since some software handling coverages sometimes get slightly different results, here’s three of them:
How do I use this package?
Other than by importing the single metrics from the package, we make available also sets of metrics.
Multi-class metrics
To retrieve an instance of the set of multi-class metrics you can use:
from extra_keras_metrics import get_minimal_multiclass_metrics
model = my_keras_model()
model.compile(
optimizer="nadam",
loss="categorical_crossentropy",
metrics=get_minimal_multiclass_metrics()
)
Binary metrics
To retrieve an instance of the set of binary-class metrics you can use:
from extra_keras_metrics import get_standard_binary_metrics
model = my_keras_model()
model.compile(
optimizer="nadam",
loss="binary_crossentropy",
metrics=get_standard_binary_metrics()
)
All the binary metrics
We have implemented all sorts of binary metrics, including some relatively more obscure ones. If you want ALL the binary metrics we implemented you can use the following method:
from extra_keras_metrics import get_complete_binary_metrics
model = my_keras_model()
model.compile(
optimizer="nadam",
loss="binary_crossentropy",
metrics=get_complete_binary_metrics()
)
Extras
I’ve created also another couple packages you might enjoy this other one, called extra_keras_utils that contains some commonly used code for Keras projects and plot_keras_history <https://github.com/LucaCappelletti94/plot_keras_history> which automatically plots a Keras training history.
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
Hashes for extra_keras_metrics-2.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a44fbdb1d20f4917e0e3acc1cc60ca302c4b2bd7752b7e4acae3fbff3d6ec84 |
|
MD5 | c40c8861deddc6f9c5cfa033e60e461c |
|
BLAKE2b-256 | 48e85c4ead32b7f1b4a8c7bce8711c95fde0fa659c1cb56f051bb756b2d21cf0 |