Node
- class fedot.core.pipelines.node.NodeMetadata(metric=None)[source]
Bases:
object
Dataclass.
PipelineNode
metadata- Parameters
metric (Optional[float]) – quality score
- Return type
None
- metric: Optional[float] = None
- class fedot.core.pipelines.node.PipelineNode(operation_type=None, nodes_from=None, node_data=None, **kwargs)[source]
Bases:
golem.core.dag.linked_graph_node.LinkedGraphNode
The class defines the interface of nodes modifying tha data flow in the
Pipeline
- Parameters
operation_type (Optional[Union[str, Operation]]) – operation defined in the operation repository
nodes_from (Optional[List[PipelineNode]]) – parent nodes where data comes from
node_data (Optional[dict]) –
dict
withInputData
for fit and predict stagekwargs – optional arguments (i.e. logger)
- property is_primary
- _process_content_init(passed_content)[source]
Updating content in the node
- Parameters
passed_content (dict) –
- Return type
- static _process_direct_init(operation_type)[source]
Define operation based on the direct
operation_type
without defining content in the node
- property name: str
Returns str name of operation
- property fitted_operation: Optional[Any]
Returns already fitted operation if exists or
None
instead- Returns
node fitted operation or
None
- fit(input_data)[source]
Runs training process in the node
- Parameters
input_data (InputData) – data used for operation training
- Returns
values predicted on the provided
input_data
- Return type
- predict(input_data, output_mode='default')[source]
Runs prediction process in the node
- Parameters
input_data (InputData) – data used for prediction
output_mode (str) – desired output for operations (e.g.
'labels'
,'probs'
,'full_probs'
)
- Returns
values predicted on the provided
input_data
- Return type
- get_data_from_node()[source]
Returns data if it was set to the nodes directly
- Returns
dict
withInputData
for fit and predict stage- Return type
dict
- property node_data: dict
Returns directly set
node_data
- Returns
dict
withInputData
for fit and predict stage- Return type
dict
- _input_from_parents(input_data, parent_operation)[source]
Processes all the parent nodes via the current operation using
input_data
- _nodes_from_with_fixed_order()[source]
Sorts
nodes_from
(if exists) by the nodes unique id- Returns
sorted
nodes_from
byGraphNode.descriptive_id
orNone
- property parameters: dict
Returns node custom parameters
- Returns
of custom parameters
- Return type
dict
- __str__()[source]
Returns
str
representation of the node- Returns
string field node operation type
- Return type
str
- property tags: Optional[List[str]]
Returns tags of operation in the node or empty list
- Returns
empty list
if node is of atomized type andlist of tags
otherwise- Return type
Optional[List[str]]
- fedot.core.pipelines.node._combine_parents(parent_nodes, input_data, parent_operation)[source]
Combines predictions from the
parent_nodes
- Parameters
parent_nodes (List[PipelineNode]) – list of parent nodes, from which predictions will be combined
input_data (Optional[InputData]) – input data from pipeline abstraction (source input data)
parent_operation (str) – name of parent operation (
'fit'
or'predict'
)
- Returns
output data list from parent nodes
,target for final pipeline prediction
- Return type
Tuple[List[OutputData], np.array]
- fedot.core.pipelines.node.PrimaryNode
- fedot.core.pipelines.node.SecondaryNode