Module: tfma.metrics

Init module for TensorFlow Model Analysis metrics.


class BalancedAccuracy: Balanced accuracy (BA).

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 DiagnosticOddsRatio: Diagnostic odds ratio (DOR).

class ExampleCount: Example count.

class F1Score: F1 score.

class FallOut: Fall-out (FPR).

class FalseDiscoveryRate: False discovery rate (FDR).

class FalseOmissionRate: False omission rate (FOR).

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

class FowlkesMallowsIndex: Fowlkes-Mallows index (FM).

class Informedness: Informedness or bookmaker informedness (BM).

class Markedness: Markedness (MK) or deltaP.

class MatthewsCorrelationCoefficent: Matthews corrrelation coefficient (MCC).

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 MultiClassConfusionMatrixAtThresholds: Multi-class confusion matrix metrics at thresholds.

class MultiClassConfusionMatrixPlot: Multi-class confusion matrix plot.

class MultiLabelConfusionMatrixPlot: Multi-label confusion matrix.

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

class NegativeLikelihoodRatio: Negative likelihood ratio (LR-).

class NegativePredictiveValue: Negative predictive value (NPV).

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

class PositiveLikelihoodRatio: Positive likelihood ratio (LR+).

class Prevalence: Prevalence.

class PrevalenceThreshold: Prevalence threshold (PT).

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 ThreatScore: Threat score or critical success index (TS or CSI).

class WeightedExampleCount: Weighted example count.


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.

Type Aliases

MetricComputations: The central part of internal API.

Other Members