Weighted Average

This Algorithm calculates the weighted average given the input metrics and weights.

Each input value is multiplied by its respective weight, the products are then summed and divided by the sum of the weights.

Mathematically, it can be represented as:

(M1 x W1 + M2 x W2 + ... + Mn x Wn) / (W1 + W2 + ... + Wn)

Inputs

Here is the list of inputs required by this Algorithm.

INPUTS

Metrics

The metrics and weights on which perform the weighted average.


Type: KEY_VALUE | Mandatory

Outputs

Here is the list of outputs provided by this Algorithm.

OUTPUTS

Weighted Average

The weighted average.


Type: FLOAT

Insight Metric Configuration

To use this Algorithm in an Insight Metric, you need to:

  1. Go to the Insight / Insight Metrics page.

  2. Select the Thing Definitions tab.

  3. Select the Thing Definition where to create the insight metric.

  4. Click the Add Metric button.

  5. Select the Weighted Average algorithm.

  6. Configure the required inputs.