Compiled Model to Jar Writer

Writes the compiled Java code generated by a PMML Compiler node into a jar file on disk. To use the contained model the class MainModel has to be used. It provides multiple helper methods to find out how to pass arguments and how to interpret the result:

  • getMiningFunction(): Returns either "regression", "clustering" or "classification"
  • getOutputFields(): Returns an string array of names of the output fields. The first field is always the prediction, subsequent fields contain class probabilities if the mining function is "classification".
  • getInputFields(): Returns an string array with the names of expected input fields.
  • getNumInputs(): Returns the number of required inputs.
  • getInputFieldIndex(String fieldName): Returns the expected index in the input array for a given input field name.
To retrieve a prediction, the method MainModel.evaluate() has to be called. It requires an object array with the inputs, in the order as specified by getInputFieldIndex(). The result is an object array where the first item is of type String if the mining function is "clustering" or "classification" and Double otherwise. Subsequent fields contain class probabilities and therefore always have the type Double.

Options

File
The location and name of the file to be written.
Overwrite
If checked any existing file with the given name will be overwritten.

Input Ports

Icon
The bytecode of the compiled model

Output Ports

This node has no output ports

Popular Predecessors

Popular Successors

  • No recommendations found

Views

This node has no views

Workflows

  • No workflows found

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.