accelerate-kullback-liebler-0.1.2.1: Kullback-Liebler divergence
Safe HaskellNone
LanguageHaskell2010

Data.Array.Accelerate.KullbackLiebler

Synopsis
  • kullbackLiebler :: Floating e => Acc (Vector e) -> Acc (Vector e) -> Acc (Scalar e)
  • entropy :: Floating e => Acc (Vector e) -> Acc (Scalar e)
  • dropZeroes :: (Eq e, Num (Exp e)) => Acc (Vector e) -> Acc (Vector e)
  • scale :: Floating e => Acc (Vector e) -> Acc (Vector e)
  • hellinger :: Floating e => Acc (Vector e) -> Acc (Vector e) -> Acc (Scalar e)
  • fDivergence :: Floating e => (Exp e -> Exp e) -> Acc (Vector e) -> Acc (Vector e) -> Acc (Scalar e)
  • alphaDivergence :: Floating e => Exp e -> Acc (Vector e) -> Acc (Vector e) -> Acc (Scalar e)

Documentation

kullbackLiebler :: Floating e => Acc (Vector e) -> Acc (Vector e) -> Acc (Scalar e) Source #

Assumes input is nonzero

entropy :: Floating e => Acc (Vector e) -> Acc (Scalar e) Source #

Assumes input is nonzero

dropZeroes :: (Eq e, Num (Exp e)) => Acc (Vector e) -> Acc (Vector e) Source #

scale :: Floating e => Acc (Vector e) -> Acc (Vector e) Source #

Doesn't check for negative values

Since: 0.1.1.0

hellinger :: Floating e => Acc (Vector e) -> Acc (Vector e) -> Acc (Scalar e) Source #

Hellinger distance

Since: 0.1.2.0

fDivergence Source #

Arguments

:: Floating e 
=> (Exp e -> Exp e)

\(f\)

-> Acc (Vector e) 
-> Acc (Vector e) 
-> Acc (Scalar e) 

\( D_f(p \| q) = \displaystyle\int p(x) f\left(\frac{p(x)}{q(x)}\right) dx \)

Since: 0.1.2.0

alphaDivergence :: Floating e => Exp e -> Acc (Vector e) -> Acc (Vector e) -> Acc (Scalar e) Source #

\( D^{(\alpha)}(p\| q) = \frac{4}{1 - \alpha^2}\left(1 - \displaystyle\int p(x)^{\frac{1-\alpha}{2}} q(x)^{\frac{1+\alpha}{2}} dx\right)\) for \( \alpha \neq \pm 1\)

Since: 0.1.2.0