|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.ga.watchmaker.cd.DataSet
public class DataSet
Contains information about the dataset and its attributes. The label is a nominal attribute with a known position. Ignored attributes are not taken into account when calculating attribute's position.
Method Summary | |
---|---|
static DataSet |
getDataSet()
Singleton DataSet |
List<Integer> |
getIgnoredAttributes()
|
int |
getLabelIndex()
|
double |
getMax(int index)
Maximum possible value for an attribute |
double |
getMin(int index)
Minimum possible value for an attribute |
int |
getNbAttributes()
|
int |
getNbValues(int index)
Number of values for a nominal attribute |
static void |
initialize(DataSet dataset)
Initializes the singleton dataset |
boolean |
isNumerical(int index)
Is the attribute numerical or nominal ? |
int |
valueIndex(int index,
String value)
Converts a string value of a nominal attribute to an int . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static DataSet getDataSet()
IllegalStateException
- if the dataset has not been initializedpublic static void initialize(DataSet dataset)
dataset
- public int getNbAttributes()
public List<Integer> getIgnoredAttributes()
public int getLabelIndex()
public double getMax(int index)
index
- of the attribute
IllegalArgumentException
- if the attribute is nominalpublic double getMin(int index)
index
- of the attribute
IllegalArgumentException
- if the attribute is nominalpublic int getNbValues(int index)
index
- of the attribute
IllegalArgumentException
- if the attribute is numericalpublic boolean isNumerical(int index)
index
- of the attribute
public int valueIndex(int index, String value)
int
.
index
- of the attributevalue
-
int
representing the value
IllegalArgumentException
- if the value is not found.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |