|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.classifier.df.data.Dataset
public class Dataset
Contains information about the attributes.
Nested Class Summary | |
---|---|
static class |
Dataset.Attribute
Attributes type |
Constructor Summary | |
---|---|
protected |
Dataset()
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
static Dataset |
fromJSON(String json)
De-serialize an instance from a string |
Dataset.Attribute |
getAttribute(int attr)
|
int[] |
getIgnored()
|
double |
getLabel(Instance instance)
|
int |
getLabelId()
|
String |
getLabelString(double code)
Returns the label value in the data This method can be used when the criterion variable is the categorical attribute. |
int |
hashCode()
|
boolean |
isNumerical(int attr)
Is this a numerical attribute ? |
int |
labelCode(String label)
Returns the code used to represent the label value in the data |
String[] |
labels()
|
static Dataset |
load(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path path)
Loads the dataset from a file |
int |
nbAttributes()
|
int |
nblabels()
|
int |
nbValues(int attr)
|
String |
toJSON()
Serialize this instance to JSON |
String |
toString()
|
int |
valueOf(int attr,
String token)
Converts a token to its corresponding integer code for a given attribute |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected Dataset()
Method Detail |
---|
public int nbValues(int attr)
public String[] labels()
public int nblabels()
public int getLabelId()
public double getLabel(Instance instance)
public Dataset.Attribute getAttribute(int attr)
public int labelCode(String label)
label
- label's value to code
public String getLabelString(double code)
code
- label's code
public String toString()
toString
in class Object
public int valueOf(int attr, String token)
attr
- attribute indexpublic int[] getIgnored()
public int nbAttributes()
public boolean isNumerical(int attr)
attr
- index of the attribute to check
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public static Dataset load(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path path) throws IOException
IOException
public String toJSON()
public static Dataset fromJSON(String json)
json
- From which an instance is created
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |