Skip to content

Arg Max

Overview

The Arg Max node compares multiple predictions and selects the one with the highest probability score. It is designed for classification workflows where each prediction carries a confidence value — the node picks the most confident class.

Use Arg Max when:

  • A single model outputs several prediction classes and you want to select the one with highest probability.

⚠️ Warning

The node compares predictions solely by their probability field. Predictions without a probability value are skipped.

💡 Tip

The node forwards the entire prediction object (including any polygons, heatmap, and class label it carries), so downstream nodes receive the full result — not just the probability.

Inputs

NameTypeDescription
input_1 … input_NpredictionThe prediction entries to compare.

The number of input ports is controlled by the Number of inputs parameter. All ports must be connected.

Outputs

NameTypeDescription
probabilitynumberThe highest probability.
predictionpredictionThe prediction entry with the highest probability.

Parameters

ParameterDefaultValid values
Number of inputs22 – 20

Number of inputs

Sets how many prediction input ports the node exposes. Every input must be connected.

Example

Selecting the most probable class

A classification model outputs three prediction classes for every image: OK, Scratch, and Dent — each with its own probability. Instead of thresholding each class individually, the Arg Max node picks the class with the highest confidence.

Configuration:

  • Number of inputs: 3
  • input_1OK prediction
  • input_2Scratch prediction
  • input_3Dent prediction

Result: For a given image the model returns OK: 0.12, Scratch: 0.81, Dent: 0.07. The node outputs the Scratch prediction object and 0.81 as the probability.

Reference: