Skip to content

Commit

Permalink
feat: update sot_compare function in industrial examples utils
Browse files Browse the repository at this point in the history
  • Loading branch information
Lopa10ko committed Jan 28, 2025
1 parent 2142675 commit 56b750e
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions examples/real_world_examples/utils.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
import pandas as pd

from fedot_ind.tools.serialisation.path_lib import PROJECT_PATH

def sota_compare(
data_path,
dataset_name,
best_baseline,
best_tuned,
df_automl):

def sota_compare(dataset_name, metrics, data_path=PROJECT_PATH + '/benchmark'):
df = pd.read_csv(data_path + '/ts_regression_sota_results.csv', sep=';')
df = df[df['ds/type'] == dataset_name].iloc[:, :25]
df.index = df['algorithm']
df = df.drop(['algorithm', 'ds/type'], axis=1)
df = df.replace(',', '.', regex=True).astype(float)
df['Fedot_Industrial_baseline'] = best_baseline
df['Fedot_Industrial_tuned'] = best_tuned
df['Fedot_Industrial_AutoML'] = 0
df.loc['min', 'Fedot_Industrial_AutoML'] = df_automl['root_mean_squared_error:'].min()
df.loc['max', 'Fedot_Industrial_AutoML'] = df_automl['root_mean_squared_error:'].max()
df.loc['average', 'Fedot_Industrial_AutoML'] = df_automl['root_mean_squared_error:'].mean()
df.loc['min', 'Fedot_Industrial_AutoML'] = metrics['rmse'].min()
df.loc['max', 'Fedot_Industrial_AutoML'] = metrics['rmse'].max()
df.loc['average', 'Fedot_Industrial_AutoML'] = metrics['rmse'].mean()
df = df.T
return df

0 comments on commit 56b750e

Please sign in to comment.