|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.ed.inf.csb.taweka2010.AttributeFactory
public class AttributeFactory
Attribute factory. Produces binary and nominal attributes. A binary attribute is a special nominal attribute with only 2 options: yes/no (present/absent) (zero/one). The attribute name often represents what is 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 list of possible string values.
| Field Summary | |
|---|---|
static java.lang.String |
ABSENT_OPTION
|
static java.lang.String |
PRESENT_OPTION
|
| Constructor Summary | |
|---|---|
AttributeFactory()
|
|
| Method Summary | |
|---|---|
static weka.core.Attribute |
generateBinaryAttribute(java.lang.String attributeName)
Generate a binary attribute (yes/no, present/absent) |
static 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) |
static 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) |
static weka.core.FastVector |
getBinaryAttributeValuesSet()
the options for a yes/no, present/absent attribute (beware: "no" has to be the first option for the sparse arff format to work) |
| 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()
| Method Detail |
|---|
public static weka.core.FastVector getBinaryAttributeValuesSet()
public static weka.core.Attribute generateBinaryAttribute(java.lang.String attributeName)
attributeName - the attribute name
public static weka.core.Attribute generateNominalAttributeWithDummy(java.lang.String attributeName,
java.util.Set<java.lang.String> classValues)
attributeName - the attribute name
public static weka.core.Attribute generateNominalAttribute(java.lang.String attributeName,
java.util.Vector<java.lang.String> values)
attributeName - the attribute name
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||