src.utils.preds.mean_pred_reduce_strategy

Classes

MeanPredReduceStrategy(**kwargs)

class src.utils.preds.mean_pred_reduce_strategy.MeanPredReduceStrategy(**kwargs)
Author:

Alberto M. Esmoris Pena

Reduce many predictions per point to a single one by taking the mean value.

The reduced prediction for the \(j-th\) class of the \(i\)-th point will be as shown below, assuming \(K\) values for the reduction.

\[z_{ij} = \dfrac{1}{K} \sum_{k=1}^{K}{z_{ijk}}\]

See PredReduceStrategy.

__init__(**kwargs)

Initialize/instantiate a mean prediction reduction strategy.

Parameters:

kwargs – The attributes for the MeanPredReduceStrategy.

reduce(reducer, npoints, nvals, Z, I)

See PredReduceStrategy and PredReduceStrategy.reduce().