- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {SimpleDateFormat s =
String pattern;new SimpleDateFormat(pattern)
String template;Locale locale;new SimpleDateFormat(template, locale)
new SimpleDateFormat()
- Smart code suggestions by Codota
}
@Override public List<OutputField> registerOutputFields(Label label, SparkMLEncoder encoder){ MultilayerPerceptronClassificationModel model = getTransformer(); List<OutputField> result = super.registerOutputFields(label, encoder); if(!(model instanceof HasProbabilityCol)){ CategoricalLabel categoricalLabel = (CategoricalLabel)label; result = new ArrayList<>(result); result.addAll(ModelUtil.createProbabilityFields(DataType.DOUBLE, categoricalLabel.getValues())); } return result; }
@Override public List<OutputField> registerOutputFields(Label label, SparkMLEncoder encoder){ List<OutputField> result = super.registerOutputFields(label, encoder); MiningFunction miningFunction = getMiningFunction(); switch(miningFunction){ case CLASSIFICATION: CategoricalLabel categoricalLabel = (CategoricalLabel)label; result = new ArrayList<>(result); result.addAll(ModelUtil.createProbabilityFields(DataType.DOUBLE, categoricalLabel.getValues())); break; default: break; } return result; }
CategoricalLabel categoricalLabel = (CategoricalLabel)label; List<OutputField> predictProbaFields = ModelUtil.createProbabilityFields(DataType.DOUBLE, categoricalLabel.getValues());