¡Reserva! Google I / O regresa del 18 al 20 de mayo

# Module: tf.keras.metrics

Built-in metrics.

## Classes

`class AUC`: Computes the approximate AUC (Area under the curve) via a Riemann sum.

`class Accuracy`: Calculates how often predictions equals labels.

`class BinaryAccuracy`: Calculates how often predictions matches binary labels.

`class BinaryCrossentropy`: Computes the crossentropy metric between the labels and predictions.

`class CategoricalAccuracy`: Calculates how often predictions matches one-hot labels.

`class CategoricalCrossentropy`: Computes the crossentropy metric between the labels and predictions.

`class CategoricalHinge`: Computes the categorical hinge metric between `y_true` and `y_pred`.

`class CosineSimilarity`: Computes the cosine similarity between the labels and predictions.

`class FalseNegatives`: Calculates the number of false negatives.

`class FalsePositives`: Calculates the number of false positives.

`class Hinge`: Computes the hinge metric between `y_true` and `y_pred`.

`class KLDivergence`: Computes Kullback-Leibler divergence metric between `y_true` and `y_pred`.

`class LogCoshError`: Computes the logarithm of the hyperbolic cosine of the prediction error.

`class Mean`: Computes the (weighted) mean of the given values.

`class MeanAbsoluteError`: Computes the mean absolute error between the labels and predictions.

`class MeanAbsolutePercentageError`: Computes the mean absolute percentage error between `y_true` and `y_pred`.

`class MeanIoU`: Computes the mean Intersection-Over-Union metric.

`class MeanRelativeError`: Computes the mean relative error by normalizing with the given values.

`class MeanSquaredError`: Computes the mean squared error between `y_true` and `y_pred`.

`class MeanSquaredLogarithmicError`: Computes the mean squared logarithmic error between `y_true` and `y_pred`.

`class MeanTensor`: Computes the element-wise (weighted) mean of the given tensors.

`class Metric`: Encapsulates metric logic and state.

`class Poisson`: Computes the Poisson metric between `y_true` and `y_pred`.

`class Precision`: Computes the precision of the predictions with respect to the labels.

`class PrecisionAtRecall`: Computes the precision at a given recall.

`class Recall`: Computes the recall of the predictions with respect to the labels.

`class RecallAtPrecision`: Computes the maximally achievable recall at a required precision.

`class RootMeanSquaredError`: Computes root mean squared error metric between `y_true` and `y_pred`.

`class SensitivityAtSpecificity`: Computes the sensitivity at a given specificity.

`class SparseCategoricalAccuracy`: Calculates how often predictions matches integer labels.

`class SparseCategoricalCrossentropy`: Computes the crossentropy metric between the labels and predictions.

`class SparseTopKCategoricalAccuracy`: Computes how often integer targets are in the top `K` predictions.

`class SpecificityAtSensitivity`: Computes the specificity at a given sensitivity.

`class SquaredHinge`: Computes the squared hinge metric between `y_true` and `y_pred`.

`class Sum`: Computes the (weighted) sum of the given values.

`class TopKCategoricalAccuracy`: Computes how often targets are in the top `K` predictions.

`class TrueNegatives`: Calculates the number of true negatives.

`class TruePositives`: Calculates the number of true positives.

## Functions

`KLD(...)`: Computes Kullback-Leibler divergence loss between `y_true` and `y_pred`.

`MAE(...)`: Computes the mean absolute error between labels and predictions.

`MAPE(...)`: Computes the mean absolute percentage error between `y_true` and `y_pred`.

`MSE(...)`: Computes the mean squared error between labels and predictions.

`MSLE(...)`: Computes the mean squared logarithmic error between `y_true` and `y_pred`.

`binary_accuracy(...)`: Calculates how often predictions matches binary labels.

`binary_crossentropy(...)`: Computes the binary crossentropy loss.

`categorical_accuracy(...)`: Calculates how often predictions matches one-hot labels.

`categorical_crossentropy(...)`: Computes the categorical crossentropy loss.

`deserialize(...)`

`get(...)`: Return a metric given its identifer.

`hinge(...)`: Computes the hinge loss between `y_true` and `y_pred`.

`kld(...)`: Computes Kullback-Leibler divergence loss between `y_true` and `y_pred`.

`kullback_leibler_divergence(...)`: Computes Kullback-Leibler divergence loss between `y_true` and `y_pred`.

`mae(...)`: Computes the mean absolute error between labels and predictions.

`mape(...)`: Computes the mean absolute percentage error between `y_true` and `y_pred`.

`mean_absolute_error(...)`: Computes the mean absolute error between labels and predictions.

`mean_absolute_percentage_error(...)`: Computes the mean absolute percentage error between `y_true` and `y_pred`.

`mean_squared_error(...)`: Computes the mean squared error between labels and predictions.

`mean_squared_logarithmic_error(...)`: Computes the mean squared logarithmic error between `y_true` and `y_pred`.

`mse(...)`: Computes the mean squared error between labels and predictions.

`msle(...)`: Computes the mean squared logarithmic error between `y_true` and `y_pred`.

`poisson(...)`: Computes the Poisson loss between y_true and y_pred.

`serialize(...)`

`sparse_categorical_accuracy(...)`: Calculates how often predictions matches integer labels.

`sparse_categorical_crossentropy(...)`: Computes the sparse categorical crossentropy loss.

`sparse_top_k_categorical_accuracy(...)`: Computes how often integer targets are in the top `K` predictions.

`squared_hinge(...)`: Computes the squared hinge loss between `y_true` and `y_pred`.

`top_k_categorical_accuracy(...)`: Computes how often targets are in the top `K` predictions.