uk.ac.gla.dcs.renaissance.kqpr
Class Density<T extends KernelVector>

java.lang.Object
  extended by uk.ac.gla.dcs.renaissance.kqpr.KernelEigenDecomposition<T>
      extended by uk.ac.gla.dcs.renaissance.kqpr.Density<T>
All Implemented Interfaces:
Serializable

public class Density<T extends KernelVector>
extends KernelEigenDecomposition<T>

A probability density

Author:
B. Piwowarski
See Also:
Serialized Form

Field Summary
 
Fields inherited from class uk.ac.gla.dcs.renaissance.kqpr.KernelEigenDecomposition
mS, mY
 
Constructor Summary
Density(KernelEVD<T> evd, boolean deepCopy)
          Creates a new density
 
Method Summary
 double computeProbability(Subspace<T> subspace, boolean fuzzyEvent)
          Compute the probability of an event
 bpiwowar.maths.matrix.DoubleMatrix2D getProbabilityMatrix(Subspace<T> subspace, boolean fuzzyEvent)
          Pre-computation of a probability.
 bpiwowar.maths.matrix.DoubleMatrix2D getProbabilityMatrix(T vector)
          Get the matrix v^T * (U x S) where U is the basis and S is the square root of the eigenvalues.
 
Methods inherited from class uk.ac.gla.dcs.renaissance.kqpr.KernelEigenDecomposition
getRank, normalise, normalise, trim
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Density

public Density(KernelEVD<T> evd,
               boolean deepCopy)
Creates a new density

Parameters:
evd -
deepCopy -
Method Detail

computeProbability

public final double computeProbability(Subspace<T> subspace,
                                       boolean fuzzyEvent)
Compute the probability of an event

Parameters:
subspace - The event
fuzzyEvent - The event should be considered as "fuzzy" -- i.e. each dimension is weighted by the corresponding sigma
Returns:

getProbabilityMatrix

public bpiwowar.maths.matrix.DoubleMatrix2D getProbabilityMatrix(Subspace<T> subspace,
                                                                 boolean fuzzyEvent)
Pre-computation of a probability. This method is shared by others.

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.

Parameters:
subspace -
fuzzyEvent -
Returns:

getProbabilityMatrix

public bpiwowar.maths.matrix.DoubleMatrix2D getProbabilityMatrix(T vector)
Get the matrix v^T * (U x S) where U is the basis and S is the square root of the eigenvalues. The Froebenius norm of the resulting matrix is the probability of the event defined by v x v^t

Parameters:
vector - The vector v
Returns:


Copyright © 2011. All Rights Reserved.