|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.gla.dcs.renaissance.iqir.qpr.EigenDecomposition
uk.ac.gla.dcs.renaissance.iqir.qpr.Density
public class Density
A probability density
Field Summary |
---|
Fields inherited from class uk.ac.gla.dcs.renaissance.iqir.qpr.EigenDecomposition |
---|
map, mS, mU |
Constructor Summary | |
---|---|
Density(DensityTracker tracker,
boolean deepCopy)
|
|
Density(bpiwowar.maths.matrix.DoubleMatrix2D u,
bpiwowar.maths.matrix.DiagonalDoubleMatrix s,
it.unimi.dsi.fastutil.ints.Int2IntSortedMap map)
|
|
Density(bpiwowar.maths.matrix.DoubleMatrix2D mU,
bpiwowar.maths.matrix.DiagonalDoubleMatrix mS,
it.unimi.dsi.fastutil.ints.Int2IntSortedMap map,
boolean deepCopy)
|
|
Density(SubspaceTracker tracker)
Uses a subspace tracker (SVD) to initialise |
Method Summary | |
---|---|
double |
computeProbability(bpiwowar.maths.matrix.DoubleMatrix1D vector)
Compute the probability of a one-dimensional subspace |
double |
computeProbability(bpiwowar.maths.matrix.DoubleMatrix1D vector,
boolean sameMap)
Compute the probability of a one-dimensional subspace |
double |
computeProbability(Subspace subspace,
boolean fuzzyEvent)
Compute the probability of an event |
double |
computeProbability(Subspace subspace,
boolean fuzzyEvent,
boolean sameMap)
Compute the probability of an event |
Density |
copy()
|
bpiwowar.maths.matrix.DoubleMatrix2D |
getProbabilityMatrix(bpiwowar.maths.matrix.DoubleMatrix1D vector,
boolean sameMap)
Get the matrix v^T * (U x S) where U is the basis and S is the square root of the eigenvalues. |
bpiwowar.maths.matrix.DoubleMatrix2D |
getProbabilityMatrix(Subspace subspace,
boolean fuzzyEvent,
boolean sameMap)
Pre-computation of a probability. |
Methods inherited from class uk.ac.gla.dcs.renaissance.iqir.qpr.EigenDecomposition |
---|
getGlobalMatrix, getLocalToGobalTermIdMap, getMatrix, getRank, getS, normalise, normalise, normalise, trim |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Density(bpiwowar.maths.matrix.DoubleMatrix2D u, bpiwowar.maths.matrix.DiagonalDoubleMatrix s, it.unimi.dsi.fastutil.ints.Int2IntSortedMap map)
public Density(SubspaceTracker tracker)
tracker
- public Density(DensityTracker tracker, boolean deepCopy)
tracker
- The tracker from which to build this densitydeepCopy
- If true, copy all the matrices (but sigma)public Density(bpiwowar.maths.matrix.DoubleMatrix2D mU, bpiwowar.maths.matrix.DiagonalDoubleMatrix mS, it.unimi.dsi.fastutil.ints.Int2IntSortedMap map, boolean deepCopy)
Method Detail |
---|
public final double computeProbability(Subspace subspace, boolean fuzzyEvent)
subspace
- The eventfuzzyEvent
- The event should be considered as "fuzzy" -- i.e. each
dimension is weighted by the corresponding sigma
public final double computeProbability(Subspace subspace, boolean fuzzyEvent, boolean sameMap)
subspace
- The eventfuzzyEvent
- The event should be considered as "fuzzy" -- i.e. each
dimension is weighted by the corresponding sigmasameMap
-
public bpiwowar.maths.matrix.DoubleMatrix2D getProbabilityMatrix(Subspace subspace, boolean fuzzyEvent, boolean sameMap)
Given the subspace representation S U and the density S' U', computes UT U' S' (crisp subspace) or S UT U' S' (fuzzy subspace). The sum of the squares of the matrix correspond to the probability of observing the subspace given the density.
Each row of the resulting matrix correspond to the probability associated with one of the dimension of the subspace. Similarly, each column is associated to a dimension of the density.
subspace
- fuzzyEvent
- sameMap
-
public bpiwowar.maths.matrix.DoubleMatrix2D getProbabilityMatrix(bpiwowar.maths.matrix.DoubleMatrix1D vector, boolean sameMap)
vector
- The vector vsameMap
-
public Density copy()
public double computeProbability(bpiwowar.maths.matrix.DoubleMatrix1D vector, boolean sameMap)
vector
-
public double computeProbability(bpiwowar.maths.matrix.DoubleMatrix1D vector)
vector
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |