Skip to content

Commit

Permalink
feat: add target param for tuning function
Browse files Browse the repository at this point in the history
  • Loading branch information
Lopa10ko committed Jul 23, 2024
1 parent 6cb85fb commit 7269af5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fedot/api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ def fit(self,

def tune(self,
input_data: Optional[FeaturesType] = None,
target: TargetType = 'target',
metric_name: Optional[Union[str, MetricCallable]] = None,
iterations: int = DEFAULT_TUNING_ITERATIONS_NUMBER,
timeout: Optional[float] = None,
Expand All @@ -213,6 +214,7 @@ def tune(self,
Args:
input_data: data for tuning pipeline in one of the supported formats.
target: data target values in one of the supported target formats.
metric_name: name of metric for quality tuning.
iterations: numbers of tuning iterations.
timeout: time for tuning (in minutes). If ``None`` or ``-1`` means tuning until max iteration reach.
Expand All @@ -230,7 +232,7 @@ def tune(self,
if input_data is None:
input_data = self.train_data
else:
input_data = self.data_processor.define_data(features=input_data, target=self.target, is_predict=False)
input_data = self.data_processor.define_data(features=input_data, target=target, is_predict=False)
cv_folds = cv_folds or self.params.get('cv_folds')
n_jobs = n_jobs or self.params.n_jobs

Expand Down

0 comments on commit 7269af5

Please sign in to comment.