Skip to main content

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

Project description

travis sonar_quality sonar_maintainability sonar_coverage Maintainability pip

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

How do I get this package?

As usual, just install it with pip:

pip install extra_keras_metrics

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

extra_keras_metrics-1.1.0.tar.gz (7.5 kB view details)

Uploaded Source

File details

Details for the file extra_keras_metrics-1.1.0.tar.gz.

File metadata

  • Download URL: extra_keras_metrics-1.1.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for extra_keras_metrics-1.1.0.tar.gz
Algorithm Hash digest
SHA256 f5de2cc3b067de6e50e938ca0ae3dbb2942b4d1f96c4197149796ad5c8547094
MD5 f0ed9d73393157566197955a1d250d53
BLAKE2b-256 9dc7265bbd75500ed6489970c949b4ec677cfb798c09b50dd6c6223c4737e4eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page