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 RollingAggregation
argMax()
Index of max element.static RollingAggregation
argMin()
Index of min element.static RollingAggregation
Collect the values into a list.static RollingAggregation
collectList
(NullPolicy nullPolicy) Collect the values into a list.static RollingAggregation
Collect the values into a set.static RollingAggregation
collectSet
(NullPolicy nullPolicy, NullEquality nullEquality, NaNEquality nanEquality) Collect the values into a set.static RollingAggregation
count()
Count number of valid, a.k.a.static RollingAggregation
count
(NullPolicy nullPolicy) Count number of elements.boolean
int
hashCode()
static RollingAggregation
lag
(int offset) In a rolling window return the value offset entries behind or null if it is outside of the window.static RollingAggregation
lag
(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 RollingAggregation
lead
(int offset) In a rolling window return the value offset entries ahead or null if it is outside of the window.static RollingAggregation
lead
(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 RollingAggregation
max()
Rolling Window Maxstatic RollingAggregation
mean()
Arithmetic Meanstatic RollingAggregation
min()
Rolling Window Minstatic RollingAggregation
nth
(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 RollingAggregation
Get the row number.static RollingAggregation
Rolling Window Standard Deviation with 1 as delta degrees of freedom(DDOF).static RollingAggregation
standardDeviation
(int ddof) Rolling Window Standard Deviation with configurable delta degrees of freedom(DDOF).static RollingAggregation
sum()
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
-