Skip to content

Commit 3117ed8

Browse files
authored
Merge pull request #79 from dataiku/enhancement/add-redetect-flag-to-guess-public-api
Added redetect flag to ML task guess public API
2 parents 26d6d0f + ceb574d commit 3117ed8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dataikuapi/dss/ml.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1686,15 +1686,19 @@ def redeploy_to_flow(self, model_id, recipe_name=None, saved_model_id=None, acti
16861686
"POST", "/projects/%s/models/lab/%s/%s/models/%s/actions/redeployToFlow" % (self.project_key, self.analysis_id, self.mltask_id, model_id),
16871687
body = obj)
16881688

1689-
def guess(self, prediction_type=None):
1689+
def guess(self, prediction_type=None, reguess_level=None):
16901690
"""
16911691
Guess the feature handling and the algorithms.
16921692
:param string prediction_type: In case of a prediction problem the prediction type can be specify. Valid values are BINARY_CLASSIFICATION, REGRESSION, MULTICLASS.
1693+
:param bool reguess_level: One of the following values: TARGET_CHANGE, TARGET_REGUESS and FULL_REGUESS. Only valid for prediction ML Tasks, cannot be specified if prediction_type is also set.
16931694
"""
16941695
obj = {}
16951696
if prediction_type is not None:
16961697
obj["predictionType"] = prediction_type
16971698

1699+
if reguess_level is not None:
1700+
obj["reguessLevel"] = reguess_level
1701+
16981702
self.client._perform_empty(
16991703
"PUT",
17001704
"/projects/%s/models/lab/%s/%s/guess" % (self.project_key, self.analysis_id, self.mltask_id),

0 commit comments

Comments
 (0)