nirs4all.operators.models.base module

Base classes for model operators.

This module defines the abstract base classes for model operators used in nirs4all pipelines.

class nirs4all.operators.models.base.BaseModelOperator[source]

Bases: ABC

Abstract base class for all model operators.

Model operators are building blocks in pipelines that represent machine learning models (sklearn, tensorflow, pytorch, etc.).

The actual execution logic is handled by corresponding controllers in the nirs4all.controllers.models module.

abstractmethod get_controller_type() str[source]

Return the type of controller that handles this operator.

Returns:

Controller type identifier (e.g., ‘sklearn’, ‘tensorflow’, ‘pytorch’)

Return type:

str

abstractmethod get_params(deep: bool = True) Dict[str, Any][source]

Get parameters for this operator.

Parameters:

deep (bool, default=True) – If True, will return the parameters for this operator and contained subobjects that are estimators.

Returns:

Parameter names mapped to their values.

Return type:

dict

abstractmethod set_params(**params) BaseModelOperator[source]

Set the parameters of this operator.

Parameters:

**params (dict) – Operator parameters.

Returns:

self – Operator instance.

Return type:

BaseModelOperator