Skip to content

Commit 7aeafa2

Browse files
author
arnaudde
committed
Wording
1 parent 86a7c9a commit 7aeafa2

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

dataikuapi/dss/ml.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -798,8 +798,8 @@ def from_expected_class(expected_valid_ratio, expected_class):
798798
"""
799799
Creates an assertion condition from the expected valid ratio and class
800800
801-
:param float expected_valid_ratio: Ratio of valid rows needed for the assertion to pass
802-
:param str expected_class: Class on which the `expected_valid_ratio` will be calculated
801+
:param float expected_valid_ratio: Assertion passes if this ratio of rows predicted as expected_class is attained
802+
:param str expected_class: Assertion passes if the ratio of rows predicted as expected_class is attained
803803
804804
:rtype: :class:`dataikuapi.dss.ml.DSSMLAssertionCondition`
805805
"""
@@ -811,7 +811,7 @@ def from_expected_class(expected_valid_ratio, expected_class):
811811
@staticmethod
812812
def from_expected_range(expected_valid_ratio, expected_min, expected_max):
813813
"""
814-
Creates an assertion condition from an expected valid ratio and an expected range. The expected range is the
814+
Creates an assertion condition from expected valid ratio and range. The expected range is the
815815
interval between expected_min and expected_max where the predictions and therefore the rows will be considered
816816
valid.
817817
@@ -837,7 +837,8 @@ def get_raw(self):
837837
@property
838838
def expected_class(self):
839839
"""
840-
Returns the expected class on which the valid ratio will be calculated or None if it is not defined
840+
Returns the expected class or None if it is not defined. Assertion passes if the ratio of rows predicted
841+
as expected_class is attained
841842
:rtype: str
842843
"""
843844
if "expectedClass" in self._internal_dict:
@@ -852,7 +853,8 @@ def expected_class(self, expected_class):
852853
@property
853854
def expected_valid_ratio(self):
854855
"""
855-
Returns the ratio of valid rows to exceed for the assertion to pass
856+
Returns the ratio of valid rows to exceed for the assertion to pass. A row is considered valid if the prediction
857+
is equal to the `expected_class` for classification or in the expected range for regresion
856858
:rtype: str
857859
"""
858860
return self._internal_dict["successRatio"]
@@ -864,7 +866,8 @@ def expected_valid_ratio(self, expected_valid_ratio):
864866
@property
865867
def expected_min(self):
866868
"""
867-
Returns the min (included) of the expected range or None if it is not defined
869+
Returns the min (included) of the expected range or None if it is not defined. Assertion passes if the ratio of rows predicted
870+
between expected_min and expected_max is attained
868871
:rtype: float
869872
"""
870873
if "expectedMinValue" in self._internal_dict:
@@ -879,7 +882,8 @@ def expected_min(self, expected_min):
879882
@property
880883
def expected_max(self):
881884
"""
882-
Returns the max (included) of the expected range
885+
Returns the max (included) of the expected range or None if it is not defined. Assertion passes if the ratio of rows predicted
886+
between expected_min and expected_max is attained
883887
:rtype: float
884888
"""
885889
if "expectedMaxValue" in self._internal_dict:

0 commit comments

Comments
 (0)