Module markov.api.features.engineer_features
Classes
class AbstractTransformation
-
Abstract class for enabling transformation on DataSegments
Ancestors
- abc.ABC
Subclasses
- AddToReferenceColumn
- AggregateNumericFeatures
- MultiplyToReferenceColumn
- UserDefinedCustomTransformation
Methods
def transform(self, data_segment: DataSegment, copy=False, **kwargs) ‑> DataSegment
-
Applies specific transform on the data_segment and returns transformed copy of the DataSegment.
Args
data_segment
:DataSegment
- data_segment to be processed. Note that it is a memory intensive operation.
copy
:bool
- set to true would return a copy, set to False would modify original data_set segment.
**kwargs ():
Returns
DataSegment that has been transformed.
class AddToReferenceColumn
-
Abstract class for enabling transformation on DataSegments
Ancestors
- AbstractTransformation
- abc.ABC
Methods
def transform(self, data_segment: DataSegment, copy=False, **kwargs)
-
Add specified columns to
a
reference column in the DataSegment. Transformation would apply only on numeric columns.Args
data_segment
:DataSegment
- data_segment to be processed. Not that it is a memory intensive operation.
copy (bool):set to true would return a copy, set to False would modify original data_set segment.
Returns
DataSegment With Aggregated Column.
class AggregateNumericFeatures
-
Abstract class for enabling transformation on DataSegments
Ancestors
- AbstractTransformation
- abc.ABC
Methods
def transform(self, data_segment: DataSegment, copy=False, **kwargs)
-
Adds specified values of the columns together to create new features. Transformation would apply only on numeric columns.
Args
data_segment
:DataSegment
- data_segment to be processed. Not that it is a memory intensive operation.
copy (bool):set to true would return a copy, set to False would modify original data_set segment.
Returns
DataSegment With Aggregated Column.
class MultiplyToReferenceColumn
-
Abstract class for enabling transformation on DataSegments
Ancestors
- AbstractTransformation
- abc.ABC
Methods
def transform(self, data_segment: DataSegment, copy: bool = False, **kwargs)
-
Add specified columns to
a
reference column in the DataSegment. Transformation would apply only on numeric columns.Args
data_segment
:DataSegment
- data_segment to be processed. Not that it is a memory intensive operation.
copy (bool):set to true would return a copy, set to False would modify original data_set segment.
Returns
DataSegment With Aggregated Column.
class UserDefinedCustomTransformation
-
Provide a custom function that should be applied to specified columns of the data_set set
Ancestors
- AbstractTransformation
- abc.ABC
Methods
def transform(self, data_segment: DataSegment, copy=False, **kwargs)
-
Applies user specified custom transforms on the data_segment and returns transformed copy of the DataSegment.
Args
data_segment
:DataSegment
- data_segment to be processed. Note that it is a memory intensive operation.
copy
:bool
- set to true would return a copy, set to False would modify original data_set segment.
**kwargs ():
Returns
DataSegment that has been transformed.