org.knime.base.node.mine.regression.logistic.predict
Class LogRegPredictor

java.lang.Object
  extended by org.knime.core.data.container.AbstractCellFactory
      extended by org.knime.base.node.mine.regression.logistic.predict.LogRegPredictor
All Implemented Interfaces:
CellFactory

public final class LogRegPredictor
extends AbstractCellFactory

A Predictor for a logistic regression model.

Author:
Heiko Hofer

Constructor Summary
LogRegPredictor(PMMLGeneralRegressionContent content, DataTableSpec inSpec, PMMLPortObjectSpec portSpec, String targetVariableName, boolean includeProbabilites)
          This constructor should be used when executing the node.
LogRegPredictor(PMMLPortObjectSpec portSpec, DataTableSpec tableSpec, boolean includeProbabilites)
          This constructor should be used during the configure phase of a node.
 
Method Summary
static DataColumnSpec[] createColumnSpec(PMMLPortObjectSpec portSpec, DataTableSpec tableSpec, boolean includeProbabilites)
          Creates the spec of the output if possible.
 DataCell[] getCells(DataRow row)
          Get the new cells for a given row.
 
Methods inherited from class org.knime.core.data.container.AbstractCellFactory
getColumnSpecs, getMaxParallelWorkers, getMaxQueueSize, isParallelProcessing, setParallelProcessing, setParallelProcessing, setProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogRegPredictor

public LogRegPredictor(PMMLPortObjectSpec portSpec,
                       DataTableSpec tableSpec,
                       boolean includeProbabilites)
                throws InvalidSettingsException
This constructor should be used during the configure phase of a node. The created instance will give a valid spec of the output but cannot be used to compute the cells.

Parameters:
portSpec - the spec of the pmml input port
tableSpec - the spec of the data input port
includeProbabilites - add probabilities to the output
Throws:
InvalidSettingsException - when tableSpec and portSpec do not match

LogRegPredictor

public LogRegPredictor(PMMLGeneralRegressionContent content,
                       DataTableSpec inSpec,
                       PMMLPortObjectSpec portSpec,
                       String targetVariableName,
                       boolean includeProbabilites)
                throws InvalidSettingsException
This constructor should be used when executing the node. Use it when you want to compute output cells.

Parameters:
content - the general regression content
inSpec - the spec of the data input port
portSpec - the pmml port object spec
targetVariableName - the name of the target variable
includeProbabilites - add probabilities to the output
Throws:
InvalidSettingsException - when inSpec and regModel do not match
Method Detail

createColumnSpec

public static DataColumnSpec[] createColumnSpec(PMMLPortObjectSpec portSpec,
                                                DataTableSpec tableSpec,
                                                boolean includeProbabilites)
                                         throws InvalidSettingsException
Creates the spec of the output if possible.

Parameters:
portSpec - the spec of the pmml input port
tableSpec - the spec of the data input port
includeProbabilites - add probabilities to the output
Returns:
The spec of the output or null
Throws:
InvalidSettingsException - when tableSpec and portSpec do not match

getCells

public DataCell[] getCells(DataRow row)
Get the new cells for a given row. These cells are incorporated into the existing row. The way it is done is defined through the ColumnRearranger using this object.

Parameters:
row - The row of interest.
Returns:
The new cells to that row.


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.