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

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

public class ClassValueDataRow
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
ClassValueDataRow(double[] attributeValues, int classValue)
          Constructs a data row.
 
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.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassValueDataRow

public ClassValueDataRow(double[] attributeValues,
                         int classValue)
Constructs a data row.

Parameters:
attributeValues - the attribute values (nominal values are mapped doubles)
classValue - the nominal class value mapped to an integer
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

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.