public class TemplateVectorElement extends Object implements Comparable<TemplateVectorElement>
TemplateVector
.Modifier and Type | Field and Description |
---|---|
private int |
collectionTermFrequency
The term frequency in the whole collection - how often does this attribute show up in the whole collection of
feature vectors, i.e.
|
private String |
comment
Optional comment for this attribute.
|
private int |
documentFrequency
Indicates in how many documents or feature vectors this attribute is present, i.e.
|
private int |
index |
private String |
label
The label or name associated with this attribute.
|
private int |
maximumTermFrequency
Maximum value of this attribute in the collection of feature vectors.
|
private double |
meanTermFrequency
Mean value of this attribute in the collection of feature vectors.
|
private int |
minimumTermFrequency
Minimum value of this attribute in the collection of feature vectors.
|
private TemplateVector |
tv |
Constructor and Description |
---|
TemplateVectorElement(TemplateVector tv,
String label,
int index) |
TemplateVectorElement(TemplateVector tv,
String label,
int index,
int documentFrequency,
int documentTermFrequency) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(TemplateVectorElement o)
Compares two
TemplateVectorElement s by comparing the two labels. |
int |
getCollectionTermFrequency()
Gets the term frequency in the whole collection.
|
String |
getComment()
Gets the comment.
|
int |
getDocumentFrequency()
Gets the document frequency.
|
int |
getIndex() |
String |
getLabel()
Gets the label.
|
int |
getMaximumTermFrequency()
Gets the maximum tf.
|
double |
getMeanTermFrequency()
Gets the mean tf.
|
int |
getMinimumTermFrequency()
Gets the minimum tf.
|
TemplateVector |
getTemplateVector()
Returns the
TemplateVector this element is associated to. |
void |
mergeStatiscticsWithOtherElement(TemplateVectorElement other)
Merge the statistical information of the current template vector element with another element, used e.g.
|
void |
setCollectionTermFrequency(int collectionTermFrequency) |
void |
setComment(String comment) |
void |
setDocumentFrequency(int documentFrequency) |
protected void |
setLabel(String label) |
void |
setMaximumTermFrequency(int maximumTermFrequency) |
void |
setMeanTermFrequency(double meanTermFrequency) |
void |
setMinimumTermFrequency(int minimumTermFrequency) |
String |
toString() |
private final TemplateVector tv
private String label
private int documentFrequency
private int collectionTermFrequency
private int minimumTermFrequency
private int maximumTermFrequency
private double meanTermFrequency
private String comment
private int index
public TemplateVectorElement(TemplateVector tv, String label, int index)
public TemplateVectorElement(TemplateVector tv, String label, int index, int documentFrequency, int documentTermFrequency)
public int getIndex()
public int getDocumentFrequency()
public void setDocumentFrequency(int documentFrequency)
public int getCollectionTermFrequency()
public void setCollectionTermFrequency(int collectionTermFrequency)
public String getLabel()
protected void setLabel(String label)
public String getComment()
public void setComment(String comment)
public int getMaximumTermFrequency()
public void setMaximumTermFrequency(int maximumTermFrequency)
public double getMeanTermFrequency()
public void setMeanTermFrequency(double meanTermFrequency)
public int getMinimumTermFrequency()
public void setMinimumTermFrequency(int minimumTermFrequency)
public int compareTo(TemplateVectorElement o)
TemplateVectorElement
s by comparing the two labels.compareTo
in interface Comparable<TemplateVectorElement>
String.compareTo(String)
public void mergeStatiscticsWithOtherElement(TemplateVectorElement other)
SOMLibInputConcatenator
.public TemplateVector getTemplateVector()
TemplateVector
this element is associated to.