org.knime.base.node.mine.regression
Class PMMLRegressionPortObject

java.lang.Object
  extended by org.knime.core.node.port.pmml.PMMLPortObject
      extended by org.knime.base.node.mine.regression.PMMLRegressionPortObject
All Implemented Interfaces:
PortObject

public final class PMMLRegressionPortObject
extends PMMLPortObject

This class wraps a PMML regression model that can then be transferred from one node to the other.

Author:
Bernd Wiswedel, University of Konstanz

Nested Class Summary
static class PMMLRegressionPortObject.NumericPredictor
          This class represents a single numeric predictor with its name (usually the column name it is responsible for), the exponent and the coefficient.
static class PMMLRegressionPortObject.RegressionTable
          This table wraps a polynomial regression formula for use inside a PMML model.
 
Nested classes/interfaces inherited from interface org.knime.core.node.port.PortObject
PortObject.PortObjectSerializer<T extends PortObject>
 
Field Summary
static PortType TYPE
          The port object's type.
 
Fields inherited from class org.knime.core.node.port.pmml.PMMLPortObject
CDATA, DATA_DICT, DATA_FIELD, PMML_V3_0, PMML_V3_1, PMML_V3_2, VALUE
 
Constructor Summary
PMMLRegressionPortObject()
           
PMMLRegressionPortObject(PMMLPortObjectSpec spec, PMMLRegressionContentHandler p)
          Creates a new PMML port object for polynomial regression.
 
Method Summary
 String getModelName()
           
 PMMLRegressionPortObject.RegressionTable getRegressionTable()
           
 String getSummary()
          Get a short summary of this PortObject.
 String getTargetVariableName()
           
 void loadFrom(PMMLPortObjectSpec spec, InputStream stream, String version)
          
protected  void writePMMLModel(TransformerHandler handler)
          
 
Methods inherited from class org.knime.core.node.port.pmml.PMMLPortObject
addPMMLContentHandler, getLocalSchemaLocation, getModelType, getPMMLContentHandler, getPortObjectSerializer, getSpec, getViews, save
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE

public static final PortType TYPE
The port object's type.

Constructor Detail

PMMLRegressionPortObject

public PMMLRegressionPortObject()

PMMLRegressionPortObject

public PMMLRegressionPortObject(PMMLPortObjectSpec spec,
                                PMMLRegressionContentHandler p)
Creates a new PMML port object for polynomial regression.

Parameters:
spec - the objects spec
p - the content handler that receives SAX parsing events upon reading a PMML model
Method Detail

writePMMLModel

protected void writePMMLModel(TransformerHandler handler)
                       throws SAXException

Specified by:
writePMMLModel in class PMMLPortObject
Parameters:
handler - the handler responsible for writing the PMML
Throws:
SAXException - if something goes wrong during writing the PMML

loadFrom

public void loadFrom(PMMLPortObjectSpec spec,
                     InputStream stream,
                     String version)
              throws ParserConfigurationException,
                     SAXException,
                     IOException

Overrides:
loadFrom in class PMMLPortObject
Parameters:
spec - the referring spec of this object
stream - the input stream to write to
version - the version (3.0 - 3.1)
Throws:
ParserConfigurationException - if the parser cannot be instantiated
SAXException - if something goes wrong during writing
IOException - if the file cannot be found

getTargetVariableName

public String getTargetVariableName()
Returns:
the targetVariableName

getRegressionTable

public PMMLRegressionPortObject.RegressionTable getRegressionTable()
Returns:
the regressionTable

getSummary

public String getSummary()
Get a short summary of this PortObject. The return value will be shown in a node port's tooltip, for instance.

Specified by:
getSummary in interface PortObject
Specified by:
getSummary in class PMMLPortObject
Returns:
Summary of the object's content, suitable for a tooltip. Empty strings and null result values are ok (though not encouraged).

getModelName

public String getModelName()
Returns:
the name


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.