Skip to content

Commit

Permalink
refactor api, fixes in model, refactor example
Browse files Browse the repository at this point in the history
  • Loading branch information
v1docq committed Dec 8, 2023
1 parent 113b3f7 commit 22cd011
Show file tree
Hide file tree
Showing 32 changed files with 597 additions and 22,713 deletions.
File renamed without changes.
7 changes: 6 additions & 1 deletion examples/example_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
from fedot.core.repository.dataset_types import DataTypesEnum
from fedot.core.repository.tasks import Task, TaskTypesEnum, TsForecastingParams
from sklearn.metrics import f1_score, roc_auc_score
from sklearn.preprocessing import LabelEncoder

from fedot_ind.api.utils.path_lib import PROJECT_PATH
from sklearn.metrics import explained_variance_score, max_error, mean_absolute_error, \
mean_squared_error, d2_absolute_error_score, \
Expand Down Expand Up @@ -43,10 +45,13 @@ def init_input_data(X: pd.DataFrame, y: np.ndarray, task: str = 'classification'
is_multivariate_data = check_multivariate_data(X)
task_dict = {'classification': Task(TaskTypesEnum.classification),
'regression': Task(TaskTypesEnum.regression)}
if type((y)[0]) is np.str_:
label_encoder = LabelEncoder()
y = label_encoder.fit_transform(y)
if is_multivariate_data:
input_data = InputData(idx=np.arange(len(X)),
features=np.array(X.values.tolist()).astype(np.float),
target=y.astype(np.float).reshape(-1, 1),
target=y.reshape(-1, 1),
task=task_dict[task],
data_type=DataTypesEnum.image)
else:
Expand Down
127 changes: 0 additions & 127 deletions examples/fedot/fedot_ex.py

This file was deleted.

Loading

0 comments on commit 22cd011

Please sign in to comment.