use of org.knime.core.util.binning.auto.pmml.PMMLPreprocDiscretize in project knime-core by knime.
the class AutoBinnerUtility method createDisretizeOp.
private static PMMLPreprocDiscretize createDisretizeOp(final AutoBinnerLearnSettings settings, final Map<String, double[]> edgesMap, final String[] includeCols) {
final Map<String, List<PMMLDiscretizeBin>> binMap = createBins(settings, edgesMap, includeCols);
final List<String> names = new ArrayList<String>();
final Map<String, PMMLDiscretize> discretize = new HashMap<String, PMMLDiscretize>();
for (String target : includeCols) {
final String binnedCol = settings.getReplaceColumn() ? target : target + " [Binned]";
names.add(binnedCol);
discretize.put(binnedCol, new PMMLDiscretize(target, binMap.get(target)));
}
final DisretizeConfiguration config = new DisretizeConfiguration(names, discretize);
return new PMMLPreprocDiscretize(config);
}
Aggregations