|View source on GitHub|
Multi-class confusion matrix plot.
tfma.metrics.MultiClassConfusionMatrixPlot( thresholds: Optional[List[float]] = None, num_thresholds: Optional[int] = None, name: Text = MULTI_CLASS_CONFUSION_MATRIX_PLOT_NAME )
Computes weighted example counts for all combinations of actual / (top) predicted classes.
The inputs are assumed to contain a single positive label per example (i.e. only one class can be true at a time) while the predictions are assumed to sum to 1.0.
||Optional thresholds. If the top prediction is less than a threshold then the associated example will be assumed to have no prediction associated with it (the predicted_class_id will be set to NO_PREDICTED_CLASS_ID). Only one of either thresholds or num_thresholds should be used. If both are unset, then [0.0] will be assumed.|
||Number of thresholds to use. The thresholds will be evenly spaced between 0.0 and 1.0 and inclusive of the boundaries (i.e. to configure the thresholds to [0.0, 0.25, 0.5, 0.75, 1.0], the parameter should be set to 5). Only one of either thresholds or num_thresholds should be used.|
Whether to compute confidence intervals for this metric.
Note that this may not completely remove the computational overhead involved in computing a given metric. This is only respected by the jackknife confidence interval method.
computations( eval_config: Optional[
config.EvalConfig] = None, schema: Optional[schema_pb2.Schema] = None, model_names: Optional[List[Text]] = None, output_names: Optional[List[Text]] = None, sub_keys: Optional[List[
SubKey]] = None, class_weights: Optional[Dict[int, float]] = None, query_key: Optional[Text] = None, is_diff: Optional[bool] = False ) -> MetricComputations
Creates computations associated with metric.
get_config() -> Dict[Text, Any]
Returns serializable config.
is_model_independent() -> bool
Returns true if the metric does not depend on a model.