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

java.lang.Object
  extended by org.knime.base.node.mine.regression.PMMLRegressionTranslator
All Implemented Interfaces:
PMMLTranslator

public class PMMLRegressionTranslator
extends Object
implements PMMLTranslator

A regression model translator class between KNIME and PMML.

Author:
wenlin, Zementis, May 2011, Dominik Morent, KNIME.com AG, Zurich, Switzerland

Nested Class Summary
static class PMMLRegressionTranslator.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 PMMLRegressionTranslator.RegressionTable
          This table wraps a polynomial regression formula for use inside a PMML model.
 
Constructor Summary
PMMLRegressionTranslator()
          For usage with the initializeFrom(PMMLDocument) method.
PMMLRegressionTranslator(String modelName, String algorithmName, PMMLRegressionTranslator.RegressionTable regressionTable, String targetField)
          For usage with the exportTo(PMMLDocument, PMMLPortObjectSpec) method.
 
Method Summary
 org.apache.xmlbeans.SchemaType exportTo(org.dmg.pmml40.PMMLDocument pmmlDoc, PMMLPortObjectSpec spec)
          Exports the translators state to a PMML document.
 String getAlgorithmName()
           
 String getModelName()
           
 PMMLRegressionTranslator.RegressionTable getRegressionTable()
           
 void initializeFrom(org.dmg.pmml40.PMMLDocument pmmlDoc)
          Initializes the translator based on a PMML document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PMMLRegressionTranslator

public PMMLRegressionTranslator()
For usage with the initializeFrom(PMMLDocument) method.


PMMLRegressionTranslator

public PMMLRegressionTranslator(String modelName,
                                String algorithmName,
                                PMMLRegressionTranslator.RegressionTable regressionTable,
                                String targetField)
For usage with the exportTo(PMMLDocument, PMMLPortObjectSpec) method.

Parameters:
modelName - the name of the model
algorithmName - the name of the algorithm
regressionTable - the regression table
targetField - the name of the target column
Method Detail

initializeFrom

public void initializeFrom(org.dmg.pmml40.PMMLDocument pmmlDoc)
Initializes the translator based on a PMML document.

Specified by:
initializeFrom in interface PMMLTranslator
Parameters:
pmmlDoc - the PMML document

exportTo

public org.apache.xmlbeans.SchemaType exportTo(org.dmg.pmml40.PMMLDocument pmmlDoc,
                                               PMMLPortObjectSpec spec)
Exports the translators state to a PMML document.

Specified by:
exportTo in interface PMMLTranslator
Parameters:
pmmlDoc - the PMML document to export to
spec - the spec of the PMMLPortObject
Returns:
the schema type of the exported schema if applicable, otherwise null

getModelName

public String getModelName()
Returns:
the modelName

getAlgorithmName

public String getAlgorithmName()
Returns:
the algorithmName

getRegressionTable

public PMMLRegressionTranslator.RegressionTable getRegressionTable()
Returns:
the regressionTable


Copyright, 2003 - 2012. 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.