org.knime.base.node.mine.decisiontree2.learner
Class DataRowWeighted

java.lang.Object
  extended by org.knime.base.node.mine.decisiontree2.learner.DataRowWeighted

public class DataRowWeighted
extends Object

A data row represented as a double array. Nominal values must be mapped to be used. The class value is also a mapped int value.

Author:
Christoph Sieb, University of Konstanz

Constructor Summary
DataRowWeighted(ClassValueDataRow dataRow, double weight)
          Constructs a weighted data row.
DataRowWeighted(DataRowWeighted dataRow, double weight)
          Constructs a weighted data row from another one and sets the weight to the given value.
 
Method Summary
 int getClassValue()
          Returns the class value.
 int getNumAttributes()
          Returns the number of attribute values, excluding the class value.
 double getValue(int index)
          Returns the attribute value for the given index.
 double getWeight()
          Return the weight of this data row.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataRowWeighted

public DataRowWeighted(ClassValueDataRow dataRow,
                       double weight)
Constructs a weighted data row.

Parameters:
dataRow - the underlying ClassValueDataRow
weight - the weight for this DataRowWeighted

DataRowWeighted

public DataRowWeighted(DataRowWeighted dataRow,
                       double weight)
Constructs a weighted data row from another one and sets the weight to the given value.

Parameters:
dataRow - the other DataRowWeighted
weight - the weight for this DataRowWeighted
Method Detail

getClassValue

public int getClassValue()
Returns the class value.

Returns:
the class value

getValue

public double getValue(int index)
Returns the attribute value for the given index.

Parameters:
index - the column index for which to return the double value
Returns:
the attribute value for the given index

getNumAttributes

public int getNumAttributes()
Returns the number of attribute values, excluding the class value.

Returns:
the number of attribute values, excluding the class value

getWeight

public double getWeight()
Return the weight of this data row.

Returns:
the weight of this data row

toString

public String toString()

Overrides:
toString in class Object


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.