Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.converter
Class WekaAttributeFactory

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.converter.WekaAttributeFactory

public final class WekaAttributeFactory
extends Object

A factory to create WekaAttributes out of Strings.

Author:
Arthur Zimek

Field Summary
private  Class<HierarchicalClassLabel> classLabelClass
          The classLabel class for nominal attributes.
 
Constructor Summary
WekaAttributeFactory()
           
 
Method Summary
 WekaAttribute getAttribute(String value)
          Creates a WekaNumericAttribute if the given value can be parsed as double.
 WekaAttribute getAttribute(String value, boolean string)
          Returns a WekaStringAttribute if the parameter string is set to true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classLabelClass

private Class<HierarchicalClassLabel> classLabelClass
The classLabel class for nominal attributes.

Constructor Detail

WekaAttributeFactory

public WekaAttributeFactory()
Method Detail

getAttribute

public WekaAttribute getAttribute(String value)
Creates a WekaNumericAttribute if the given value can be parsed as double. Otherwise a WekaNominalAttribute is created.

Parameters:
value - the value of the new attribute.
Returns:
a new weka attribute for the given value

getAttribute

public WekaAttribute getAttribute(String value,
                                  boolean string)
Returns a WekaStringAttribute if the parameter string is set to true. Otherwise the result is the same as from getAttribute(value).

Parameters:
value - the value of the new attribute
string - if true, the new attribute will be a WekaStringAttribute, otherwise it will be the result of getAttribute(value)
Returns:
a WekaStringAttribute if the parameter string is set to true. Otherwise the result is the same as from getAttribute(value)

Release 0.1 (2008-07-10_1838)