def test_lagged_with_invalid_params_fit_correctly():
    " The function define a pipeline with incorrect parameters in the lagged\n    transformation. During the training of the pipeline, the parameter 'window_size'\n    is corrected\n    "
    window_size = 600
    len_forecast = 50
    project_root_path = str(fedot_project_root())
    file_path = os.path.join(project_root_path, 'test/data/short_time_series.csv')
    df = pd.read_csv(file_path)
    time_series = np.array(df['sea_height'])
    task = Task(TaskTypesEnum.ts_forecasting, TsForecastingParams(forecast_length=len_forecast))
    ts_input = InputData(idx=np.arange(0, len(time_series)), features=time_series, target=time_series, task=task, data_type=DataTypesEnum.ts)
    pipeline = get_ts_pipeline(window_size)
    pipeline.fit(ts_input)
    lagged_node = pipeline.nodes[1]
    fixed_params = lagged_node.custom_params
    assert pipeline.is_fitted
    assert (fixed_params['window_size'] == 439)
The function define a pipeline with incorrect parameters in the lagged
transformation. During the training of the pipeline, the parameter 'window_size'
is corrected
def test_lagged_with_invalid_params_fit_correctly():
    " The function define a pipeline with incorrect parameters in the lagged\n    transformation. During the training of the pipeline, the parameter 'window_size'\n    is corrected\n    "
    window_size = 600
    len_forecast = 50
    project_root_path = str(fedot_project_root())
    file_path = os.path.join(project_root_path, 'test/data/short_time_series.csv')
    df = pd.read_csv(file_path)
    time_series = np.array(df['sea_height'])
    task = Task(TaskTypesEnum.ts_forecasting, TsForecastingParams(forecast_length=len_forecast))
    ts_input = InputData(idx=np.arange(0, len(time_series)), features=time_series, target=time_series, task=task, data_type=DataTypesEnum.ts)
    pipeline = get_ts_pipeline(window_size)
    pipeline.fit(ts_input)
    lagged_node = pipeline.nodes[1]
    fixed_params = lagged_node.custom_params
    assert pipeline.is_fitted
    assert (fixed_params['window_size'] == 439)