Skip to main content

Probabilities

Functions related to processing the value of probability vision elements.

sumProbabilities()

Rounds a floating point number to a given number of decimal places.

function sumProbabilities(probability: Probability): number;

maxProbability()

Return the most probable class and value. If there are more than one class with the same probability, the first one is returned.

function maxProbability(probability: Probability):  Record<string, number>;

thresholdProbability()

Returns vector with classes and values with probability >= threshold. Sorted by decreasing probability value.

function thresholdProbability(probability: Probability, threshold?: number): Record<string, number>;