Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added missing documentation for weights parameter in SumOfSquaresError #1688

Merged
merged 1 commit into from
Jul 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion pints/_error_measures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
Expand Down