View Source Scitree.Predictions (scitree v0.1.0)
Link to this section Summary
Functions
Convert probabilities to predicted class. This function will return the index of the class it is likely to be.
Link to this section Functions
Convert probabilities to predicted class. This function will return the index of the class it is likely to be.
The zero value in Yggdrasil is reserved for values outside the dictionary.
examples
Examples
iex> pred = Nx.tensor([[0.01, 0.98, 0.1], [0.00, 0.01, 0.99]]) iex> Scitree.Predictions.probabilities_to_class(pred) #Nx.Tensor<
s64[2]
[2, 3]