Description
Compute 2 × weight × (predicted - actual) / denominator, with nonnegative weight and positive denominator.
A sensitivity is a local derivative with respect to a specified variable while other quantities are held fixed. Normalized metrics can have different derivatives from unnormalized sums.
Compute 2 × weight × (predicted - actual) / denominator, with nonnegative weight and positive denominator.
When to use this tool
Use Mse Single Observation Gradient when you need one clearly defined metric derivative.
How to use the tool and how it works
- Enter actual, predicted, weight, denominator. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read gradient. Use the output convention below.
Compute 2 × weight × (predicted - actual) / denominator, with nonnegative weight and positive denominator.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| actual | Observed value on the same scale and unit as its prediction. | Required. Finite number. |
| predicted | Predicted value on the same scale and unit as actual. | Required. Finite number. |
| weight | Weight | Required. Finite number. |
| denominator | Denominator | Required. Finite number; strictly above 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| gradient | Gradient | Required. Finite number. |
{
"input": {
"actual": 2,
"predicted": 5,
"weight": 2,
"denominator": 4
},
"output": {
"gradient": 3
}
} Limitations and assumptions
- The denominator is held fixed for this prediction gradient; no aggregate loss or denominator derivative is computed.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Verify the aggregate definition and held-fixed quantities before using the derivative in optimization or uncertainty propagation.
References
Similar or alternative tools
- Squared Error Weight Sensitivity
Return (predicted - actual)^2 as the derivative of an unnormalized weighted squared-error term with respect to its weight.
- Mae Single Observation Gradient
Require actual unequal to predicted and return sign(predicted - actual) as the gradient with respect to predicted.