Skip to content

API: preprocessing.base

skyulf.preprocessing.base

BaseApplier

Bases: ABC

Source code in skyulf-core\skyulf\preprocessing\base.py
24
25
26
27
28
29
30
31
32
class BaseApplier(ABC):
    @abstractmethod
    def apply(
        self, df: Union[pd.DataFrame, SkyulfDataFrame, tuple], params: Dict[str, Any]
    ) -> Union[pd.DataFrame, SkyulfDataFrame, tuple, SplitDataset]:
        """
        Applies the transformation using fitted parameters.
        """
        pass

apply(df, params) abstractmethod

Applies the transformation using fitted parameters.

Source code in skyulf-core\skyulf\preprocessing\base.py
25
26
27
28
29
30
31
32
@abstractmethod
def apply(
    self, df: Union[pd.DataFrame, SkyulfDataFrame, tuple], params: Dict[str, Any]
) -> Union[pd.DataFrame, SkyulfDataFrame, tuple, SplitDataset]:
    """
    Applies the transformation using fitted parameters.
    """
    pass

BaseCalculator

Bases: ABC

Source code in skyulf-core\skyulf\preprocessing\base.py
12
13
14
15
16
17
18
19
20
21
class BaseCalculator(ABC):
    @abstractmethod
    def fit(
        self, df: Union[pd.DataFrame, SkyulfDataFrame, tuple], config: Dict[str, Any]
    ) -> Dict[str, Any]:
        """
        Calculates parameters from the training data.
        Returns a dictionary of fitted parameters (serializable).
        """
        pass

fit(df, config) abstractmethod

Calculates parameters from the training data. Returns a dictionary of fitted parameters (serializable).

Source code in skyulf-core\skyulf\preprocessing\base.py
13
14
15
16
17
18
19
20
21
@abstractmethod
def fit(
    self, df: Union[pd.DataFrame, SkyulfDataFrame, tuple], config: Dict[str, Any]
) -> Dict[str, Any]:
    """
    Calculates parameters from the training data.
    Returns a dictionary of fitted parameters (serializable).
    """
    pass