|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Attributes
This container holds all information about the example set attributes.
Implementors might want to override AbstractAttributes
for which only one of the iterating methods must be overridden.
| Field Summary | |
|---|---|
static int |
ALL
Indicates all attributes. |
static java.lang.String |
ATTRIBUTE_NAME
The name of regular attributes. |
static java.lang.String |
BASE_VALUE
The name of the classification cost special attribute. |
static java.lang.String |
BATCH_NAME
The name of the special attribute batch. |
static java.lang.String |
CLASSIFICATION_COST
The name of the classification cost special attribute. |
static java.lang.String |
CLUSTER_NAME
The name of the special attribute cluster. |
static java.lang.String |
CONFIDENCE_NAME
The name of the confidence special attributes. |
static java.lang.String |
ID_NAME
The name of the special attribute id. |
static java.lang.String[] |
KNOWN_ATTRIBUTE_TYPES
All known names of regular and special attribute types as an array. |
static java.lang.String |
LABEL_NAME
The name of the special attribute label. |
static java.lang.String |
OUTLIER_NAME
The name of the special attribute outlier. |
static java.lang.String |
PREDICTION_NAME
The name of the special attribute prediction. |
static int |
REGULAR
Indicates regular attributes. |
static int |
SPECIAL
Indicates special attributes. |
static int |
TYPE_ATTRIBUTE
Indicates a regular attribute type. |
static int |
TYPE_BASE_VALUE
Indicates the special attribute type base_value. |
static int |
TYPE_BATCH
Indicates the special attribute type batch (example batches). |
static int |
TYPE_CLUSTER
Indicates the special attribute type cluster. |
static int |
TYPE_COST
Indicates the special attribute type cost. |
static int |
TYPE_ID
Indicates the special attribute type id. |
static int |
TYPE_LABEL
Indicates the special attribute type label. |
static int |
TYPE_OUTLIER
Indicates the special attribute type outlier. |
static int |
TYPE_PREDICTION
Indicates the special attribute type prediction. |
static int |
TYPE_WEIGHT
Indicates the special attribute type weight (example weights). |
static java.lang.String |
WEIGHT_NAME
The name of the special attribute weight (example weights). |
| Method Summary | |
|---|---|
void |
add(AttributeRole attributeRole)
Adds a new attribute role. |
void |
addRegular(Attribute attribute)
Adds the given attribute as regular attribute. |
java.util.Iterator<AttributeRole> |
allAttributeRoles()
Returns an iterator over all attribute roles, including the special attribute roles. |
java.util.Iterator<Attribute> |
allAttributes()
Returns an iterator over all attributes, including the special attributes. |
int |
allSize()
Returns the number of all attributes, i.e. of the regular and the special attributes. |
void |
clearRegular()
Removes all regular attributes. |
void |
clearSpecial()
Removes all special attributes. |
java.lang.Object |
clone()
Returns a clone of this attribute set. |
boolean |
contains(Attribute attribute)
Returns true if this attribute set contains the given attribute. |
Attribute[] |
createRegularAttributeArray()
This method creates an attribute array from all regular attributes. |
boolean |
equals(java.lang.Object o)
Returns true if the given object is equal to this attribute set. |
AttributeRole |
findRoleByName(java.lang.String name)
Finds the AttributeRole belonging to the attribute with the given name (both regular and special). |
AttributeRole |
findRoleBySpecialName(java.lang.String specialName)
Finds the AttributeRole with the given special name (both regular and special). |
Attribute |
get(java.lang.String name)
Returns the attribute for the given name. |
Attribute |
getCluster()
Returns the cluster attribute or null if no label attribute is defined. |
Attribute |
getCost()
Returns the cost attribute or null if no label attribute is defined. |
Attribute |
getId()
Returns the id attribute or null if no label attribute is defined. |
Attribute |
getLabel()
Returns the label attribute or null if no label attribute is defined. |
Attribute |
getOutlier()
Returns the outlier attribute or null if no label attribute is defined. |
Attribute |
getPredictedLabel()
Returns the predicted label attribute or null if no label attribute is defined. |
Attribute |
getRegular(java.lang.String name)
Returns the regular attribute for the given name. |
AttributeRole |
getRole(Attribute attribute)
Returns the attribute role for the given attribute. |
AttributeRole |
getRole(java.lang.String name)
Returns the attribute role for the given name. |
Attribute |
getSpecial(java.lang.String name)
Returns the special attribute for the given special name. |
Attribute |
getWeight()
Returns the weight attribute or null if no label attribute is defined. |
int |
hashCode()
Returns the hash code of this attribute set. |
java.util.Iterator<Attribute> |
iterator()
Iterates over all regular attributes. |
java.util.Iterator<AttributeRole> |
regularAttributes()
Returns an iterator over the attribute roles of the special attributes. |
boolean |
remove(Attribute attribute)
Removes the given attribute. |
boolean |
remove(AttributeRole attributeRole)
Removes the given attribute role. |
void |
rename(AttributeRole attributeRole,
java.lang.String newSpecialName)
|
void |
rename(Attribute attribute,
java.lang.String newName)
Notifies the Attributes that this attribute will rename itself to the given name immediately after this method returns. |
Attribute |
replace(Attribute first,
Attribute second)
Replaces the first attribute by the second. |
void |
setCluster(Attribute cluster)
Sets the cluster attribute. |
void |
setCost(Attribute cost)
Sets the cost attribute. |
void |
setId(Attribute id)
Sets the id attribute. |
void |
setLabel(Attribute label)
Sets the label attribute. |
void |
setOutlier(Attribute outlier)
Sets the outlier attribute. |
void |
setPredictedLabel(Attribute predictedLabel)
Sets the predicted label attribute. |
void |
setSpecialAttribute(Attribute attribute,
java.lang.String specialName)
Sets the special attribute for the given name. |
void |
setWeight(Attribute weight)
Sets the weight attribute. |
int |
size()
Returns the number of regular attributes. |
java.util.Iterator<AttributeRole> |
specialAttributes()
Returns an iterator over the attribute roles of the special attributes. |
int |
specialSize()
Returns the number of special attributes. |
java.lang.String |
toString()
Returns a string representation of this attribute set. |
| Field Detail |
|---|
static final int REGULAR
static final int SPECIAL
static final int ALL
static final java.lang.String CONFIDENCE_NAME
static final java.lang.String ATTRIBUTE_NAME
static final java.lang.String ID_NAME
static final java.lang.String LABEL_NAME
static final java.lang.String PREDICTION_NAME
static final java.lang.String CLUSTER_NAME
static final java.lang.String WEIGHT_NAME
static final java.lang.String BATCH_NAME
static final java.lang.String OUTLIER_NAME
static final java.lang.String CLASSIFICATION_COST
static final java.lang.String BASE_VALUE
static final java.lang.String[] KNOWN_ATTRIBUTE_TYPES
static final int TYPE_ATTRIBUTE
static final int TYPE_LABEL
static final int TYPE_ID
static final int TYPE_WEIGHT
static final int TYPE_BATCH
static final int TYPE_CLUSTER
static final int TYPE_PREDICTION
static final int TYPE_OUTLIER
static final int TYPE_COST
static final int TYPE_BASE_VALUE
| Method Detail |
|---|
java.lang.Object clone()
boolean equals(java.lang.Object o)
equals in class java.lang.Objectint hashCode()
hashCode in class java.lang.Objectjava.util.Iterator<Attribute> iterator()
iterator in interface java.lang.Iterable<Attribute>java.util.Iterator<Attribute> allAttributes()
java.util.Iterator<AttributeRole> allAttributeRoles()
java.util.Iterator<AttributeRole> specialAttributes()
java.util.Iterator<AttributeRole> regularAttributes()
boolean contains(Attribute attribute)
int size()
int specialSize()
int allSize()
void add(AttributeRole attributeRole)
void addRegular(Attribute attribute)
boolean remove(AttributeRole attributeRole)
boolean remove(Attribute attribute)
void clearRegular()
void clearSpecial()
Attribute replace(Attribute first,
Attribute second)
Attribute get(java.lang.String name)
Attribute getRegular(java.lang.String name)
Attribute getSpecial(java.lang.String name)
AttributeRole getRole(Attribute attribute)
AttributeRole getRole(java.lang.String name)
Attribute getLabel()
void setLabel(Attribute label)
Attribute getPredictedLabel()
void setPredictedLabel(Attribute predictedLabel)
Attribute getId()
void setId(Attribute id)
Attribute getWeight()
void setWeight(Attribute weight)
Attribute getCluster()
void setCluster(Attribute cluster)
Attribute getOutlier()
void setOutlier(Attribute outlier)
Attribute getCost()
void setCost(Attribute cost)
void setSpecialAttribute(Attribute attribute,
java.lang.String specialName)
Attribute[] createRegularAttributeArray()
java.lang.String toString()
toString in class java.lang.ObjectAttributeRole findRoleByName(java.lang.String name)
AttributeRole belonging to the attribute with the given name (both regular and special).
AttributeRole findRoleBySpecialName(java.lang.String specialName)
AttributeRole with the given special name (both regular and special).
void rename(AttributeRole attributeRole,
java.lang.String newSpecialName)
{#rename(Attribute, String)}
void rename(Attribute attribute,
java.lang.String newName)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||