org.knime.base.node.mine.regression
Interface RegressionPortObject

All Superinterfaces:
PortObject

public interface RegressionPortObject
extends PortObject

Port object representing simple regression models.

The accompanying spec is of type DataTableSpec, whereby the last column is not an actual variable but the target column (kept in order to guess a good response column name), i.e. this column does not need to be present in the test data. The remaining columns reflect the names and types of the variables. All regressor variables and the response column are supposed to be double compatible (meaning that the type of the columns in the spec is ignored for that matter).

Author:
Bernd Wiswedel, University of Konstanz

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.knime.core.node.port.PortObject
PortObject.PortObjectSerializer<T extends PortObject>
 
Field Summary
static PortType TYPE
          Convenience access member for port type.
 
Method Summary
 DataTableSpec getSpec()
          Spec to this regression model.
 DataCell predict(DataRow row)
          Predict a row, returning the regression value.
 
Methods inherited from interface org.knime.core.node.port.PortObject
getSummary, getViews
 

Field Detail

TYPE

static final PortType TYPE
Convenience access member for port type.

Method Detail

getSpec

DataTableSpec getSpec()
Spec to this regression model. Refer to the interface description for details on the structure. Get specification to this port object. That is, the corresponding PortObjectSpec which is used to configure any successor node after execution, e.g. a BufferedDataTable can return a DataTableSpec.

Subclasses should narrow the return type if possible.

Specified by:
getSpec in interface PortObject
Returns:
underlying PortObjectSpec or any derived spec, never null.

predict

DataCell predict(DataRow row)
Predict a row, returning the regression value. The row is pre-processed such that it contains only the relevant variables (also in the order reflected by getSpec()), whereby there is no value for the last (response) column, i.e. row.getNumCells() == getSpec().getNumColumns() - 1.

Parameters:
row - to predict
Returns:
calculated value according to regression model. The return class is supposed to be DoubleCell (unless missing).


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.