|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.ed.inf.enzml.weka.AttributeFactory
public class AttributeFactory
The attribute factory produces binary and nominal Weka attributes. A binary attribute is a special nominal attribute with only 2 values: yes/no (or present/absent or zero/one). The attribute name often represents the characteristic that can be present or absent. Example: if the attribute name is a protein domain, the value yes/no represents whether the domain is present or absent in that protein sequence (instance). A nominal attribute is an attribute with a set of (more than 2) possible string values.
| Field Summary | |
|---|---|
static java.lang.String |
ABSENT_OPTION
|
static java.lang.String |
PRESENT_OPTION
|
| Constructor Summary | |
|---|---|
AttributeFactory(DataSetGenerator dataSetGenerator)
Takes the attribute names from the dataset generator object. |
|
| Method Summary | |
|---|---|
static boolean |
attributeIsValid(weka.core.Attribute attribute)
Check if an attribute is valid (not null, non-empty name) |
weka.core.Attribute |
generateBinaryAttribute(java.lang.String attributeName)
Generates a binary attribute |
weka.core.Attribute |
generateNominalAttribute(java.lang.String attributeName,
java.util.Vector<java.lang.String> values)
Generate a nominal attribute (with a list of possible values). |
weka.core.Attribute |
generateNominalAttributeWithDummy(java.lang.String attributeName,
java.util.Set<java.lang.String> classValues)
Generate a nominal attribute (with a list of possible values). |
java.lang.String |
getAttributeAbsentOption()
|
weka.core.Attribute |
getAttributeByName(java.lang.String name)
|
java.lang.String |
getAttributePresentOption()
|
java.util.Vector<weka.core.Attribute> |
getAttributes()
|
java.util.TreeSet<java.lang.String> |
getAttributesNames()
|
java.util.Vector<java.lang.String> |
getBinaryAttributeValuesSet()
Get the possible attribute values for a yes/no attribute. |
weka.core.Attribute |
getClassAttribute()
Get last attribute as class attribute |
DataSetGenerator |
getDataSetGenerator()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ABSENT_OPTION
public static final java.lang.String PRESENT_OPTION
| Constructor Detail |
|---|
public AttributeFactory(DataSetGenerator dataSetGenerator)
dataSetGenerator - | Method Detail |
|---|
public weka.core.Attribute generateBinaryAttribute(java.lang.String attributeName)
attributeName - the attribute name
public weka.core.Attribute generateNominalAttribute(java.lang.String attributeName,
java.util.Vector<java.lang.String> values)
attributeName - the attribute name
public weka.core.Attribute generateNominalAttributeWithDummy(java.lang.String attributeName,
java.util.Set<java.lang.String> classValues)
attributeName - the attribute name
public java.lang.String getAttributeAbsentOption()
public weka.core.Attribute getAttributeByName(java.lang.String name)
public java.lang.String getAttributePresentOption()
public java.util.Vector<weka.core.Attribute> getAttributes()
public java.util.TreeSet<java.lang.String> getAttributesNames()
public java.util.Vector<java.lang.String> getBinaryAttributeValuesSet()
public weka.core.Attribute getClassAttribute()
Attributepublic DataSetGenerator getDataSetGenerator()
public static boolean attributeIsValid(weka.core.Attribute attribute)
attribute -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||