Hub
Pricing About
NodeNode / Sink

Compiled Model to Jar Writer

KNIME LabsPMMLPMML TranslationPMML to Java
Drag & drop
Like

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.

Node details

Input ports
  1. Type: Compiled PMML
    Compiled Model
    The bytecode of the compiled model

Extension

The Compiled Model to Jar Writer node is part of this extension:

  1. Go to item

Related workflows & nodes

  1. Go to item
  2. Go to item
  3. Go to item

KNIME
Open for Innovation

KNIME AG
Talacker 50
8001 Zurich, Switzerland
  • Software
  • Getting started
  • Documentation
  • Courses + Certification
  • Solutions
  • KNIME Hub
  • KNIME Forum
  • Blog
  • Events
  • Partner
  • Developers
  • KNIME Home
  • Careers
  • Contact us
Download KNIME Analytics Platform Read more about KNIME Business Hub
© 2025 KNIME AG. All rights reserved.
  • Trademarks
  • Imprint
  • Privacy
  • Terms & Conditions
  • Data Processing Agreement
  • Credits