|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ir.classifiers.Example
An object to hold training or test examples for categorization. Stores the name, category and HashMapVector representation of the example.
Field Summary | |
protected int |
category
Category index of the example |
protected ir.vsr.FileDocument |
document
fileDocument object for the example |
protected ir.vsr.HashMapVector |
hashVector
Representation of the example as a vector of (feature -> weight) mappings |
protected java.lang.String |
name
Name of the example |
Constructor Summary | |
Example(ir.vsr.HashMapVector input,
int cat,
java.lang.String id,
ir.vsr.FileDocument doc)
|
Method Summary | |
int |
getCategory()
Returns the category of the example |
ir.vsr.FileDocument |
getDocument()
Returns the document of the example |
ir.vsr.HashMapVector |
getHashMapVector()
Returns the hashVector of the example |
java.lang.String |
getName()
Returns the name of the example |
void |
setCategory(int cat)
Sets the category of the example |
void |
setDocument(ir.vsr.FileDocument doc)
Sets the document of the example |
void |
setHashMapVector(ir.vsr.HashMapVector v)
Sets the hashVector of the example |
void |
setName(java.lang.String id)
Sets the name of the example |
java.lang.String |
toString()
Returns the String representation of the example object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.String name
protected int category
protected ir.vsr.HashMapVector hashVector
protected ir.vsr.FileDocument document
Constructor Detail |
public Example(ir.vsr.HashMapVector input, int cat, java.lang.String id, ir.vsr.FileDocument doc)
Method Detail |
public void setName(java.lang.String id)
public java.lang.String getName()
public void setCategory(int cat)
public int getCategory()
public void setHashMapVector(ir.vsr.HashMapVector v)
public ir.vsr.HashMapVector getHashMapVector()
public void setDocument(ir.vsr.FileDocument doc)
public ir.vsr.FileDocument getDocument()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |