Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bagging method implementation to FEDOT #1005

Closed
wants to merge 54 commits into from
Closed

Conversation

aPovidlo
Copy link
Collaborator

@aPovidlo aPovidlo commented Dec 12, 2022

Adding an ensemble (stacking and bagging) operations to FEDOT
UPD: The main task was reformulated and divided into small tasks. In this PR is solving one from this tasks, more specifically bagging implementation.

Implementation:
bagging method from sklearn to FEDOT
multi-layer stack ensembling + n-repeated k-fold bagging method for boosting methods

Minor changes: Added ExtraTrees models to FEDOT

@aPovidlo aPovidlo added in progress task in progress architecture (re)design of existing or new framework subsystem labels Dec 12, 2022
@aPovidlo aPovidlo self-assigned this Dec 12, 2022
@aPovidlo aPovidlo changed the title Ensembles implementations in FEDOT Bagging method implementation to FEDOT Jan 10, 2023
@codecov
Copy link

codecov bot commented Jan 10, 2023

Codecov Report

Merging #1005 (2a12f83) into master (17b2ecd) will increase coverage by 9.26%.
Report is 8 commits behind head on master.
The diff coverage is 95.00%.

❗ Current head 2a12f83 differs from pull request most recent head 2049f0e. Consider uploading reports for the commit 2049f0e to get more accurate results

@@            Coverage Diff             @@
##           master    #1005      +/-   ##
==========================================
+ Coverage   79.70%   88.97%   +9.26%     
==========================================
  Files         141      133       -8     
  Lines        9851     9433     -418     
==========================================
+ Hits         7852     8393     +541     
+ Misses       1999     1040     -959     
Files Coverage Δ
...ot/core/composer/gp_composer/specific_operators.py 90.41% <100.00%> (+10.10%) ⬆️
fedot/core/data/data_split.py 96.70% <100.00%> (+1.96%) ⬆️
...ore/operations/evaluation/evaluation_interfaces.py 90.26% <ø> (+4.42%) ⬆️
fedot/core/pipelines/tuning/search_space.py 100.00% <ø> (ø)
fedot/core/operations/evaluation/bagging.py 93.84% <93.84%> (ø)

... and 97 files with indirect coverage changes

fedot/core/data/data_split.py Outdated Show resolved Hide resolved
fedot/core/operations/evaluation/bagging.py Outdated Show resolved Hide resolved
fedot/core/repository/data/model_repository.json Outdated Show resolved Hide resolved

def __init__(self, operation_type, params: Optional[OperationParameters] = None):
super().__init__(operation_type, params)
self._bagging_params, self._model_params = self._set_operation_params(operation_type, params)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Эту строчку спокойно можно перенести в базовый класс и можно убрать аргументы, т.к. ты в EvaluationStrategy инициализируешь параметры и тип операции

Copy link
Collaborator

@valer1435 valer1435 Jan 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Да и следущую тоже. _convert_to_operation можно перенести в базовый класс, а вместо BaggingClassifier или BaggingRegressor можно написать в суперклассе что-то вроде bag_type(**self.bagging), где get_bagбудет BaggingClassifier или BaggingRegressor

Думаю сработает

Copy link
Collaborator Author

@aPovidlo aPovidlo Jan 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не совсем тебя понял. bag_type() в классе предка, а вызывать его из класса родителя? А get_bag откдуа?

И в итоге, не вернулись ли туда, от куда начали разбитие на два класса? Уж лучше было когда все в одном

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Думаю, что _convert_to_operation пока нужно оставить в каждом из классе

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

class SkLearnBaggingStrategy(EvaluationStrategy, ABC):
.....
def __init__():
    ....
    self.bag_type = None
    ....

def _convert_to_operation(self, operation_type: str):
        if operation_type in self.__operations_by_types.keys():
            if self._model_params:
                self._bagging_params['base_estimator'] = self.__operations_by_types[operation_type](
                    **self._model_params)
            else:
                self._bagging_params['base_estimator'] = self.__operations_by_types[operation_type]()

            return self.bag_type(**self._bagging_params)


class SkLearnBaggingClassificationStrategy(SkLearnBaggingStrategy):
....
def __init__():
    ....
    self.bag_type = BaggingClassifier
    ....

