|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.gla.dcs.renaissance.iqir.qpr.EigenDecomposition
public class EigenDecomposition
Common class shared by fuzzy subspaces and densities
The underlying density/subspace is represented by U (orthonormal) and S (diagonal) such as rho = U S^2 U^T
Field Summary | |
---|---|
it.unimi.dsi.fastutil.ints.Int2IntSortedMap |
map
Map from global id (index-based) to local ids - the map should be ordered (this is needed for fast intersections) |
bpiwowar.maths.matrix.DiagonalDoubleMatrix |
mS
The singular values |
bpiwowar.maths.matrix.DoubleMatrix2D |
mU
The basis of the subspace |
Constructor Summary | |
---|---|
EigenDecomposition(DensityTracker tracker,
boolean deepCopy)
Construct a new eigen decomposition subspace/density based on a density tracker |
|
EigenDecomposition(bpiwowar.maths.matrix.DoubleMatrix1D ray,
boolean local)
Creates a one dimensional eigen-decomposition representation |
|
EigenDecomposition(bpiwowar.maths.matrix.DoubleMatrix2D u,
bpiwowar.maths.matrix.DiagonalDoubleMatrix s,
it.unimi.dsi.fastutil.ints.Int2IntSortedMap map)
|
|
EigenDecomposition(bpiwowar.maths.matrix.DoubleMatrix2D mU,
bpiwowar.maths.matrix.DiagonalDoubleMatrix mS,
it.unimi.dsi.fastutil.ints.Int2IntSortedMap map,
boolean deepCopy)
|
|
EigenDecomposition(bpiwowar.maths.svd.IncrementalSVD svd,
it.unimi.dsi.fastutil.ints.Int2IntSortedMap map)
|
Method Summary | |
---|---|
bpiwowar.maths.matrix.DoubleMatrix2D |
getGlobalMatrix(int dimension)
Get a matrix representation of this density (mostly to be used for debugging) |
int[] |
getLocalToGobalTermIdMap()
Return the reverse map |
bpiwowar.maths.matrix.DoubleMatrix2D |
getMatrix()
Get a matrix representation of this density (mostly to be used for debugging) |
int |
getRank()
|
bpiwowar.maths.matrix.DiagonalDoubleMatrix |
getS()
|
double |
normalise()
Normalise with the L2 norm |
double |
normalise(boolean orthonormalU)
Normalise the decomposition so that || U x S || = 1, i.e. |
double |
normalise(boolean orthonormalU,
cern.colt.function.DoubleFunction g,
cern.colt.function.DoubleDoubleFunction aggr,
cern.colt.function.DoubleFunction f)
Normalise the decomposition by a given norm normaliser = g(aggr_{i=1..n} f(x_i) ) |
void |
trim(int newRank)
Trim the eigenvalue decomposition to a lower rank |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public bpiwowar.maths.matrix.DiagonalDoubleMatrix mS
public bpiwowar.maths.matrix.DoubleMatrix2D mU
public final it.unimi.dsi.fastutil.ints.Int2IntSortedMap map
Constructor Detail |
---|
public EigenDecomposition(bpiwowar.maths.matrix.DoubleMatrix2D u, bpiwowar.maths.matrix.DiagonalDoubleMatrix s, it.unimi.dsi.fastutil.ints.Int2IntSortedMap map)
public EigenDecomposition(bpiwowar.maths.svd.IncrementalSVD svd, it.unimi.dsi.fastutil.ints.Int2IntSortedMap map)
public EigenDecomposition(DensityTracker tracker, boolean deepCopy)
tracker
- The tracker from which to build this densitydeepCopy
- If all the structures underlying structures should be cloned
(this is only for efficiency issues, note that at least the
diagonal matrix will be cloned)public EigenDecomposition(bpiwowar.maths.matrix.DoubleMatrix2D mU, bpiwowar.maths.matrix.DiagonalDoubleMatrix mS, it.unimi.dsi.fastutil.ints.Int2IntSortedMap map, boolean deepCopy)
public EigenDecomposition(bpiwowar.maths.matrix.DoubleMatrix1D ray, boolean local)
ray
- The vectorMethod Detail |
---|
public double normalise()
public bpiwowar.maths.matrix.DiagonalDoubleMatrix getS()
public double normalise(boolean orthonormalU)
orthonormalU
- Should we expect U to be orthonormal (which should be the case
normally)?
public double normalise(boolean orthonormalU, cern.colt.function.DoubleFunction g, cern.colt.function.DoubleDoubleFunction aggr, cern.colt.function.DoubleFunction f)
orthonormalU
- Should we expect U to be orthonormal (which should be the case
normally)?
public void trim(int newRank)
newRank
- The new rank of the subspacepublic int getRank()
public int[] getLocalToGobalTermIdMap()
tracker
-
public bpiwowar.maths.matrix.DoubleMatrix2D getMatrix()
public bpiwowar.maths.matrix.DoubleMatrix2D getGlobalMatrix(int dimension)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |