Package ai.rapids.cudf
Class RollingAggregation
java.lang.Object
ai.rapids.cudf.RollingAggregation
An aggregation that can be used on rolling windows.
-
Method Summary
Modifier and TypeMethodDescriptionstatic RollingAggregationargMax()Index of max element.static RollingAggregationargMin()Index of min element.static RollingAggregationCollect the values into a list.static RollingAggregationcollectList(NullPolicy nullPolicy) Collect the values into a list.static RollingAggregationCollect the values into a set.static RollingAggregationcollectSet(NullPolicy nullPolicy, NullEquality nullEquality, NaNEquality nanEquality) Collect the values into a set.static RollingAggregationcount()Count number of valid, a.k.a.static RollingAggregationcount(NullPolicy nullPolicy) Count number of elements.booleaninthashCode()static RollingAggregationlag(int offset) In a rolling window return the value offset entries behind or null if it is outside of the window.static RollingAggregationlag(int offset, ColumnVector defaultOutput) In a rolling window return the value offset entries behind or the corresponding value from defaultOutput if it is outside of the window.static RollingAggregationlead(int offset) In a rolling window return the value offset entries ahead or null if it is outside of the window.static RollingAggregationlead(int offset, ColumnVector defaultOutput) In a rolling window return the value offset entries ahead or the corresponding value from defaultOutput if it is outside of the window.static RollingAggregationmax()Rolling Window Maxstatic RollingAggregationmean()Arithmetic Meanstatic RollingAggregationmin()Rolling Window Minstatic RollingAggregationnth(int n, NullPolicy nullPolicy) Select the nth element from a specified window.onColumn(int columnIndex) Add a column to the Aggregation so it can be used on a specific column of data.static RollingAggregationGet the row number.static RollingAggregationRolling Window Standard Deviation with 1 as delta degrees of freedom(DDOF).static RollingAggregationstandardDeviation(int ddof) Rolling Window Standard Deviation with configurable delta degrees of freedom(DDOF).static RollingAggregationsum()Rolling Window Sum
-
Method Details
-
onColumn
Add a column to the Aggregation so it can be used on a specific column of data.- Parameters:
columnIndex- the index of the column to operate on.
-
hashCode
public int hashCode() -
equals
-
sum
Rolling Window Sum -
min
Rolling Window Min -
max
Rolling Window Max -
standardDeviation
Rolling Window Standard Deviation with 1 as delta degrees of freedom(DDOF). -
standardDeviation
Rolling Window Standard Deviation with configurable delta degrees of freedom(DDOF). -
count
Count number of valid, a.k.a. non-null, elements. -
count
Count number of elements.- Parameters:
nullPolicy- INCLUDE if nulls should be counted. EXCLUDE if only non-null values should be counted.
-
mean
Arithmetic Mean -
argMax
Index of max element. -
argMin
Index of min element. -
rowNumber
Get the row number. -
lead
In a rolling window return the value offset entries ahead or null if it is outside of the window. -
lead
In a rolling window return the value offset entries ahead or the corresponding value from defaultOutput if it is outside of the window. Note that this does not take any ownership of defaultOutput and the caller mush ensure that defaultOutput remains valid during the life time of this aggregation operation. -
lag
In a rolling window return the value offset entries behind or null if it is outside of the window. -
lag
In a rolling window return the value offset entries behind or the corresponding value from defaultOutput if it is outside of the window. Note that this does not take any ownership of defaultOutput and the caller mush ensure that defaultOutput remains valid during the life time of this aggregation operation. -
collectList
Collect the values into a list. Nulls will be skipped. -
collectList
Collect the values into a list.- Parameters:
nullPolicy- Indicates whether to include/exclude nulls during collection.
-
collectSet
Collect the values into a set. All null values will be excluded, and all nan values are regarded as unique instances. -
collectSet
public static RollingAggregation collectSet(NullPolicy nullPolicy, NullEquality nullEquality, NaNEquality nanEquality) Collect the values into a set.- Parameters:
nullPolicy- Indicates whether to include/exclude nulls during collection.nullEquality- Flag to specify whether null entries within each list should be considered equal.nanEquality- Flag to specify whether NaN values in floating point column should be considered equal.
-
nth
Select the nth element from a specified window.- Parameters:
n- Indicates the index of the element to be selected from the windownullPolicy- Indicates whether null elements are to be skipped, or not
-