Namespace Regularization¶
-
namespace
regularization
¶ Typedefs
-
using
khiva::regularization::AggregationFuncDimT = typedef af::array (*)(const af::array &, const dim_t)
-
using
khiva::regularization::AggregationFuncBoolDimT = typedef af::array (*)(const af::array &, bool, const dim_t)
-
using
khiva::regularization::AggregationFuncInt = typedef af::array (*)(const af::array &, const int)
Functions
-
af::array
groupBy
(const af::array &in, AggregationFuncBoolDimT aggregationFunction, 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
(const af::array &in, AggregationFuncInt aggregationFunction, 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
(const af::array &in, AggregationFuncDimT aggregationFunction, 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).
-
using