class fedot.core.composer.composer.ComposerRequirements(primary, secondary, timeout=datetime.timedelta(seconds=300), max_pipeline_fit_time=None, max_depth=3, max_arity=2, min_arity=2, cv_folds=None, advisor=<fedot.core.composer.advisor.PipelineChangeAdvisor object>)

Bases: object

This dataclass is for defining the requirements of composition process

Attribute primary

List of operation types (str) for Primary Nodes

Attribute secondary

List of operation types (str) for Secondary Nodes

Attribute timeout

max time in minutes available for composition process

Attribute max_depth

max depth of the result pipeline

Attribute max_pipeline_fit_time

time constraint for operation fitting (minutes)

Attribute max_arity

maximal number of parent for node

Attribute min_arity

minimal number of parent for node

Attribute cv_folds

integer or None to use cross validation

  • primary (List[str]) –

  • secondary (List[str]) –

  • timeout (Optional[datetime.timedelta]) –

  • max_pipeline_fit_time (Optional[datetime.timedelta]) –

  • max_depth (int) –

  • max_arity (int) –

  • min_arity (int) –

  • cv_folds (Optional[int]) –

  • advisor (Optional[fedot.core.composer.advisor.PipelineChangeAdvisor]) –

Return type


primary: List[str] = None
secondary: List[str] = None
timeout: Optional[datetime.timedelta] = datetime.timedelta(seconds=300)
max_pipeline_fit_time: Optional[datetime.timedelta] = None
max_depth: int = 3
max_arity: int = 2
min_arity: int = 2
cv_folds: Optional[int] = None
advisor: Optional[fedot.core.composer.advisor.PipelineChangeAdvisor] = <fedot.core.composer.advisor.PipelineChangeAdvisor object>
class fedot.core.composer.composer.Composer(optimiser, composer_requirements, initial_pipelines=None, logger=None)

Bases: abc.ABC

Base class used for receiving composite operations via optimization :param optimiser: optimiser generated in ComposerBuilder :param composer_requirements: requirements for composition process :param initial_pipelines: defines the initial state of the population. If None then initial population is random. :param logger: optional parameter for log oject

abstract compose_pipeline(data)

Run composition process for optimal pipeline structure search. :param data: Data used for problem solving. :return: Best composed pipeline or pipelines.

For single-objective optimization – the best pipeline. For multi-objective optimization – a list of the best pipelines is returned. Returned pipelines are ordered by the descending primary metric (the first is the best).

Parameters] data (Union[,) –

Return type

Union[fedot.core.pipelines.pipeline.Pipeline, List[fedot.core.pipelines.pipeline.Pipeline]]