de.lmu.ifi.dbs.elki.converter
Class WekaAttributeFactory
java.lang.Object
de.lmu.ifi.dbs.elki.converter.WekaAttributeFactory
public final class WekaAttributeFactory
- extends Object
A factory to create WekaAttributes
out of Strings.
- Author:
- Arthur Zimek
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
classLabelClass
private Class<HierarchicalClassLabel> classLabelClass
- The classLabel class for nominal attributes.
WekaAttributeFactory
public WekaAttributeFactory()
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 attributestring
- 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)