Appearance
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
| Name | Type | Description |
|---|---|---|
| input_1 … input_N | prediction | The prediction entries to compare. |
The number of input ports is controlled by the Number of inputs parameter. All ports must be connected.
Outputs
| Name | Type | Description |
|---|---|---|
| probability | number | The highest probability. |
| prediction | prediction | The prediction entry with the highest probability. |
Parameters
| Parameter | Default | Valid values |
|---|---|---|
| Number of inputs | 2 | 2 – 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_1 ←
OKprediction - input_2 ←
Scratchprediction - input_3 ←
Dentprediction
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.
Related links
Reference:
- AI Model — runs inference using a specific model
- Dynamic AI Model — switches between models at runtime
- Extract Attributes — extracts specific attributes from model predictions
- Polygon Annotator — draws prediction polygons onto the image