@@ -127,11 +127,10 @@ def __init__(
127
127
128
128
def object_based (self , ** kwargs ) -> Measure :
129
129
"""
130
- Returns measure for comparison regarding the individual objects (as
131
- opposed to only considering their union).
130
+ Returns measure for comparing the individual objects (as opposed to
131
+ only considering the union thereof ).
132
132
133
- Positional and keyword arguments are passed through to
134
- :class:`ObjectMeasureAdapter`.
133
+ Keyword arguments are passed through to :class:`ObjectMeasureAdapter`.
135
134
136
135
:returns:
137
136
This measure decorated by :class:`ObjectMeasureAdapter`.
@@ -147,11 +146,42 @@ def object_based(self, **kwargs) -> Measure:
147
146
148
147
149
148
class AsymmetricMeasureMixin (MeasureProtocol ):
149
+ """
150
+ Defines an asymmetric performance measure.
151
+
152
+ Symmetric performance measures are guaranteed to yield the same results
153
+ when the actual and the expected segmentation masks are swapped.
154
+ Asymmetric performance measures can yield different results when the
155
+ results are swapped.
156
+ """
150
157
151
158
def reversed (self , ** kwargs ) -> Measure :
159
+ """
160
+ Returns a measure for comparing the underlying asymmetric performance
161
+ measure measure in the opposite direction (i.e. swapping the actual
162
+ and the expected segmentation masks).
163
+
164
+ Keyword arguments are passed through to :class:`ReverseMeasureAdapter`.
165
+
166
+ :returns:
167
+ This measure decorated by :class:`ReverseMeasureAdapter`.
168
+ """
152
169
return ReverseMeasureAdapter (self , ** kwargs )
153
170
154
171
def symmetric (self , ** kwargs ) -> Measure :
172
+ """
173
+ Returns a bidirectional variant of the underlying asymmetric
174
+ performance measure. The underlying performance measure is used for
175
+ computation of performance values in both direction (i.e. with the
176
+ original segmentation masks, and, in addition, with actual and
177
+ expected segmentation masks swapped).
178
+
179
+ Keyword arguments are passed through to
180
+ :class:`SymmetricMeasureAdapter`.
181
+
182
+ :returns:
183
+ This measure decorated by :class:`SymmetricMeasureAdapter`.
184
+ """
155
185
return SymmetricMeasureAdapter (self , self .reversed (), ** kwargs )
156
186
157
187
0 commit comments