# Namespace Regularization¶

namespace regularization

Functions

af::array groupBy(af::array in, af::array (*aggregationFunction)(const af::array&, bool, const dim_t), int nColumnsKey = 1, int nColumnsValue = 1, )

Group by operation in the input array using nColumnsKey columns as group keys and nColumnsValue columns as values. The data is expected to be sorted. The aggregation function determines the operation to aggregate the values.

Return
af::array Array with the values of the group keys aggregated using the aggregationFunction.
Parameters
• in: Input array containing the keys and values to operate with.
• aggregationFunction: This param determines the operation aggregating the values.
• nColumnsKey: Number of columns conforming the key.
• nColumnsValue: Number of columns conforming the value (they are expected to be consecutive to the column keys).

af::array groupBy(af::array in, af::array (*aggregationFunction)(const af::array&, const int), int nColumnsKey = 1, int nColumnsValue = 1, )

Group by operation in the input array using nColumnsKey columns as group keys and nColumnsValue columns as values. The data is expected to be sorted. The aggregation function determines the operation to aggregate the values.

Return
af::array Array with the values of the group keys aggregated using the aggregationFunction.
Parameters
• in: Input array containing the keys and values to operate with.
• aggregationFunction: This param determines the operation aggregating the values.
• nColumnsKey: Number of columns conforming the key.
• nColumnsValue: Number of columns conforming the value (they are expected to be consecutive to the column keys).

af::array groupBy(af::array in, af::array (*aggregationFunction)(const af::array&, const dim_t), int nColumnsKey = 1, int nColumnsValue = 1, )

Group by operation in the input array using nColumnsKey columns as group keys and nColumnsValue columns as values. The data is expected to be sorted. The aggregation function determines the operation to aggregate the values.

Return
af::array Array with the values of the group keys aggregated using the aggregationFunction.
Parameters
• in: Input array containing the keys and values to operate with.
• aggregationFunction: This param determines the operation aggregating the values.
• nColumnsKey: Number of columns conforming the key.
• nColumnsValue: Number of columns conforming the value (they are expected to be consecutive to the column keys).