Python* API Reference for Intel® Data Analytics Acceleration Library 2020 Update 1

Public Member Functions | List of all members
FeatureModifier Class Reference

Base class for feature modifier, intended for inheritance from the user side. More...

Public Member Functions

def __init__
 
def getNumberOfOutputFeatures
 
def apply
 

Detailed Description

Constructor & Destructor Documentation

def __init__ (   self,
  noof = 0,
  nor = 1 
)

Create a new Modifier.

Parameters
noofNumber of output features, if > 0 it takes precedence over getNumberOfOutputFeatures
norNumber 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.

Member Function Documentation

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.

Parameters
tokensA 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")]
Returns
A Python sequence of sequences of floats like [2.2,3.3]
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.

Returns
The number of input features

The documentation for this class was generated from the following file:

For more complete information about compiler optimizations, see our Optimization Notice.