Operation¶
-
class
fedot.core.operations.operation.
Operation
(operation_type, log=None, **kwargs)¶ Bases:
object
Base class for operations in nodes. Operations could be machine learning (or statistical) models or data operations
- Parameters
operation_type (str) – name of the operation
log (Optional[fedot.core.log.Log]) – Log object to record messages
-
description
(operation_params)¶ - Parameters
operation_params (dict) –
- Return type
str
-
property
acceptable_task_types
¶
-
property
metadata
¶
-
fit
(params, data, is_fit_pipeline_stage=True)¶ This method is used for defining and running of the evaluation strategy to train the operation with the data provided
- Parameters
params (Union[str, dict, None]) – hyperparameters for operation
data (fedot.core.data.data.InputData) – data used for operation training
is_fit_pipeline_stage (bool) – is this fit or predict stage for pipeline
- Returns
tuple of trained operation and prediction on train data
-
predict
(fitted_operation, data, is_fit_pipeline_stage, params=None, output_mode='default')¶ This method is used for defining and running of the evaluation strategy to predict with the data provided
- Parameters
fitted_operation – trained operation object
data (fedot.core.data.data.InputData) – data used for prediction
is_fit_pipeline_stage (bool) – is this fit or predict stage for pipeline
params (Union[str, dict, None]) – hyperparameters for operation
output_mode (str) – string with information about output of operation,
for example, is the operation predict probabilities or class labels
-
abstract static
assign_tabular_column_types
(output_data, output_mode)¶ Assign types for columns based on task and output_mode (for classification) For example, pipeline for solving time series forecasting task contains lagged and ridge operations. ts_type -> lagged -> tabular type. So, there is a need to assign column types to new data
- Parameters
output_data (fedot.core.data.data.OutputData) –
output_mode (str) –
- Return type
Model¶
-
class
fedot.core.operations.model.
Model
(operation_type, log=None)¶ Bases:
fedot.core.operations.operation.Operation
Class with fit/predict methods defining the evaluation strategy for the task
- Parameters
operation_type (str) – name of the model
log (Optional[fedot.core.log.Log]) – Log object to record messages
-
static
assign_tabular_column_types
(output_data, output_mode)¶ Assign types for tabular data obtained from model predictions. By default, all types of model predictions for tabular data can be clearly defined
- Parameters
output_data (fedot.core.data.data.OutputData) –
output_mode (str) –
- Return type
Data operation¶
-
class
fedot.core.operations.data_operation.
DataOperation
(operation_type, log=None)¶ Bases:
fedot.core.operations.operation.Operation
Class with fit/predict methods defining the evaluation strategy for the task
- Parameters
operation_type (str) – name of the data operation
log (Optional[fedot.core.log.Log]) – Log object to record messages
-
property
metadata
¶
-
static
assign_tabular_column_types
(output_data, output_mode)¶ Assign new column types if it necessary. By default, all data operations must define column types at lower levels (EvalStrategies and Implementations). In some cases the previously defined data types are passed.
- Parameters
output_data (fedot.core.data.data.OutputData) –
output_mode (str) –
- Return type