Python* API Reference for Intel® Data Analytics Acceleration Library 2020 Update 1
Base class for feature modifier, intended for inheritance from the user side. More...
Public Member Functions | |
def | __init__ |
def | getNumberOfOutputFeatures |
def | apply |
def __init__ | ( | self, | |
noof = 0 , |
|||
nor = 1 |
|||
) |
Create a new Modifier.
noof | Number of output features, if > 0 it takes precedence over getNumberOfOutputFeatures |
nor | Number of rows to get processed in a chunk (in apply). Initially calls to apply might get smaller chunks, but they will never be greater than nor. |
def apply | ( | self, | |
tokens | |||
) |
Applies the modifier. Overwrite this with your modification logic. This method gets called for a chunk input rows and might be called more than once. It is expected to return as many results as it was provided with rows. The number of values in each result must be identical for all results and can be provided in the constructor or by overwriting getNumberOfOutputFeatures.
tokens | A python list of tuples, each tuple represents one input row. The number of tuples is set/limited by the constructor. Each element in the tuple is a string value as read from data source. (like [("red", "1"),("blue", "2")] |
def getNumberOfOutputFeatures | ( | self | ) |
Overwrite this to provide the number of output features (identical or each row). Gets overwritten by value provided by constructor if that's > 0.
For more complete information about compiler optimizations, see our Optimization Notice.