class WeightedPredictionsAggregator implements PredictionsAggregator {

    @Override public Double apply(double[] answers) {
        A.ensure(answers.length == weights.length,
            "Composition vector must have same size as weights vector");

        double res = bias;

        for (int i = 0; i < answers.length; i++)
            res += weights[i] * answers[i];

        return res;
    }

    public  WeightedPredictionsAggregator(double[] weights);
    public  WeightedPredictionsAggregator(double[] weights, double bias);

}