|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectAttributeSet
public class AttributeSet
An AttributeSet object encapsulates the set of attributes for a given machine learning problem. The attributes are stored in a fixed order, and several of the methods access attributes by their index in this ordering. As is usual with machine learning problems, one of the attributes is designated as a class attribute -- this is the attribute that determines which class an instance belongs to. However, to avoid confusion with the Java keyword "class", in all documentation we refer instead to the classification attribute, and the classification of an instance.
Constructor Summary | |
---|---|
AttributeSet()
Construct a new AttributeSet with an empty set of attributes. |
Method Summary | |
---|---|
void |
addAttribute(Attribute attribute)
Add the given attribute to the attribute set. |
Attribute |
getAttribute(java.lang.String name)
Get the attribute with the given name. |
int |
getAttributeIndex(Attribute attribute)
Get the index of the given attribute in the attribute set's ordering. |
int |
getAttributeIndex(java.lang.String name)
Get the index of the given attribute in the attribute set's ordering. |
java.util.ArrayList<Attribute> |
getAttributes()
Get a list of attributes in the attribute set. |
Attribute |
getClassAttribute()
Get the classification attribute for this attribute set. |
java.lang.String |
getClassAttributeAsString()
Get the name of the classification attribute for this attribute set. |
int |
getClassAttributeIndex()
Get the index of the classification attribute in this attribute set's ordering of attributes |
void |
print()
Print a legible version of the attribute set. |
void |
setClassAttribute(java.lang.String name)
Set the classification attribute to the attribute with the given name |
void |
setDefaultClassAttribute()
The classification attribute is the final attribute, by default; this method is used to set this default. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AttributeSet()
Method Detail |
---|
public void addAttribute(Attribute attribute)
attribute
- the attribute to be added to this attribute setpublic void setClassAttribute(java.lang.String name)
name
- a string naming the classification attributepublic int getAttributeIndex(Attribute attribute)
attribute
- the attribute whose index is desired
public int getAttributeIndex(java.lang.String name)
name
- the name of the attribute whose index is desired
public Attribute getAttribute(java.lang.String name)
name
- the name of the desired attribute
public Attribute getClassAttribute()
public java.lang.String getClassAttributeAsString()
public void setDefaultClassAttribute()
public void print()
public java.util.ArrayList<Attribute> getAttributes()
public int getClassAttributeIndex()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |