Skip to content

Commit

Permalink
add metric to the notorious tests
Browse files Browse the repository at this point in the history
  • Loading branch information
IIaKyJIuH committed Oct 12, 2023
1 parent 9434106 commit 5b44396
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions examples/advanced/time_series_forecasting/exogenous.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def run_exogenous_experiment(path_to_file, len_forecast=250, with_exog=True, vis
task_params=task.task_params,
timeout=10,
initial_assumption=pipeline,
metric=['mae'],
available_operations=['lagged', 'ridge', 'exog_ts', 'arima', 'knnreg', 'rfr', 'svr'],
max_pipeline_fit_time=2,
n_jobs=-1)
Expand Down
4 changes: 2 additions & 2 deletions examples/simple/time_series_forecasting/api_forecasting.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from fedot.core.data.data import InputData
from fedot.core.data.data_split import train_test_data_setup
from fedot.core.repository.dataset_types import DataTypesEnum
from fedot.core.repository.tasks import TsForecastingParams, Task, TaskTypesEnum
from fedot.core.repository.tasks import Task, TaskTypesEnum, TsForecastingParams

logging.raiseExceptions = False

Expand Down Expand Up @@ -41,7 +41,7 @@ def run_ts_forecasting_example(dataset='australia', horizon: int = 30, timeout:
TsForecastingParams(forecast_length=horizon)).task_params,
timeout=timeout,
n_jobs=-1,
metric='mase',
metric=['mase', 'mae', 'mape', 'rmse'],
with_tuning=with_tuning,
cv_folds=2, preset='fast_train')

Expand Down
2 changes: 1 addition & 1 deletion test/integration/api/test_main_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def data_with_binary_features_and_categorical_target():
])
def test_api_predict_correct(task_type, metric_name):
train_data, test_data, _ = get_dataset(task_type)
model = Fedot(problem=task_type, **TESTS_MAIN_API_DEFAULT_PARAMS)
model = Fedot(problem=task_type, metric=[metric_name], **TESTS_MAIN_API_DEFAULT_PARAMS)
fedot_model = model.fit(features=train_data)
prediction = model.predict(features=test_data)
metric = model.get_metrics(metric_names=metric_name, rounding_order=5)
Expand Down

0 comments on commit 5b44396

Please sign in to comment.