Skip to content

Commit

Permalink
regression example ext params
Browse files Browse the repository at this point in the history
  • Loading branch information
IIaKyJIuH committed Jul 14, 2023
1 parent 9dd146d commit af89b59
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/simple/regression/api_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@
from fedot.core.utils import fedot_project_root


def run_regression_example(visualise=False, with_tuning=True):
def run_regression_example(visualise: bool = False, with_tuning: bool = True,
timeout: float = 2., preset: str = 'auto'):
data_path = f'{fedot_project_root()}/cases/data/cholesterol/cholesterol.csv'

data = InputData.from_csv(data_path,
task=Task(TaskTypesEnum.regression))
train, test = train_test_data_setup(data)
problem = 'regression'

composer_params = {'history_dir': 'custom_history_dir', 'preset': 'auto'}
auto_model = Fedot(problem=problem, seed=42, timeout=2, logging_level=logging.FATAL,
composer_params = {'history_dir': 'custom_history_dir', 'preset': preset}
auto_model = Fedot(problem=problem, seed=42, timeout=timeout, logging_level=logging.FATAL,
with_tuning=with_tuning, **composer_params)

auto_model.fit(features=train, target='target')
Expand Down

0 comments on commit af89b59

Please sign in to comment.