jpmml / jpmml-evaluator-spark

PMML evaluator library for the Apache Spark cluster computing system (http://spark.apache.org/)
GNU Affero General Public License v3.0
94 stars 43 forks source link

Simple prediction mode #28

Open vruusmann opened 5 years ago

vruusmann commented 5 years ago

The PMML transformer currently operates in "appending" mode - the Transformer#transform(Dataset<Row>) method appends prediction columns to the input dataset.

The "appending mode" appears to be Apache Spark convention. However, in some situations (eg. demonstration purposes) it might be desirable to operate in "simple" (aka "standalone") mode - the transform method creates a new dataset that only contains prediction columns.

Could be easily achieved by introducing a TransformerBuilder#setTransformationMode(Mode.APPENDING|Mode.STANDALONE) configuration method.