```С регрессией также. Не уверен, что это лучшее решение, но сокращает код в 2 раза

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@valer1435 перенес в базовый класс

if params is None:
params = get_default_params(operation_type)
elif isinstance(params, dict):
params = OperationParameters.from_operation_type(operation_type, **params)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

На этапе вызова этой функции у нас уже должны по идее инициализироваться параметры. Зачем из заново объявлять?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Для тестов, в которых вызывается необходимый класс бэггинга, и возможности передачи параметров.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Думаю, все-таки перепишу тесты через PipelineBuilder и уберу этот метод

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вспомнил. У меня ранее падал тест test_api_print_info_correct. В других реализациях параметры использовались только на уровне fit, поэтому в них нужды в __init__ не было. А так как сейчас есть необходимость, а в инициализацию params приходят равные None они и вызывают ошибку. Поэтому решил добавить функцию, которая их бы добавляла. Поэтому нет, на этапе вызоыва этой функции у нас еще нет иницилизированных параметров.

Copy link
Collaborator

@valer1435 valer1435 Jan 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Идею понял, но есть несколько предложений:

  1. убрать @static и записывать bagging_params, model_params в поля класса
  2. Сделать вызов этого метода до инициализации конструктора базового класса и сделать так, чтобы метод возвращал params. params потом уже передавать в конструктор. Нужно, чтобы не было 2 разных объекта параметров. Сейчас именно так

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@valer1435 Изменил

fedot/core/operations/evaluation/bagging.py Show resolved Hide resolved
fedot/core/operations/evaluation/bagging.py Outdated Show resolved Hide resolved
test/unit/models/test_strategy.py Outdated Show resolved Hide resolved
if params is None:
params = get_default_params(operation_type)
elif isinstance(params, dict):
params = OperationParameters.from_operation_type(operation_type, **params)
Copy link
Collaborator

@valer1435 valer1435 Jan 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Идею понял, но есть несколько предложений:

  1. убрать @static и записывать bagging_params, model_params в поля класса
  2. Сделать вызов этого метода до инициализации конструктора базового класса и сделать так, чтобы метод возвращал params. params потом уже передавать в конструктор. Нужно, чтобы не было 2 разных объекта параметров. Сейчас именно так


return self._convert_to_output(prediction, predict_data)

def predict_proba(self, trained_operation, predict_data: InputData) -> OutputData:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Имплементации разве сами не подхватывают predict_proba, когда нужно? Посмотрел на метод predict в SkLearnClassificationStrategy, там эта проблема уже решается. Так что это должен быть бесполезный метод

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@valer1435 Убрал

raise ValueError(f'Impossible to create bagging operation for {operation_type}')

def fit(self, train_data: InputData):
return super().fit(train_data)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это работает по-другому - ты просто можешь не реализовывать методы fit и predict, так как они есть в родительском классе. А по иерархии наследования то, что является объектом дочернего класса, является также носителем свойств родительского класса -> все методы сохраняются

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Да, в курсе, но, как по мне, так намного лучше читается сам код и легче будет потом разобраться что к чему

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Дублировать так реализации методов базового класса действительно нет особого смысла, ето анти-паттерн.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@valer1435 @nicl-nno уберу в следующем коммите

}
},
'bag_xgboost': {
'bagging_params': {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вообще, чтобы сделать вложенные параметры для hyperopt, надо помучаться. Ты уверен, что тюнинг будет работать? В том смысле, что гиперпараметры будут изменяться? Возможно стоит избавиться от model_params и bagging_params тут и разделять их как-то по-другому

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Правда тут не то, чтобы параметры вложенные, я больше про разделение

Copy link
Collaborator Author

@aPovidlo aPovidlo Jan 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

С тюнингом пока все сложно в плане реализации. Про использование вложенных параметров для hyperopt пока еще не успел посмотреть, поэтому не знаю работает ли тюнинг, это сейчас и выясняю. Изначально у меня была немного другая идея по оптимизации базовых моделей в бэггинге. Из-за временной дороговизны операции, думаю, что будет более рационально использовать найденные на этапе композирования и тюнинг модели, которые после можно обернуть в бэггинг и посмотреть улучшает ли он результат.

Пример, во время композирования и тюнинга мы нашли оптимальный пайплайн 'lgbm' {с найденными оптимальными параметрами} и в качестве базовой моделей бэггинга используем эту модель с найденными параметрами.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Однако, пока все еще не понимаю, как их использовать если у нас какая-то более разветвленная структура пайплайна получилась

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@valer1435 это остается пока все еще актуальным. Сейчас начал проводить эксперименты для поиска оптимальных параметров. Возможно, в будущем получится обойтись и без тюнинга

test/unit/models/test_strategy.py Outdated Show resolved Hide resolved
@aim-pep8-bot
Copy link

aim-pep8-bot commented Mar 21, 2023

Hello @aPovidlo! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 31:15: F821 undefined name 'np'
Line 32:18: F821 undefined name 'np'
Line 33:20: F821 undefined name 'np'
Line 69:59: F821 undefined name 'np'
Line 70:58: F821 undefined name 'np'
Line 100:44: F821 undefined name 'np'
Line 124:19: F821 undefined name 'np'

Line 177:1: W391 blank line at end of file

Line 1:1: F401 'copy' imported but unused
Line 2:1: F401 'time' imported but unused
Line 15:121: E501 line too long (122 > 120 characters)
Line 135:121: E501 line too long (123 > 120 characters)

Line 172:26: W292 no newline at end of file

Line 3:1: F401 'lightgbm.LGBMClassifier' imported but unused
Line 4:1: F401 'catboost.CatBoostClassifier' imported but unused
Line 9:1: F401 'fedot.core.operations.evaluation.bagging_kfold.KFoldBaggingClassifier' imported but unused
Line 10:1: F401 'fedot.core.pipelines.pipeline.Pipeline' imported but unused
Line 13:1: F401 'fedot.core.repository.operation_types_repository.OperationTypesRepository' imported but unused
Line 16:1: F401 'test.unit.pipelines.test_decompose_pipelines.get_classification_data' imported but unused
Line 156:48: E261 at least two spaces before inline comment
Line 161:52: E261 at least two spaces before inline comment
Line 166:48: E261 at least two spaces before inline comment
Line 171:48: E261 at least two spaces before inline comment
Line 176:50: E261 at least two spaces before inline comment
Line 181:48: E261 at least two spaces before inline comment
Line 223:5: F841 local variable 'y_hat_m' is assigned to but never used
Line 225:121: E501 line too long (129 > 120 characters)
Line 244:30: W292 no newline at end of file
Line 244:30: W292 no newline at end of file
Line 244:30: W292 no newline at end of file

Line 607:51: F821 undefined name 'np'
Line 607:65: F821 undefined name 'np'
Line 610:47: F821 undefined name 'np'
Line 610:61: F821 undefined name 'np'
Line 611:48: F821 undefined name 'np'
Line 611:62: F821 undefined name 'np'
Line 641:51: F821 undefined name 'np'
Line 641:65: F821 undefined name 'np'
Line 644:47: F821 undefined name 'np'
Line 644:61: F821 undefined name 'np'
Line 645:48: F821 undefined name 'np'
Line 645:62: F821 undefined name 'np'
Line 810:55: F821 undefined name 'np'
Line 810:69: F821 undefined name 'np'
Line 819:55: F821 undefined name 'np'
Line 819:69: F821 undefined name 'np'
Line 822:53: F821 undefined name 'np'
Line 822:67: F821 undefined name 'np'
Line 831:55: F821 undefined name 'np'
Line 831:69: F821 undefined name 'np'
Line 842:55: F821 undefined name 'np'
Line 842:69: F821 undefined name 'np'
Line 845:51: F821 undefined name 'np'
Line 845:65: F821 undefined name 'np'
Line 846:52: F821 undefined name 'np'
Line 846:66: F821 undefined name 'np'
Line 855:55: F821 undefined name 'np'
Line 855:69: F821 undefined name 'np'
Line 858:51: F821 undefined name 'np'
Line 858:65: F821 undefined name 'np'
Line 859:52: F821 undefined name 'np'
Line 859:66: F821 undefined name 'np'
Line 867:55: F821 undefined name 'np'
Line 867:69: F821 undefined name 'np'
Line 870:53: F821 undefined name 'np'
Line 870:67: F821 undefined name 'np'
Line 878:55: F821 undefined name 'np'
Line 878:69: F821 undefined name 'np'
Line 888:55: F821 undefined name 'np'
Line 888:69: F821 undefined name 'np'
Line 891:51: F821 undefined name 'np'
Line 891:65: F821 undefined name 'np'
Line 892:52: F821 undefined name 'np'
Line 892:66: F821 undefined name 'np'
Line 900:55: F821 undefined name 'np'
Line 900:69: F821 undefined name 'np'
Line 903:51: F821 undefined name 'np'
Line 903:65: F821 undefined name 'np'
Line 904:52: F821 undefined name 'np'
Line 904:66: F821 undefined name 'np'

Line 12:1: E402 module level import not at top of file

Line 249:1: W391 blank line at end of file

Comment last updated at 2023-09-21 15:22:57 UTC

Copy link
Collaborator

@valer1435 valer1435 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вроде уже близко

fedot/core/composer/gp_composer/specific_operators.py Outdated Show resolved Hide resolved
mutable_node = choice(mutable_candidates)

replaced_node_index = pipeline.nodes.index(mutable_node)
replaced_node = pipeline.nodes[replaced_node_index]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вроде тут replaced_node == mutable_node/ Смысл выбирать replaced_node?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@valer1435 возможно, попробую тогда убрать

bagging_node = 'bag_' + mutable_node.name
new_node = PipelineNode(operation_type=bagging_node, params=new_params)

new_node = PipelineBuilder().add_node(bag_model, params=bag_params).build().nodes[0]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше создать просто PipelineNode без пайплайна.

Copy link
Collaborator Author

@aPovidlo aPovidlo Mar 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@valer1435 не работает так, потому что он параметры не принимает

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

И правда. Но можно сделать так
new_node=PipelineNode('bag_node)
new_node.parameters = bag_params

Мне кажется выглядит логичнее и проще

@@ -85,6 +85,9 @@ def _set_operation_params(self, operation_type, params):
params = get_default_params(operation_type)
elif isinstance(params, dict):
params = OperationParameters.from_operation_type(operation_type, **params)
elif isinstance(params, OperationParameters):
if params.get('model_params') or params.get('bagging_params'):
params = OperationParameters.from_operation_type(operation_type, **(params.to_dict()))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Если и так приходит OperationParams, зачем его создавать заново?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@valer1435 при мутации мы передаем параметры из ноды модели уже в OperationParameters(...). Но в нем отсутствует bagging_params, поэтому необходимо подтянуть дефолтные

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Поясни пж смысл условия наличия параметров модели ИЛИ наличия бэггинг параметров?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ну если где-то они будут отсутствовать или в model_params, или в bagging_params, или в обеих, то взять дефолтные

Copy link
Collaborator

@valer1435 valer1435 Apr 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Поправь, если не прав, но тогда условие должно выглядеть так: if not (params.get('model_params') and params.get('bagging_params')): ?

@valer1435
Copy link
Collaborator

  1. Я мб пропустил, но где-то бэггинг мутация в процессе автоматической работы федота используется?

  2. Для тестов стоит подобрать более простые модели или уменьшить значение параметров. Видимо долго работает

@aPovidlo
Copy link
Collaborator Author

aPovidlo commented Apr 3, 2023

  1. Я мб пропустил, но где-то бэггинг мутация в процессе автоматической работы федота используется?
  1. Пока еще не добавлял ее в дефолтные мутации, или какие-либо параметры для запуска в автоматической режиме работы
  1. Для тестов стоит подобрать более простые модели или уменьшить значение параметров. Видимо долго работает
  1. Данная очевидность уже обсуждалась. Сейчас и так подобранны минимальные значения параметров. Хотелось бы проверять все модели, но возможно стоит ограничится только 'dt', т.к. раз на раз бывает превышения времени выполнения тестов

Copy link
Collaborator

@valer1435 valer1435 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тогда можно перенести в интеграционники тест со всеми моделями, а в юнит оставить только dt

@@ -85,6 +85,9 @@ def _set_operation_params(self, operation_type, params):
params = get_default_params(operation_type)
elif isinstance(params, dict):
params = OperationParameters.from_operation_type(operation_type, **params)
elif isinstance(params, OperationParameters):
if params.get('model_params') or params.get('bagging_params'):
params = OperationParameters.from_operation_type(operation_type, **(params.to_dict()))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Поясни пж смысл условия наличия параметров модели ИЛИ наличия бэггинг параметров?

Refactoring into SkLearn bagging method

Reviewers fixes, separates to classes and tests fixes

ensemble implementation first step

ensemble, stacking and bagging implementation

methods were integrated to Fedot

Refactoring, added splitter, attempting to integrate ensemble selection method

minor changes to experiment

Refactoring into SkLearn bagging method

Added bagging models and edited tests
fixes after rebase

Fixes after rebase, adding bagging mutation and test

pep8 bot review's fix

Editing params setting and fix test

test fix

added bagging_allowed tag for models

deleting unnecessary method
@pep8speaks
Copy link

pep8speaks commented Sep 21, 2023

Hello @aPovidlo! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 1:1: F401 'copy' imported but unused
Line 2:1: F401 'time' imported but unused
Line 26:121: E501 line too long (127 > 120 characters)

Line 7:1: F401 'joblib.cpu_count' imported but unused
Line 78:62: F541 f-string is missing placeholders
Line 183:26: W292 no newline at end of file

Line 3:1: F401 'lightgbm.LGBMClassifier' imported but unused
Line 4:1: F401 'catboost.CatBoostClassifier' imported but unused
Line 9:1: F401 'fedot.core.operations.evaluation.bagging_kfold.KFoldBaggingClassifier' imported but unused
Line 10:1: F401 'fedot.core.pipelines.pipeline.Pipeline' imported but unused
Line 13:1: F401 'fedot.core.repository.operation_types_repository.OperationTypesRepository' imported but unused
Line 16:1: F401 'test.unit.pipelines.test_decompose_pipelines.get_classification_data' imported but unused
Line 146:1: E303 too many blank lines (3)
Line 156:48: E261 at least two spaces before inline comment
Line 161:52: E261 at least two spaces before inline comment
Line 166:48: E261 at least two spaces before inline comment
Line 171:48: E261 at least two spaces before inline comment
Line 176:50: E261 at least two spaces before inline comment
Line 181:48: E261 at least two spaces before inline comment
Line 223:5: F841 local variable 'y_hat_m' is assigned to but never used
Line 225:121: E501 line too long (129 > 120 characters)
Line 244:30: W292 no newline at end of file
Line 244:30: W292 no newline at end of file
Line 244:30: W292 no newline at end of file

Line 607:51: F821 undefined name 'np'
Line 607:65: F821 undefined name 'np'
Line 610:47: F821 undefined name 'np'
Line 610:61: F821 undefined name 'np'
Line 611:48: F821 undefined name 'np'
Line 611:62: F821 undefined name 'np'
Line 641:51: F821 undefined name 'np'
Line 641:65: F821 undefined name 'np'
Line 644:47: F821 undefined name 'np'
Line 644:61: F821 undefined name 'np'
Line 645:48: F821 undefined name 'np'
Line 645:62: F821 undefined name 'np'
Line 810:55: F821 undefined name 'np'
Line 810:69: F821 undefined name 'np'
Line 819:55: F821 undefined name 'np'
Line 819:69: F821 undefined name 'np'
Line 822:53: F821 undefined name 'np'
Line 822:67: F821 undefined name 'np'
Line 831:55: F821 undefined name 'np'
Line 831:69: F821 undefined name 'np'
Line 842:55: F821 undefined name 'np'
Line 842:69: F821 undefined name 'np'
Line 845:51: F821 undefined name 'np'
Line 845:65: F821 undefined name 'np'
Line 846:52: F821 undefined name 'np'
Line 846:66: F821 undefined name 'np'
Line 855:55: F821 undefined name 'np'
Line 855:69: F821 undefined name 'np'
Line 858:51: F821 undefined name 'np'
Line 858:65: F821 undefined name 'np'
Line 859:52: F821 undefined name 'np'
Line 859:66: F821 undefined name 'np'
Line 867:55: F821 undefined name 'np'
Line 867:69: F821 undefined name 'np'
Line 870:53: F821 undefined name 'np'
Line 870:67: F821 undefined name 'np'
Line 878:55: F821 undefined name 'np'
Line 878:69: F821 undefined name 'np'
Line 888:55: F821 undefined name 'np'
Line 888:69: F821 undefined name 'np'
Line 891:51: F821 undefined name 'np'
Line 891:65: F821 undefined name 'np'
Line 892:52: F821 undefined name 'np'
Line 892:66: F821 undefined name 'np'
Line 900:55: F821 undefined name 'np'
Line 900:69: F821 undefined name 'np'
Line 903:51: F821 undefined name 'np'
Line 903:65: F821 undefined name 'np'
Line 904:52: F821 undefined name 'np'
Line 904:66: F821 undefined name 'np'

Line 249:1: W391 blank line at end of file

Comment last updated at 2023-10-19 09:18:20 UTC

aPovidlo added a commit that referenced this pull request Oct 17, 2023
Taking out Catboost model from SkLearnEvaluationStrategy into separate Boosting class strategy.

New features for CatBoost:

Converting data into Pool;
Fitting with eval_set, early_stopping_rounds and best_model;
Defining categoricat features for model;
Ploting features importances;
Saving/Loading model (required for implementation in Bagging method implementation to FEDOT #1005);
Updated search space.
Updates in data, preprocessing and data_split:

Storing not encoded categorical features (into OHE or LE) and using it where necessary;
Storing positions for different types of data (numeric, category and encoded);
Storing features names of dataset.
@nicl-nno
Copy link
Collaborator

nicl-nno commented May 7, 2024

Closed as obsolete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture (re)design of existing or new framework subsystem in progress task in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants