|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.df.data.Instance
public class Instance
Represents one data instance.
Constructor Summary | |
---|---|
Instance(int id,
Vector attrs,
int label)
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
double |
get(int index)
Return the attribute at the specified position |
int |
getId()
instance unique id |
int |
getLabel()
instance label code. use Dataset.labels to get the real label value |
int |
hashCode()
|
void |
set(int index,
double value)
Set the value at the given index |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Instance(int id, Vector attrs, int label)
Method Detail |
---|
public double get(int index)
index
- position of the attribute to retrieve
public void set(int index, double value)
index
- value
- a double value to setpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int getId()
public int getLabel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |