Module ktrain.preprocessor

Expand source code
from .imports import *


class Preprocessor(ABC):
    """
    ```
    Abstract class to preprocess data
    ```
    """

    @abstractmethod
    def get_preprocessor(self):
        pass

    @abstractmethod
    def get_classes(self):
        pass

    @abstractmethod
    def preprocess(self):
        pass

    def undo(self, data_instance):
        return data_instance

Classes

class Preprocessor
Abstract class to preprocess data
Expand source code
class Preprocessor(ABC):
    """
    ```
    Abstract class to preprocess data
    ```
    """

    @abstractmethod
    def get_preprocessor(self):
        pass

    @abstractmethod
    def get_classes(self):
        pass

    @abstractmethod
    def preprocess(self):
        pass

    def undo(self, data_instance):
        return data_instance

Ancestors

  • abc.ABC

Subclasses

Methods

def get_classes(self)
Expand source code
@abstractmethod
def get_classes(self):
    pass
def get_preprocessor(self)
Expand source code
@abstractmethod
def get_preprocessor(self):
    pass
def preprocess(self)
Expand source code
@abstractmethod
def preprocess(self):
    pass
def undo(self, data_instance)
Expand source code
def undo(self, data_instance):
    return data_instance