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

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

        assert res.size() == imputingValues.size();

        for (int i = 0; i < res.size(); i++) {
            if (Double.valueOf(res.get(i)).equals(Double.NaN))
                res.set(i, imputingValues.get(i));
        }
        return res;
    }

    public  ImputerPreprocessor(Vector imputingValues,
                               Preprocessor<K, V> basePreprocessor);

}