Class AttributeSet
java.lang.Object
AttributeSet
public class AttributeSet
- extends java.lang.Object
AttributeSet encapsulates the set of attributes for a given machine learning
problem.
- Author:
- John MacCormick
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AttributeSet
public AttributeSet()
addAttribute
public void addAttribute(Attribute attribute)
- Parameters:
attribute
- the attribute to be added to this attribute set
setClassAttribute
public void setClassAttribute(java.lang.String name)
- Parameters:
name
- a string naming the machine learning class attribute
getAttributeIndex
public int getAttributeIndex(Attribute attribute)
- Parameters:
attribute
- the attribute whose index is desired
- Returns:
- the attribute's index in this class's array list
getAttributeIndex
public int getAttributeIndex(java.lang.String name)
- Parameters:
name
- the name of the attribute whose index is desired
- Returns:
- the attribute's index in this class's array list
getAttribute
public Attribute getAttribute(java.lang.String name)
- Parameters:
name
- the name of the desired attribute
- Returns:
- the attribute corresponding to the given name
getClassAttribute
public Attribute getClassAttribute()
- Returns:
- the machine learning class attribute for this attribute set
getClassAttributeAsString
public java.lang.String getClassAttributeAsString()
- Returns:
- the name of the machine learning class attribute for this
attribute set
setDefaultClassAttribute
public void setDefaultClassAttribute()
- the machine learning class attribute is the final attribute, by default.
This method is used to set this default.
print
public void print()
- print legible version of the attribute set
getAttributes
public java.util.ArrayList<Attribute> getAttributes()
- Returns:
- the attributes in the attribute set
getClassAttributeIndex
public int getClassAttributeIndex()
- Returns:
- the index of the machine learning class in this attribute set's
array of attributes, obtained via getAttributes()