Skip to main content

Travis CI build SonarCloud Quality SonarCloud Maintainability Codacy Maintainability Maintainability Pypi project Pypi total project downloads

Additional metrics integrated with the keras NN library, taken directly from Tensorflow

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 sometime get slightly different results, here’s three of them:

Coveralls Coverage SonarCloud Coverage Code Climate Coverate

How do I use this package?

Just by importing it you will be able to access all the non-parametric metrics, such as “auprc” and “auroc”:

import extra_keras_metrics

model = my_keras_model()
model.compile(
    optimizer="sgd",
    loss="binary_crossentropy",
    metrics=["auroc", "auprc"]
)

For the parametric metrics, such as “average_precision_at_k”, you will need to import them, such as:

from extra_keras_metrics import average_precision_at_k

model = my_keras_model()
model.compile(
    optimizer="sgd",
    loss="binary_crossentropy",
    metrics=[average_precision_at_k(1), average_precision_at_k(2)]
)

This way in the history of the model you will find both the metrics indexed as “average_precision_at_k_1” and “average_precision_at_k_2” respectively.

Which metrics do I get?

You will get all the metrics from Tensorflow. At the time of writing, the ones available are the following:

The non-parametric ones are:

  • auprc

  • auroc

  • false_negatives

  • false_positives

  • mean_absolute_error

  • mean_squared_error

  • precision

  • recall

  • root_mean_squared_error

  • true_negatives

  • true_positives

The parametric ones are:

  • average_precision_at_k

  • false_negatives_at_thresholds

  • false_positives_at_thresholds

  • mean_cosine_distance

  • mean_iou

  • mean_per_class_accuracy

  • mean_relative_error

  • precision_at_k

  • precision_at_thresholds

  • recall_at_k

  • recall_at_thresholds

  • sensitivity_at_specificity

  • specificity_at_sensitivity

  • true_negatives_at_thresholds

  • true_positives_at_thresholds

Extras

I’ve created also another couple packages you might enjoy: one, called extra_keras_utils that contains some commonly used code for Keras projects and plot_keras_history which automatically plots a keras training history.

Metadata

Release files for extra-keras-metrics 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for extra-keras-metrics 1.1.2
File Size Uploaded Provenance
extra_keras_metrics-1.1.2.tar.gz 8.3 kB Without provenance Details

Release files / extra_keras_metrics-1.1.2.tar.gz

Download URL extra_keras_metrics-1.1.2.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b03ae66f1dde21a0cbe1edf1c72114f95d815570e463a81b8b5014eeb0877eee
BLAKE2b-256 checksum
How to use checksums
beb543ebcb243910c89cf77a76a9893eb45439915de914a22164e937111f9aa8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.13.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

Security for extra-keras-metrics 1.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page