|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.unibi.techfak.jpredictor.clustering.RelationMeasure
de.unibi.techfak.jpredictor.clustering.MatrixRelationMeasure
de.unibi.techfak.jpredictor.clustering.MatrixSimilarity
de.unibi.techfak.jpredictor.clustering.MatrixLikelihood
public class MatrixLikelihood
Calculates the likelihood between two matrices. Both matrices must consist of the same number of rows and columns. The difference to MatrixSimilarity is, that the vector results are not added but multipied.
Note: when dealing with likelihoods results can become very small
very fast. Maybe to fast for double values to hold the
value. It is strongly recommended to use MatrixLoglikelihood
instead.
MatrixLoglikelihood| Field Summary | |
|---|---|
(package private) double |
zero
Replacement multiplier for vector results that are zero. |
| Fields inherited from class de.unibi.techfak.jpredictor.clustering.MatrixSimilarity |
|---|
vrm |
| Fields inherited from class de.unibi.techfak.jpredictor.clustering.MatrixRelationMeasure |
|---|
matrixList |
| Fields inherited from class de.unibi.techfak.jpredictor.clustering.RelationMeasure |
|---|
computationResult |
| Fields inherited from interface de.unibi.techfak.jpredictor.clustering.Computable |
|---|
COMPUTATION_FAILED, COMPUTATION_PENDING, COMPUTATION_SUCCESS, COMPUTATION_WAITING |
| Constructor Summary | |
|---|---|
MatrixLikelihood(VectorRelationMeasure vrm,
double zero)
Constructs this class with a vector relation measure and a replacement for zero vector computation results. |
|
| Method Summary | |
|---|---|
double |
atomicCombine(double rel0,
double rel1)
Two relations measures are combined to one result, which is not stored but returned. |
double |
atomicNormalize(double rel,
double norm)
A relations measures is normalized by a certain amount. |
RelationMeasure |
newInstance()
Creates a copy of this relation measure as if it was newly instantiated through a call to the constructor. |
java.lang.String |
toString()
Creates a short string of this relation measure and maybe some results if available. |
(package private) double |
vectorResultsCombine(double resultSoFar,
double nextResult)
Operation to combine a result calculated so far and a next result. |
(package private) double |
vectorResultsInit()
The neutral/initial value for combining the vectorial results. |
| Methods inherited from class de.unibi.techfak.jpredictor.clustering.MatrixSimilarity |
|---|
compute, optimum |
| Methods inherited from class de.unibi.techfak.jpredictor.clustering.MatrixRelationMeasure |
|---|
add, add, clear, length, lengthRow |
| Methods inherited from class de.unibi.techfak.jpredictor.clustering.RelationMeasure |
|---|
atomicCombine, compareTo, optimum, result |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
double zero
| Constructor Detail |
|---|
public MatrixLikelihood(VectorRelationMeasure vrm,
double zero)
throws java.lang.NullPointerException
vrm - The relation measure between two vectors of the matrix.zero - The "pseudo count" value if one vector result is zero.
Should not, but can be 0. When dealing with probabilities a value
of 0.01 is recommended.
java.lang.NullPointerException - if vrm is null.| Method Detail |
|---|
double vectorResultsInit()
MatrixSimilarity
vectorResultsInit in class MatrixSimilarity
double vectorResultsCombine(double resultSoFar,
double nextResult)
MatrixSimilarity
vectorResultsCombine in class MatrixSimilarity
public double atomicCombine(double rel0,
double rel1)
RelationMeasureTwo relations measures are combined to one result, which is not stored but returned. This method provides a way to calculate the combined result, when the way how to do this is not known. For instance, distance relation measures normally sum up over single results while likelihood/probabilities are multiplied.
Note, that it is possible to mix up optimization of different relation measures, e.g. distances and likelihoods, since this method works on any numbers.
atomicCombine in class RelationMeasurerel0 - The first relation measure to be compared to the second.rel1 - The second relation measure to be compared to the first.
public double atomicNormalize(double rel,
double norm)
RelationMeasureA relations measures is normalized by a certain amount. This method provides a way to normalize a relation measure after numbers of them were combined. For instance, distance relation measures normally are normalized by dividing through the count, while likelihoods are rooted.
Note, that it is possible to mix up optimization of different relation measures, e.g. distances and likelihoods, since this method works on any numbers.
atomicNormalize in class RelationMeasurerel - The relation measure to be normalized.norm - The normalization value.
Double.NaN in case of error.public RelationMeasure newInstance()
RelationMeasure
newInstance in class RelationMeasurepublic java.lang.String toString()
RelationMeasure
toString in class MatrixSimilarity
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||