Skip to content

Add target variable as optional param of DSSMLTask#guess #269

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

Closed
wants to merge 1 commit into from
Closed
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: 6 additions & 2 deletions dataikuapi/dss/ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -3656,17 +3656,21 @@ def remove_all_splits(self):
self.client._perform_empty(
"POST", "/projects/%s/models/lab/%s/%s/actions/removeAllSplits" % (self.project_key, self.analysis_id, self.mltask_id))

def guess(self, prediction_type=None, reguess_level=None):
def guess(self, prediction_type=None, reguess_level=None, target_variable=None):
"""
Guess the feature handling and the algorithms.

:param string prediction_type: In case of a prediction problem the prediction type can be specify. Valid values are BINARY_CLASSIFICATION, REGRESSION, MULTICLASS.
:param string prediction_type: In case of a prediction problem the prediction type can be specified. Valid values are BINARY_CLASSIFICATION, REGRESSION, MULTICLASS.
: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.
:param string target_variable: In case of a prediction problem the target variable can be specified.
"""
obj = {}
if prediction_type is not None:
obj["predictionType"] = prediction_type

if target_variable is not None:
obj["targetVariable"] = target_variable

if reguess_level is not None:
obj["reguessLevel"] = reguess_level

Expand Down