Nyoka's Pre-Processing Module¶
Lag(aggregation, value=1, copy=True)¶
The Lag class takes value number of previous record of the fields where it is applied and applies aggregation to those values.
- aggregation (String) – aggregation type. The valid types are [“min”, “max”, “sum”, “avg”, “median”, “product”, “stddev”]
- value (Integer (default = 1)) – The number of previous record to aggregate
Returns: Return type: The same object
Trasforms the given X by taking value number of previous records and applying aggregation method
- X (Pandas DataFrame or numpy array) – The input data
- y – It is ignored.
Returns: Return type:
Transformed X as numpy array