org.knime.base.node.meta.feature.backwardelim
Class BWElimModel

java.lang.Object
  extended by org.knime.base.node.meta.feature.backwardelim.BWElimModel
All Implemented Interfaces:
PortObject, PortObjectSpec

public class BWElimModel
extends Object
implements PortObject, PortObjectSpec

This the model that holds the result of a backward elimination loop. The model consists of all levels (i.e. number of included features) together with the corresponding error rate and a list of all columns included in the level. Note that this class is also its spec at the same time, because the stored information is needed in the dialog of the filter node.

Author:
Thorsten Meinl, University of Konstanz

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.knime.core.node.port.PortObject
PortObject.PortObjectSerializer<T extends PortObject>
 
Nested classes/interfaces inherited from interface org.knime.core.node.port.PortObjectSpec
PortObjectSpec.PortObjectSpecSerializer<T extends PortObjectSpec>
 
Field Summary
static PortType TYPE
          The type of ports that create or consume such a model.
 
Constructor Summary
BWElimModel(String targetColumn)
          Creates a new model.
 
Method Summary
 void addFeatureLevel(double error, Collection<String> includedColumns)
          Adds a new feature level.
 Collection<Pair<Double,Collection<String>>> featureLevels()
          Returns an unmodifieable collection of the stored feature levels.
static PortObject.PortObjectSerializer<BWElimModel> getPortObjectSerializer()
          Returns a serializer object for this model.
static PortObjectSpec.PortObjectSpecSerializer<BWElimModel> getPortObjectSpecSerializer()
          Returns a serializer object for this model's spec (which is the model itself).
 PortObjectSpec getSpec()
          Get specification to this port object.
 String getSummary()
          Get a short summary of this PortObject.
 JComponent[] getViews()
          The returned views are displayed in the out port view of the referring node.
 String targetColumn()
          Returns the target column's name.
 
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 type of ports that create or consume such a model.

Constructor Detail

BWElimModel

public BWElimModel(String targetColumn)
Creates a new model.

Parameters:
targetColumn - the target columns's name
Method Detail

addFeatureLevel

public void addFeatureLevel(double error,
                            Collection<String> includedColumns)
Adds a new feature level.

Parameters:
error - the resulting error rate
includedColumns - a list with the included column names

featureLevels

public Collection<Pair<Double,Collection<String>>> featureLevels()
Returns an unmodifieable collection of the stored feature levels. Each entry if a pair with the error rate as first part and a list of all columns that were included in the iteration as second part.

Returns:
a collection with pairs

targetColumn

public String targetColumn()
Returns the target column's name.

Returns:
the name

getSpec

public PortObjectSpec getSpec()
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.

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
Returns:
Summary of the object's content, suitable for a tooltip. Empty strings and null result values are ok (though not encouraged).

getPortObjectSerializer

public static PortObject.PortObjectSerializer<BWElimModel> getPortObjectSerializer()
Returns a serializer object for this model.

Returns:
a port object serializer

getPortObjectSpecSerializer

public static PortObjectSpec.PortObjectSpecSerializer<BWElimModel> getPortObjectSpecSerializer()
Returns a serializer object for this model's spec (which is the model itself).

Returns:
a port object serializer

getViews

public JComponent[] getViews()
The returned views are displayed in the out port view of the referring node. Each component is displayed in an extra tab. The name of the component is used as the title for the tab. It is important that no external members are kept in the component so it can be deleted, when the port object is deleted. If the port object has no view return an empty array.

Specified by:
getViews in interface PortObject
Specified by:
getViews in interface PortObjectSpec
Returns:
an array of views for the port object, each displayed as a tab in the out port view


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.