From cbc96fe6f4644ede47d3597987295c035d7d2ad0 Mon Sep 17 00:00:00 2001 From: Michael Clerx Date: Tue, 30 Jul 2024 11:00:28 +0100 Subject: [PATCH] Added missing documentation for weights parameter in SumOfSquaresError --- pints/_error_measures.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pints/_error_measures.py b/pints/_error_measures.py index 74255e74f..8f3956b4c 100644 --- a/pints/_error_measures.py +++ b/pints/_error_measures.py @@ -329,7 +329,7 @@ def n_parameters(self): class SumOfSquaresError(ProblemErrorMeasure): r""" - Calculates a sum of squares error: + Calculates the sum of squares error: .. math:: f = \sum _i^n (y_i - x_i) ^ 2, @@ -344,6 +344,12 @@ class SumOfSquaresError(ProblemErrorMeasure): problem A :class:`pints.SingleOutputProblem` or :class:`pints.MultiOutputProblem`. + weights + An optional sequence of (float) weights, exactly one per problem + output. If given, the error in each individual output will be + multiplied by the corresponding weight. If no weights are specified all + outputs will be weighted equally. + """ def __init__(self, problem, weights=None): super(SumOfSquaresError, self).__init__(problem)