# Bayes space

Bayes space is a function space defined as an equivalence class of measures with the same null-sets. Two measures are defined to be equivalent if they are proportional. The basic ideas of Bayes spaces have their roots in Compositional Data Analysis and the Aitchison geometry. Applications are mainly in statistics, specifically functional data analysis of density functions.
The basic structure of the Bayes space is that of a vector space, with addition and multiplication being defined by perturbation and powering. The space is formed over a $\sigma$-finite reference/base measure, denoted $\lambda$ or $P$ depending on whether it is infinite or finite. Densities are considered as Radon-Nikodym derivatives of the measures with same null-sets as the base measure, and are equivalent if they are proportional. In case of finite base measures, Hilbert space structure can be achieved by defining a centered log-ratio on the measures, mapping them to a subset of $L^{2}(P)$ consisting of funtions integrating to 0

## Definitions and main results

Consider a finite base measure $P$ (not necessarily a probability measure) on a domain $\Omega$. This may be a uniform distribution on a bounded interval, or it can be a Radon-Nikodym derivative of the Lebesgue measure (the Gaussian distribution, for example). If we take two densities $f,g$ with respect to $P$, they are said to be B-equivalent if there exists a $c>0$ s.t $f(x)=c\cdot g(x)$, denoted $f=_{B}g$ (the convention $c\cdot \infty =\infty$ is used in cases where a measure is infinite). It can be shown that $(=_{B})$ is an equivalence relation. The Bayes space $B(P)$ is defined as the quotient space of all measures with the same null-sets in $\Omega$ as $P$ under the equivalence relation $(=_{B})$.
The first challenge to analysing density functions is that $B(P)$ is not linear space under ordinary addition and multiplication since the ordinary difference between two densities would not be non-negative everywhere. Like in the Aitchison geometry for finite dimensional data, perturbation and powering is defined for densities:
Perturbation
(f⊕g)(x)=$_B$f(x)⋅g(x){\textstyle (f\oplus g)(x)=_{B}f(x)\cdot g(x)}
Powering
α⊙f(x)=$_B$f(x)$^α${\textstyle \alpha \odot f(x)=_{B}f(x)^{\alpha }}
where $f(x),{\text{ }}g(x)$ are densities in $B(P)$ and $\alpha$ is some real number. It can be shown using the properties of multiplication and powering of real numbers that $(B(P),\oplus ,\odot )$ forms a vector space over the real numbers.
The definition of Bayes space does not strictly require a finite reference measure $P$. If Bayes space is defined over an infinite reference measure $\lambda$, it must be $\sigma$-finite (like the Lebesgue measure). The finite reference measure is, however, necessary for adding Hilbert space structure to a subset of $B(P)$. Consider the subspace
B$^p$(P)={f∈B(P)|∫$_Ω$|log⁡(f(x))|$^p$dP(x)<∞}{\textstyle B^{p}(P)=\{f\in B(P)|\int _{\Omega }|\log(f(x))|^{p}dP(x)<\infty \}}. For $p=2$, this is a linear subspace and isometrically isomorphic to the Hilbert space L$_0$$^2$(P)={g∈L$^2$(P):∫$_Ω$g(x)dP(x)=0}{\textstyle L_{0}^{2}(P)=\{g\in L^{2}(P):\int _{\Omega }g(x)dP(x)=0\}} via the centered log-ratio (clr) transformation ${\text{clr}}(f(x))=\log(f(x))-{\frac {1}{P(\Omega )}}\int \log(f(x))dP(x)\in L_{0}^{2}(P)$. The subspace of log-square integrable functions is termed the Bayes Hilbert space. It can be shown that the clr-transformation is a linear isomorphism between the two spaces. Defining an inner product on $B^{2}(P)$ as the inner product of the clr-transformations will provide the Hilbert space structure for $B^{2}(P)$, obtaining the centered log-ratio as a linear isometry.

## Multivariate densities

The measure $P$ does not have to be univariate (1 dimensional), but can also be defined as a product measure on cartesian products, characterising bivariate (2 dimensional) or multivariate densities. The geometric structure of Hilbert spaces can be used to decompose multivariate densities into orthogonal independent and interaction parts., using the concept of "clr-marginals". This decomposition has relations to copula theory. The geometry in $B^{2}(P)$ defines norms on densities that can be used to quantify "relative simplicial deviance," which is measure of how much of a bivariate distribution can be explained by assuming independence