class NormalizationPreprocessor implements Preprocessor<K, V>, DeployableObject {

    @Override public LabeledVector apply(K k, V v) {
        LabeledVector res = basePreprocessor.apply(k, v);

        double pNorm = Math.pow(foldMap(res.features(), Functions.PLUS, Functions.pow(p), 0d), 1.0 / p);

        for (int i = 0; i < res.size(); i++)
            res.set(i, res.get(i) / pNorm);

        return res;
    }

    public  NormalizationPreprocessor(int p, Preprocessor<K, V> basePreprocessor);

}