-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
v1docq
committed
Dec 25, 2023
1 parent
ea8d970
commit c8e465b
Showing
6 changed files
with
130 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from fedot.core.pipelines.pipeline_builder import PipelineBuilder | ||
|
||
|
||
class RAFEnsembler: | ||
def __init__(self, composing_params, ensemble_type: str = 'random_automl_forest'): | ||
problem_dict = {'regression': 'fedot_regr', | ||
'classification': 'fedot_cls'} | ||
ensemble_dict = {'random_automl_forest': self.__raf_ensemle, | ||
'two_stage_kernel': self.__two_stage_kernel | ||
} | ||
self.atomized_automl = problem_dict[composing_params['problem']] | ||
self.ensemble_method = ensemble_dict[ensemble_type] | ||
self.atomized_automl_params = composing_params | ||
|
||
def fit(self, train_data): | ||
pass | ||
|
||
def predict(self, test_data): | ||
pass | ||
|
||
def __raf_ensemble(self, chunks): | ||
raf_ensemble = PipelineBuilder() | ||
for i in range(chunks): | ||
raf_ensemble.add_node(self.atomized_automl, params=self.atomized_automl_params, branch_idx=i) | ||
raf_ensemble.join_branches('logit') | ||
return raf_ensemble |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters