uk.ac.gla.dcs.renaissance.iqir
Class SubspaceTracker

java.lang.Object
  extended by uk.ac.gla.dcs.renaissance.iqir.SubspaceTracker
All Implemented Interfaces:
Serializable

Deprecated. Use DensityTracker (a new implementation based on rank-one updates of an eigenvalue decomposition)

@Persistent
@Deprecated
public class SubspaceTracker
extends Object
implements Serializable

Track subspaces defined by a set of vectors

Builds a subspace using the incremental SVD implementation. The only difference with incremental SVD is that this class handles sparse vectors (so that all the operations in the SVD are on dense vectors).

This class

Author:
Benjamin Piwowarski
See Also:
Serialized Form

Field Summary
 it.unimi.dsi.fastutil.ints.Int2IntRBTreeMap map
          Deprecated. Map a word id to a new id such that we deal only with dense matrices
 bpiwowar.maths.svd.IncrementalSVD negativesvd
          Deprecated. Our current SVD decomposition (negative subspace)
 bpiwowar.maths.svd.IncrementalSVD svd
          Deprecated. Our current SVD decomposition
 
Constructor Summary
SubspaceTracker()
          Deprecated.  
 
Method Summary
 void add(double weight, bpiwowar.maths.matrix.DoubleMatrix1D weightedVector)
          Deprecated. Add a set of words
 void add(double sigma, bpiwowar.maths.matrix.DoubleMatrix1D u, int[] localToGlobalMap)
          Deprecated. Add a sigma * u to the column space, using the map to go from one id to another.
 void add(bpiwowar.maths.matrix.DoubleMatrix1D weightedVector)
          Deprecated. Add a set of words
 void addLocal(boolean negative, bpiwowar.maths.matrix.DenseDoubleMatrix1D weightedLocalVector)
          Deprecated. Add a dense vector (i.e.
 int[] getLocalToGlobalTermIdMap()
          Deprecated. Return the reverse map
 int getNumberOfSpannedColumns()
          Deprecated.  
 int getNumberOfTerms()
          Deprecated.  
 bpiwowar.maths.matrix.DenseDoubleMatrix1D getSum()
          Deprecated.  
 void setCompactionInterval(int compactInterval)
          Deprecated. Set the compaction interval (i.e.
 void setStoreVectorSum(boolean b)
          Deprecated. Should we store the sum of vectors?
 void trim(boolean trimMatrices)
          Deprecated. Reduce as much as possible the space taken by the representation, by removing terms which are not needed anymore (their row in the SVD decomposition is 0), and by adjusting the matrix size if needed
 void updateMap(int[] list)
          Deprecated. Update our global to local map with another map (i.e., the global ids of the other map will be known by ours)
 void updateMap(it.unimi.dsi.fastutil.ints.Int2IntMap otherMap)
          Deprecated. Update our global to local map with another map (i.e., the global ids of the other map will be known by ours)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

public it.unimi.dsi.fastutil.ints.Int2IntRBTreeMap map
Deprecated. 
Map a word id to a new id such that we deal only with dense matrices


svd

public bpiwowar.maths.svd.IncrementalSVD svd
Deprecated. 
Our current SVD decomposition


negativesvd

public bpiwowar.maths.svd.IncrementalSVD negativesvd
Deprecated. 
Our current SVD decomposition (negative subspace)

Constructor Detail

SubspaceTracker

public SubspaceTracker()
Deprecated. 
Method Detail

add

public void add(bpiwowar.maths.matrix.DoubleMatrix1D weightedVector)
Deprecated. 
Add a set of words

Parameters:
weightedVector - The word vector within the global term id space

add

public void add(double weight,
                bpiwowar.maths.matrix.DoubleMatrix1D weightedVector)
Deprecated. 
Add a set of words

Parameters:
weight - The global weight for the vector
weightedVector - The word vector within the global term id space

addLocal

public void addLocal(boolean negative,
                     bpiwowar.maths.matrix.DenseDoubleMatrix1D weightedLocalVector)
Deprecated. 
Add a dense vector (i.e. already in the local term id space)

Parameters:
weightedLocalVector - The vector to add

add

public void add(double sigma,
                bpiwowar.maths.matrix.DoubleMatrix1D u,
                int[] localToGlobalMap)
Deprecated. 
Add a sigma * u to the column space, using the map to go from one id to another. Warning: for efficiency reasons, the map of this subspace tracker must have been updated with #updateMap(Int2IntOpenHashMap)

Parameters:
sigma - The sigma for the u dimension
u - The vector to add
localToGlobalMap - The map to convert a local index (in u) to a global word id

getLocalToGlobalTermIdMap

public int[] getLocalToGlobalTermIdMap()
Deprecated. 
Return the reverse map

Parameters:
tracker -
Returns:

updateMap

public void updateMap(it.unimi.dsi.fastutil.ints.Int2IntMap otherMap)
Deprecated. 
Update our global to local map with another map (i.e., the global ids of the other map will be known by ours)

Parameters:
otherMap - The other map to include

updateMap

public void updateMap(int[] list)
Deprecated. 
Update our global to local map with another map (i.e., the global ids of the other map will be known by ours)

Parameters:
list - The list of global term ids to add

getNumberOfSpannedColumns

public int getNumberOfSpannedColumns()
Deprecated. 

getNumberOfTerms

public int getNumberOfTerms()
Deprecated. 

trim

public void trim(boolean trimMatrices)
Deprecated. 
Reduce as much as possible the space taken by the representation, by removing terms which are not needed anymore (their row in the SVD decomposition is 0), and by adjusting the matrix size if needed

Parameters:
trimMatrices - True if the matrices of the SVD decomposition should be trimmed after the cleaning process

setCompactionInterval

public void setCompactionInterval(int compactInterval)
Deprecated. 
Set the compaction interval (i.e. number of vectors added before we start compacting the structures)

Parameters:
compactInterval -

setStoreVectorSum

public void setStoreVectorSum(boolean b)
Deprecated. 
Should we store the sum of vectors?

Parameters:
b - True to store, false to not store

getSum

public bpiwowar.maths.matrix.DenseDoubleMatrix1D getSum()
Deprecated. 
Returns:
the sum


Copyright © 2011. All Rights Reserved.