|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.example.AbstractAttributes
public abstract class AbstractAttributes
This is the abstract superclass for all attribute set implementations. It is sufficient
for subclasses to overwrite the method Attributes.allAttributeRoles() and the
corresponding add and remove methods.
| Field Summary |
|---|
| Fields inherited from interface com.rapidminer.example.Attributes |
|---|
ALL, ATTRIBUTE_NAME, BASE_VALUE, BATCH_NAME, CLASSIFICATION_COST, CLUSTER_NAME, CONFIDENCE_NAME, ID_NAME, KNOWN_ATTRIBUTE_TYPES, LABEL_NAME, OUTLIER_NAME, PREDICTION_NAME, REGULAR, SPECIAL, TYPE_ATTRIBUTE, TYPE_BASE_VALUE, TYPE_BATCH, TYPE_CLUSTER, TYPE_COST, TYPE_ID, TYPE_LABEL, TYPE_OUTLIER, TYPE_PREDICTION, TYPE_WEIGHT, WEIGHT_NAME |
| Constructor Summary | |
|---|---|
AbstractAttributes()
|
|
| Method Summary | |
|---|---|
void |
addRegular(Attribute attribute)
Adds the given attribute as regular attribute. |
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. |
abstract 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. |
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. |
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. |
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.rapidminer.example.Attributes |
|---|
add, allAttributeRoles, equals, findRoleByName, findRoleBySpecialName, hashCode, remove, rename, rename |
| Constructor Detail |
|---|
public AbstractAttributes()
| Method Detail |
|---|
public abstract java.lang.Object clone()
Attributes
clone in interface Attributesclone in class java.lang.Objectpublic java.util.Iterator<Attribute> iterator()
Attributes
iterator in interface Attributesiterator in interface java.lang.Iterable<Attribute>public java.util.Iterator<Attribute> allAttributes()
Attributes
allAttributes in interface Attributespublic java.util.Iterator<AttributeRole> specialAttributes()
Attributes
specialAttributes in interface Attributespublic java.util.Iterator<AttributeRole> regularAttributes()
Attributes
regularAttributes in interface Attributespublic boolean contains(Attribute attribute)
Attributes
contains in interface Attributespublic int allSize()
Attributes
allSize in interface Attributespublic int size()
Attributes
size in interface Attributespublic int specialSize()
Attributes
specialSize in interface Attributespublic void addRegular(Attribute attribute)
Attributes
addRegular in interface Attributespublic boolean remove(Attribute attribute)
Attributes
remove in interface Attributespublic void clearRegular()
Attributes
clearRegular in interface Attributespublic void clearSpecial()
Attributes
clearSpecial in interface Attributes
public Attribute replace(Attribute first,
Attribute second)
Attributes
replace in interface Attributespublic Attribute get(java.lang.String name)
Attributes
get in interface Attributespublic Attribute getRegular(java.lang.String name)
Attributes
getRegular in interface Attributespublic Attribute getSpecial(java.lang.String name)
Attributes
getSpecial in interface Attributespublic AttributeRole getRole(Attribute attribute)
Attributes
getRole in interface Attributespublic AttributeRole getRole(java.lang.String name)
Attributes
getRole in interface Attributespublic Attribute getLabel()
Attributes
getLabel in interface Attributespublic void setLabel(Attribute label)
Attributes
setLabel in interface Attributespublic Attribute getPredictedLabel()
Attributes
getPredictedLabel in interface Attributespublic void setPredictedLabel(Attribute predictedLabel)
Attributes
setPredictedLabel in interface Attributespublic Attribute getId()
Attributes
getId in interface Attributespublic void setId(Attribute id)
Attributes
setId in interface Attributespublic Attribute getWeight()
Attributes
getWeight in interface Attributespublic void setWeight(Attribute weight)
Attributes
setWeight in interface Attributespublic Attribute getCluster()
Attributes
getCluster in interface Attributespublic void setCluster(Attribute cluster)
Attributes
setCluster in interface Attributespublic Attribute getOutlier()
Attributes
getOutlier in interface Attributespublic void setOutlier(Attribute outlier)
Attributes
setOutlier in interface Attributespublic Attribute getCost()
Attributes
getCost in interface Attributespublic void setCost(Attribute cost)
Attributes
setCost in interface Attributes
public void setSpecialAttribute(Attribute attribute,
java.lang.String specialName)
Attributes
setSpecialAttribute in interface Attributespublic Attribute[] createRegularAttributeArray()
Attributes
createRegularAttributeArray in interface Attributespublic java.lang.String toString()
toString in interface AttributestoString in class java.lang.Object
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||