Kernel Quantum Probability Library
The KQP library aims at providing tools for working with quantums probabilities
Public Member Functions
kqp::Density< Scalar > Class Template Reference

#include <probabilities.hpp>

Inheritance diagram for kqp::Density< Scalar >:
kqp::KernelOperator< Scalar >

Public Member Functions

 KQP_SCALAR_TYPEDEFS (Scalar)
 
 Density (const KernelEVD< Scalar > &evd)
 
 Density (const FSpaceCPtr &fs, const FMatrixCPtr &mX, const ScalarAltMatrix &mY, const RealVector &mD, bool orthonormal)
 
 Density (const FSpaceCPtr &fs, const FMatrixCPtr &mX, bool orthonormal)
 
 Density (const Decomposition< Scalar > &d)
 
void normalize ()
 Normalise the density.
 
Real probability (const Event< Scalar > &event) const
 
RealVector eigenProbabilities (const Event< Scalar > &event, bool noEigenValues) const
 
Real entropy () const
 Computes the entropy.
 
Real computeDivergence (const Density< Scalar > &tau) const
 
Real computeDivergence (const Density< Scalar > &tau, Real epsilon) const
 Computes the divergence with another density.
 
- Public Member Functions inherited from kqp::KernelOperator< Scalar >
 KQP_SCALAR_TYPEDEFS (Scalar)
 
 KernelOperator (const KernelEVD< Scalar > &evd)
 
 KernelOperator (const Decomposition< Scalar > &d)
 
 KernelOperator (const FSpaceCPtr &fs, const FMatrixCPtr &mX, const ScalarAltMatrix &mY, const RealVector &mS, bool orthonormal)
 Creates a new kernel operator.
 
void trim (Index newRank)
 
Index getRank () const
 
const FSpaceBase & fs () const
 Get the feature space.
 
const FMatrixBase & X () const
 Get the feature matrix.
 
const ScalarAltMatrix & Y () const
 
const RealAltVector & S () const
 
void orthonormalize () const
 
bool isOrthonormal () const
 
Real squaredNorm ()
 
ScalarMatrix inners (const KernelOperator< Scalar > &that) const
 Compute the inner products of the scaled basis of the operators.
 
FMatrixPtr matrix () const
 Get the matrix corresponding to the decomposition.
 

Additional Inherited Members

- Protected Member Functions inherited from kqp::KernelOperator< Scalar >
void _orthonormalize ()
 Orthonormalize the decomposition (non const version)
 
- Protected Attributes inherited from kqp::KernelOperator< Scalar >
Decomposition< Scalar > m_operator
 The current decomposition.
 

Detailed Description

template<typename Scalar>
class kqp::Density< Scalar >

A probability density

Author
B. Piwowarski benja.nosp@m.min@.nosp@m.bpiwo.nosp@m.war..nosp@m.net

Constructor & Destructor Documentation

template<typename Scalar>
kqp::Density< Scalar >::Density ( const KernelEVD< Scalar > &  evd)
inline

Creates a new density

Parameters
evd
deepCopy

Member Function Documentation

template<typename Scalar>
Real kqp::Density< Scalar >::computeDivergence ( const Density< Scalar > &  tau,
Real  epsilon 
) const
inline

Computes the divergence with another density.

Computes the divergence defined in the paper "Conditional expectation in an operator algebra. IV. Entropy and information" by H. Umegaki (1962), at page 69. The formula is:

\[ J(\rho || \tau) = tr(\rho \log (\rho) - \rho \log(\tau))) \]

template<typename Scalar>
RealVector kqp::Density< Scalar >::eigenProbabilities ( const Event< Scalar > &  event,
bool  noEigenValues 
) const
inline

Computes the probabilities associated with each eigen vector

Parameters
eventThe event for which probabilities should be computed
noEigenValuesDo not multiply by the eigen values
template<typename Scalar>
Real kqp::Density< Scalar >::probability ( const Event< Scalar > &  event) const
inline

Compute the probability of an event

Parameters
eventThe event for which the probability is computed The event
Returns
The probability

The documentation for this class was generated from the following file: