Module: tfma.metrics

View source on GitHub

Init module for TensorFlow Model Analysis metrics.

Classes

class Calibration: Calibration.

class CalibrationPlot: Calibration plot.

class CoefficientOfDiscrimination: Coefficient of discrimination metric.

class ConfusionMatrixAtThresholds: Confusion matrix at thresholds.

class ConfusionMatrixPlot: Confusion matrix plot.

class DerivedMetricComputation: DerivedMetricComputation derives its result from other computations.

class ExampleCount: Example count.

class FallOut: Fall-out (FPR).

class FeaturePreprocessor: Preprocessor for copying features to the standard metric inputs.

class MeanLabel: Mean label.

class MeanPrediction: Mean prediction.

class Metric: Metric wraps a set of metric computations.

class MetricComputation: MetricComputation represents one or more metric computations.

class MetricKey: A MetricKey uniquely identifies a metric.

class MinLabelPosition: Min label position metric.

class MissRate: Miss rate (FNR).

class MultiClassConfusionMatrixPlot: Multi-class confusion matrix plot.

class MultiLabelConfusionMatrixPlot: Multi-label confusion matrix.

class NDCG: NDCG (normalized discounted cumulative gain) metric.

class PlotKey: A PlotKey is a metric key that uniquely identifies a plot.

class QueryStatistics: Query statistic metrics.

class RelativeCoefficientOfDiscrimination: Relative coefficient of discrimination metric.

class Specificity: Specificity (TNR) or selectivity.

class SquaredPearsonCorrelation: Squared pearson correlation (r^2) metric.

class StandardMetricInputs: Standard inputs used by most metric computations.

class SubKey: A SubKey identifies a sub-types of metrics and plots.

class WeightedExampleCount: Weighted example count.

Functions

default_binary_classification_specs(...): Returns default metric specs for binary classification problems.

default_multi_class_classification_specs(...): Returns default metric specs for multi-class classification problems.

default_regression_specs(...): Returns default metric specs for for regression problems.

merge_per_key_computations(...): Wraps create_computations_fn to be called separately for each key.

metric_thresholds_from_metrics_specs(...): Returns thresholds associated with given metrics specs.

specs_from_metrics(...): Returns specs for tf.keras.metrics/losses or tfma.metrics classes.

to_label_prediction_example_weight(...): Yields label, prediction, and example weights for use in calculations.

to_standard_metric_inputs(...): Filters and converts extracts to StandardMetricInputs.