|
||||||||||
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 informations about the attributes.
Nested Class Summary | |
---|---|
static class |
Dataset.Attribute
Attributes type |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
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 |
nbInstances()
|
int |
nblabels()
|
int |
nbValues(int attr)
|
static Dataset |
read(DataInput in)
|
void |
readFields(DataInput in)
|
int |
valueOf(int attr,
String token)
Converts a token to its corresponding int code for a given attribute |
void |
write(DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public int nbValues(int attr)
public String[] labels()
public int nblabels()
public int getLabelId()
public double getLabel(Instance instance)
public int nbInstances()
public int labelCode(String label)
label
- label's value to code
public String getLabelString(double code)
code
- label's code
public int valueOf(int attr, String token)
attr
- attribute's 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 static Dataset read(DataInput in) throws IOException
IOException
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |