Skip to content

Commit 314cbd2

Browse files
Arnaud dEinstanceofme
andauthored
Fix some wording and indent
Co-authored-by: Adrien Lavoillotte <adrien.lavoillotte@dataiku.com>
1 parent c740435 commit 314cbd2

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

dataikuapi/dss/ml.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -802,9 +802,9 @@ def from_expected_class(expected_valid_ratio, expected_class):
802802
@staticmethod
803803
def from_expected_range(expected_valid_ratio, expected_min, expected_max):
804804
"""
805-
Creates an assertion condition from expected valid ratio and range. The expected range is the
806-
interval between expected_min and expected_max where the predictions and therefore the rows will be considered
807-
valid.
805+
Creates an assertion condition from expected valid ratio and range.
806+
The expected range is the interval between expected_min and expected_max (included)
807+
for the predictions in which the rows will be considered valid.
808808
809809
:param float expected_valid_ratio: Assertion passes if this ratio of rows predicted between expected_min and expected_max is attained
810810
:param float expected_min: Min value of the expected range
@@ -828,8 +828,8 @@ def get_raw(self):
828828
@property
829829
def expected_class(self):
830830
"""
831-
Returns the expected class or None if it is not defined. Assertion passes if the ratio of rows predicted
832-
as expected_class is attained
831+
Returns the expected class or None if it is not defined. Assertion passes if the expected_valid_ratio
832+
of rows predicted as expected_class is attained.
833833
:rtype: str
834834
"""
835835
if "expectedClass" in self._internal_dict:
@@ -845,7 +845,7 @@ def expected_class(self, expected_class):
845845
def expected_valid_ratio(self):
846846
"""
847847
Returns the ratio of valid rows to exceed for the assertion to pass. A row is considered valid if the prediction
848-
is equal to the `expected_class` for classification or in the expected range for regresion
848+
is equal to the `expected_class` for classification or in the expected range for regression
849849
:rtype: str
850850
"""
851851
return self._internal_dict["successRatio"]
@@ -857,8 +857,8 @@ def expected_valid_ratio(self, expected_valid_ratio):
857857
@property
858858
def expected_min(self):
859859
"""
860-
Returns the min (included) of the expected range or None if it is not defined. Assertion passes if the ratio of rows predicted
861-
between expected_min and expected_max is attained
860+
Returns the min (included) of the expected range or None if it is not defined.
861+
Assertion passes if the ratio of rows predicted between expected_min and expected_max is attained.
862862
:rtype: float
863863
"""
864864
if "expectedMinValue" in self._internal_dict:
@@ -873,8 +873,8 @@ def expected_min(self, expected_min):
873873
@property
874874
def expected_max(self):
875875
"""
876-
Returns the max (included) of the expected range or None if it is not defined. Assertion passes if the ratio of rows predicted
877-
between expected_min and expected_max is attained
876+
Returns the max (included) of the expected range or None if it is not defined.
877+
Assertion passes if the ratio of rows predicted between expected_min and expected_max is attained.
878878
:rtype: float
879879
"""
880880
if "expectedMaxValue" in self._internal_dict:

0 commit comments

Comments
 (0)