ModelFox.MulticlassClassificationPredictOutput (modelfox v0.8.0) View Source

ModelFox.predict outputs {:multiclass_classification, MulticlassClassificationPredictOutput.t()} when the model's task is multiclass classification.

class_name

This is the name of the predicted class.

probability

This is the probability the model assigned to the predicted class.

probabilities

This value maps from class names to the probability the model assigned to each class.

feature_contributions

If computing feature contributions was enabled in the predict options, this value will explain the model's output, showing how much each feature contributed to the output. This value maps from class names to FeatureContributions values for each class. The class with the FeatureContributions value with the highest output_value is the predicted class.

Link to this section Summary

Link to this section Types

Specs

t() :: %ModelFox.MulticlassClassificationPredictOutput{
  class_name: String.t(),
  feature_contributions: FeatureContributions.t() | nil,
  probabilities: [float()],
  probability: float()
}