# A note on averaging prediction accuracy, Green’s functions and other kernels

Juan Galvis Departamento de Matemáticas, Universidad Nacional de Colombia,
Carrera 45 No. 26-85, Edificio Uriel Gutierréz, Bogotá D.C., Colombia,
{jcgalvisa, fohernandezr<EMAIL_ADDRESS>Freddy Hernández-Romero∗
Francisco Gómez∗

###### Abstract

We present the mathematical context of the predictive accuracy index and then
introduce the definition of integral average transform. We establish the
relation of our definition with two variables kernels $K({\bf y},{\bf x})$. As
an example of an application we show that integrating against the fundamental
solution of the Laplace operator, that is, solving the Poisson equation, can
be re-interpreted as an integral of averages of the forcing term over balls.
As a result, we obtained a novel integral representation of the solution of
the Poisson equation. Our motivation comes from the need for a better
mathematical understanding of the prediction accuracy index. This index is
used to identify hot spots in predictive security and other applications.

MSC2020: 35C15, 35Q62, 60-04.

##  1 Introduction

We start by analyzing a procedure that is used in predictive security
applications to identify crime hot spots, [2, 8, 4, 9]. This procedure is
known as the Prediction Accuracy Index (PAI) and it is used to compare among
possible hot spots regions. In this context, a higher PAI is preferred to a
lower one. In particular, in some applications it is used (along side other
measures such as distances and divergences [9, 4]) as an indicator of
similarity between two densities of random variables (a density from a
prediction and the other from an observation). Roughly speaking, the PAI of a
region is defined as the ratio between the hit rate and the volume proportion
(see [2, 8, 4] and the next section). When the PAI is used as a similarity
measure between two densities, say $\phi$ and $\psi$, this indicator is
computed as follows

  1. 1.

Identify several regions of high probability according to $\psi$.

  2. 2.

Evaluate the PAI on each one of the regions identified before. Here the idea
is that higher values of PAI will indicate certain similarity between $\phi$
and $\psi$.

In case several regions of high-probability are selected in 1. and 2. above,
one can add to this procedure the following:

  1. 3.

Compute the average among the PAI indicators obtained above. See Section 2.

Our preliminary analysis readily shows that PAI measures (even average ones)
shall not be used as a similarity measure between two densities and it have to
be used cautiously to identify hot spots. See also [8, 4, 9] for some other
issues related to the PAI indicator. We believe this is an important take home
message in this note. See Remark 1.

Anyhow, the procedure described above (1., 2. and 3.) led us to the definition
of the integral average transform. See Section 3 and Remark 2. The integral
average transform is defined for a given function $f({\bf y})$, assumed
regular enough just to fix ideas. The transform is the result of integrating
plain unweighted averages of $f$ over a family of neighborhoods of a point
${\bf x}$, say $B_{s,{\bf x}}$ that is indexed by the real parameter $s$. Note
that we are talking about plain averages $\frac{1}{|B_{s,{\bf
x}}|}\int_{B_{s,{\bf x}}}f$ and not weighted averages such as
$\frac{1}{|B_{s,{\bf x}}|}\int_{B_{s,{\bf x}}}\omega f$. See (12) for a
precise definition. We show that this procedure is equivalent to computing
integrals against a two variables kernel $K({\bf y},{\bf x})$ with a possible
singularity at $x$, that is, computing,

$\int f({\bf y})K({\bf y},{\bf x})d{\bf y}.$

We also show that the integral above can be interpreted as an integral average
transform, that is, an integral of regular averages of $f$ over a parametrized
family of regions. As an example of application we show that integrating
against the fundamental solution of the Laplace equation, that is, solving the
Poisson equation, can be re-interpreted as an integral of averages of the
forcing terms over balls. See Section 3 and Remark 5.

The rest of the paper is organized as follows. In Section 2 we present the
mathematical context related to the PAI including some modification know as
the penalized PAI. We introduce the average PAI that motivates our main
definition. In Section 3 we present the definition of integral average
transform and, as an application of this novel interpretation of kernels, we
show how to write the fundamental solution of the Laplace operator as an
integral average transform. In Section 4 we present some final comments.

##  2 Averaging prediction accuracy

In this section we present the motivation that lead us to study integrals of
average of function on parametrized regions.

Let us consider the real random variables $X$ and $Y$. Denote by
$\phi=d\mu_{X}$ and $\psi=d\mu_{Y}$ be probability density functions
associated with $X$ and $Y$, respectively. Given a measurable set $B$ we write
$|B|$ for the Lebesgue measure of $B$. Denote by $[\psi>r]$ the set with
probability density level higher (greater) than $r\in\mathbb{R}$, that is,

$[\psi>r]=\\{{\bf z}\in\mathbb{R}^{n}:\quad\psi({\bf
z})>r\\}=\psi^{-1}((r,+\infty)).$ (1)

Let us define $R:=\max_{\bf z}\psi({\bf z})$. In some practical applications a
threshold value $r\in(0,R)$ is determined and the region
$[\psi>r]\subset\mathbb{R}^{n}$ is refereed to as _hot spot area_ (and in case
of being the union of disjoint small regions these regions are know as hot
spots), see [2] and references therein. In fact, note that if $r$ is close to
$R$ the set $[\psi>r]\subset\mathbb{R}^{n}$ will contain the most probable
occurrences of $Y$.

It is common in applications to use the hot spots of the random variable $Y$
to predict the hot spots of another a random variable $X$. A common way to
measure the performance of such predictions is by using the so-called
_Prediction Accuracy Index_ (PAI) defined next (see [2]). In some cases, when
several possible predictions of $X$ are available, it is used the PAI measure
to decide which model to use to report hots spots predictions of the target
$X$. See [2, 8].

In order to fix ideas and simplify the presentation we assume that $\phi$ and
$\psi$ are continuous functions but we can as well consider discretized
version up to some given spatial resolution as it is most common in
applications.

###  2.1 PAI of a subregion

Assume that we want to analyze a measurable study region $A$ with positive
volume measure. Region $A$ corresponds to the study region where the random
variable $X$ occur. The region $B\subset A$ is a possible hot spot region for
$X$ in $A$. Define the hit rate by ([2])

$H_{\phi}(B)=\frac{\displaystyle\int_{B}\phi}{\displaystyle\int_{A}\phi}.$

If $|B|>0$ define the average of $\phi$ on $B$ by

$\fint_{B}\phi=\frac{1}{|B|}\int_{B}\phi.$

Note that in our notation for $H_{\phi}$ we do not make explicit reference to
the region $A$ since we assume $A$ is fixed. A commonly used indicator ([2])
of the quality of using $B$ to approximate the hot spots of $X$ in $A$ is
given by the ratio of the hit rate with the percentage of volume
$\frac{|B|}{|A|}$, that is,

$PAI_{\phi}(B)=\frac{H_{\phi}(B)}{\frac{|B|}{|A|}}=\frac{|A|}{\displaystyle\int_{A}\phi}\frac{\displaystyle\int_{B}\phi}{|B|}=\frac{\displaystyle\fint_{B}\phi}{\displaystyle\fint_{A}\phi}.$

Note that the $PAI_{\phi}(B)$ can also be written as the ratio between the
averages of $\phi$ on $B$ and $A$ which gives another interpretation of the
$PAI$ that readily reveals some possible issues with this indicator such as
the preferences for small subregions with high-value of $\phi$.

In order to better understand this indicator we present some simple examples.
Note that if $B=A$ we get $PAI_{\phi}(B)=1$. If for instance we select $B$
with volume percentage

$\frac{|B|}{|A|}=0.5$

and hit rate

$H(B)=0.5$

we still have $PAI_{\phi}(B)=1$ since we can predict half of occurrences of
$X$ in half of the study area. Assume now that we have

$\frac{|B|}{|A|}=0.2\mbox{ and }H(B)=0.8.$

We then have $PAI_{\phi}(B)=4$ since we can predict 80% of occurrences of $X$
in 20% of the study area.

In practical applications we are interested in finding regions with a high
value of PAI for a given density $\phi$. We make the following observations:

  * •

Since we always have $\fint_{B}\phi\leq R=\max_{{\bf
z}\in\mathbb{R}^{n}}\phi({\bf z})$ we see that

$PAI_{\phi}(B)=\frac{\displaystyle\fint_{B}\phi}{\displaystyle\fint_{A}\phi}\leq\frac{R}{\displaystyle\fint_{A}\phi}.$

  * •

Let $\phi^{-1}(R)=\\{{\bf z}\in\mathbb{R}^{n}\,:\,\phi({\bf
z})=R\\}=\arg\max_{\bf z}\psi({\bf z})$. If $B^{*}=\phi^{-1}(R)\cap A$ is such
that $|B^{*}|>0$ then $B^{*}$ and all its possitive measure subsets maximizes
the PAI indicator. In fact, for all $\widetilde{B}\subset B^{*}$ such that
$|\widetilde{B}|>0$ we have

$PAI_{\phi}(\widetilde{B})=\frac{R}{\displaystyle\fint_{A}\phi}.$

We then see that, in practical applications the PAI indicator will favor small
area regions around the maximum values of the density $\phi$. Here small will
depend on the spatial resolution at which subregions are computed. This might
not be convenient in some applications as pointed out in [8].

  * •

If $B^{*}$ defined above is such that $|B^{*}|=0$ then, given a subregion
$\widetilde{B}\subset A$ with $|\widetilde{B}|>0$ and
$B^{*}\subsetneq\widetilde{B}$, there always exists $\widehat{B}$ with
$|\widehat{B}|>0$ and $B^{*}\subsetneq\widehat{B}\subsetneq\widetilde{B}$ such
that

$PAI_{\phi}(\widetilde{B})<PAI_{\phi}(\widehat{B})=\frac{\displaystyle\fint_{\widehat{B}}\phi}{\displaystyle\fint_{A}\phi}<\frac{R}{\displaystyle\fint_{A}\phi}.$

Therefore we see that searching for Borel subregions with as high PAI as
possible is not a well posed problem under general considerations. Other
possible optimization problems may be needed for practical applications. See
[8, 4, 9] for more details.

Due to the fact that the PAI indicator prefers small area regions some
modifications have been introduced. Among them, in [8] was introduced a
penalized PAI where the area ratio is penalized, that is,

$PPAI_{\phi}(B)=\frac{H_{\phi}(B)}{\left(\frac{|B|}{|A|}\right)^{\alpha}}=\left(\frac{|B|}{|A|}\right)^{1-\alpha}PAI_{\phi}(B)=\lambda(B)PAI(B).$

Here there was introduced the penalization $\lambda(B)$. The exponent $\alpha$
may depend on $B$, e.g., $\alpha=H_{\phi}(B)$ (and in this case, for small hit
rate, the indicator is penalized multiplicatively by the volume proportion of
the region $B$ while for large hit rate close to 1 we do not have that
penalization, [8]). Many other penalization alternatives can also be consider
at the light of practical applications. For instance, a penalization of the
form

$\lambda(B)=\frac{|B|}{|\partial B|}$

where $|\partial B|$ is the surface volume of $\partial B$ with $B$ regular
enough. See (17) below.

One additional observation is the following. One can think to compute an
average of several PAI values over subregions. Let

$B_{N}\subseteq B_{N-1}\subseteq\cdots\subseteq B_{1}$

and consider

$\mbox{av}P=\frac{1}{N}\sum_{i=1}^{N}PPAI_{\phi}(B_{i}).$

Define the piecewise constant layered function

$K({\bf x})=\frac{1}{N}\sum_{i=1}^{k}\lambda(B_{i})\frac{1}{|B_{i}|\ \ }\mbox{
for }{\bf x}\in B_{k}\setminus B_{k+1},$

$k=1,\dots,N$, where $B_{N+1}=\emptyset$. We have that

$\mbox{av}P=\frac{|A|}{\displaystyle\int_{A}\phi}\ \
\int_{\mathbb{R}^{n}}\phi({\bf x})K({\bf x})d{\bf x}.$ (2)

Note that the function $K$ depends on the sets $B_{i}$ and the weight
$\lambda$ but we not make this dependence explicit in our notation. We
conclude that the average value (of PAI indicators) over some regions
corresponds to the inner product between $\phi$ and a piecewise constant
function that weights the regions by the inverse their areas penalized by
$\lambda$. The layered function $K$ can be taught as an approximation of a
kernel that has singularities in the region $B_{N}$ where it takes maximum
value.

###  2.2 PAI of a random variable

Recall that $\psi$ is the density of the random variable $Y$ that we want to
use to predict the hot spots of the random variable $X$. See [2]. Assume that
$\psi$ is continuous and that $\int_{A}\psi>0$. For any $s\in[0,1]$ define
$r=r(s)$ by

$r(s)=\inf\Big{\\{}r\geq 0:\quad\int_{[\psi>r]\cap
A}\psi=(1-s)\int_{A}\psi\Big{\\}}$ (3)

and the subregion $B_{s}$ by

$B_{s}=B_{s}(\psi)=[\psi>r(s)]\cap A.$ (4)

Define the prediction accuracy index at level $s$ as the PPAI of the subregion
$B_{s}$.

$p(s)=p(s;\psi,\phi)=PPAI_{\phi}(B_{s})=\frac{|A|}{\displaystyle\int_{A}\phi}\lambda(B_{s})\frac{\displaystyle\int_{B_{s}}\phi}{|B_{s}|}.$
(5)

As before, the $s$ level prediction accuracy index is computed by dividing the
hit rate by the volume percentage using the region $B=[\psi>r(s)]$ and
multiplying by a penalization.

From the comments on the previous subsection we have for the case $\lambda=1$
(no penalization),

  * •

$p(s;\psi,\phi)\leq\frac{R}{\fint_{A}\phi}$

  * •

$\frac{r(s)}{\fint_{A}\phi}\leq p(s;\phi,\phi)\leq\frac{R}{\fint_{A}\phi}$

  * •

If $B^{*}=\phi^{-1}(R)\cap A$ is such that $|B^{*}|>0$ then
$p(1;\phi,\phi)=\frac{R}{\fint_{A}\phi}$.

  * •

If $B^{*}$ defined above is such that $|B^{*}|=0$ and there exists $s\in(0,1)$
such that $B_{s}\subset A$ with $|B_{s}|>0$ and $B^{*}\subsetneq B_{s}$, then
for $\epsilon>0$ small enough we have $B_{s}\subsetneq B_{s-\epsilon}$ and

$p(s-\epsilon;\phi,\phi)<p(s;\phi,\phi)\leq\frac{R}{\fint_{A}\phi}.$

  * •

If $A=[\phi>0]$ (with finite volume) we have $p(0;\phi,\phi)=1$.

As mentioned before, in order to have an overall quantity, the performance may
be measured by an average of the prediction accuracy index at different
levels. More precisely, chose an integer $N$ and define

$P_{N}(\psi,\phi)=\frac{1}{N}\sum_{i=1}^{N}p\left(\frac{i}{N};\psi,\phi\right).$
(6)

Note that, under appropriate assumptions we shall have a limiting value when
$N\to\infty$. We define

$P(\psi,\phi)=\lim_{N\to\infty}P_{N}(\psi,\phi)=\int_{0}^{1}p(s;\psi,\phi)ds.$
(7)

###  2.3 Average PAI and kernels

Note that, by using Fubini’s theorem (see also (2)),

$\displaystyle P(\psi,\phi)$ $\displaystyle=$
$\displaystyle\frac{1}{\fint_{A}\phi}\int_{0}^{1}\frac{\lambda(B_{s})}{|B_{s}|}\int_{B_{s}}\phi({\bf
y})d{\bf y}\,ds$ $\displaystyle=$
$\displaystyle\frac{1}{\fint_{A}\phi}\int_{0}^{1}\displaystyle\int_{\mathbb{R}^{n}}\phi({\bf
y})\frac{\lambda(B_{s})}{|B_{s}|}{1}_{B_{s}}({\bf y})d{\bf y}\,ds$
$\displaystyle=$
$\displaystyle\frac{1}{\fint_{A}\phi}\int_{\mathbb{R}^{n}}\phi({\bf
y})\left(\int_{0}^{1}\frac{\lambda(B_{s})}{|B_{s}|}{1}_{B_{s}}({\bf
y})ds\right)d{\bf y}=\frac{1}{\fint_{A}\phi}\int_{\mathbb{R}^{n}}\phi
K_{\psi}d{\bf y}.$

Here we have introduced the “layered” function

$K_{\psi}({\bf y})=\int_{0}^{1}\frac{\lambda(B_{s})}{|B_{s}|}{1}_{B_{s}}({\bf
y})\,ds.$

In case $\psi$ is continuous then $K_{\psi}$ and $\psi$ have the same level
sets. Indeed, if we put $t(\bf{y})$ defined such that $r(t(\bf{y}))=\phi({\bf
y})$ where $r(s)$ is defined in (3) we have that

${\bf 1}_{B_{s}}({\bf y})=\begin{cases}1,&s\leq t(\bf{y})\\\
0,&s>t(\bf{y}).\end{cases}$

Then,

$K_{\psi}({\bf
y})=\int_{0}^{t(\bf{y})}\frac{\lambda([\psi>r(s)])}{|[\psi>r(s)]|}ds=\int_{0}^{t(\bf{y})}\frac{\lambda(B_{s})}{|B_{s}|}ds.$

Summarizing,

$P(\psi,\phi)=\frac{1}{\fint_{A}\phi}\int_{\mathbb{R}^{n}}\phi({\bf
y})K_{\psi}({\bf y})d{\bf y}.$ (8)

The $K_{\psi}$ is a positive function with the same level curves as $\psi$
with maximum value (and possible singularities) at
$B^{*}=\arg\max_{\mathbb{R}^{n}}\psi\cap A$. Appearance of singularities
depends on the integrability of the function

$s\mapsto\frac{\lambda(B_{s})}{|B_{s}|}=\frac{\lambda([\psi>r(s)])}{|[\psi>r(s)]|}\mbox{
in }[0,1].$

Therefore, the value
$P(\psi,\phi)=\frac{1}{\fint_{A}\phi}\int_{\mathbb{R}^{n}}\phi K_{\psi}d{\bf
x}$ will give higher weight to the regions containing
$B^{*}=\arg\max_{\mathbb{R}^{n}}\psi\,\cap A$. To further clarify our point we
present the next example.

Figure 1: Illustration of example 1 for $p=3$ and $p=1.5$. The function $\psi$
corresponds to the red dashed line and the function $K_{\psi}$ to the solid
green line. https://www.desmos.com/calculator/xcoi32o8bs .

###### Example 1

Consider $n=1$, $p>0$ and $\phi$ defined by

$\psi(x)=\begin{cases}0,&x<-1,\\\ \frac{1}{2}p(1-|x|)^{p-1}&-1\leq x<1,\\\
0,&1\leq x.\end{cases}$

We have $\int_{-1}^{1}\psi(x)=1$ and $\psi\geq 0$ and
$\max_{x}\psi(x)=\frac{1}{2}p$. Additionally if we take $A=[-1,1]$ we have
$|A|=2$ and it holds that the mass of the region $[\psi>r]$ is given by

$\int_{[\psi>r]}\psi=2\int_{0}^{1-(\frac{2r}{p})^{\frac{1}{p-1}}}\psi=1-\left(\frac{2r}{p}\right)^{\frac{p}{p-1}}.$

Therefore, given $s$, we can find $r(s)$ such that $\int_{[\psi>r]}\psi=1-s$
to obtain,

$r=r(s)=\frac{1}{2}ps^{\frac{p-1}{p}}.$

Then, the measure of the region $B_{s}=[\psi>r(s)]\cap A$ is the lengh of the
interval
$\left[-1+\left(\frac{2r}{p}\right)^{\frac{1}{p-1}},1-\left(\frac{2r}{p}\right)^{\frac{1}{p-1}}\right],$
that is,

$|B_{s}|=|[\psi\geq
r(s)]|=2\left(1-\left(\frac{2r}{p}\right)^{\frac{1}{p-1}}\right)=2\left(1-(s^{\frac{p-1}{p}})^{\frac{1}{p-1}}\right)=2(1-s^{\frac{1}{p}}).$

Given $y$, we can find $t(y)$ by

$r(t(y))=\frac{1}{2}pt^{\frac{p-1}{p}}=\frac{1}{2}p(1-x)^{p-1}$

which gives

$t=(1-x)^{p}.$

Thus we obtain for the case $\lambda=1$ and for $y>0$

$\displaystyle K_{\psi}(y)$ $\displaystyle=$
$\displaystyle\int_{0}^{t({y})}\frac{1}{|B_{s}|}ds$ (9) $\displaystyle=$
$\displaystyle\int_{0}^{(1-y)^{p}}\frac{1}{2(1-s^{\frac{1}{p}})}ds$ (10)
$\displaystyle=$
$\displaystyle\frac{1}{2}p\left(-\log(y)+\sum_{\ell=1}^{p-1}{{p-1}\choose\ell}\frac{(-1)^{\ell}}{\ell}x^{\ell}\right).$
(11)

See Figure 1 for an illustration.

From (8) we have $\displaystyle P(\phi,\psi)=2\int_{-1}^{1}\phi K_{\psi}d{y}$,
that is, an inner product with the function $K_{\psi}$ in (11). Note that
$K_{\psi}$ puts a very high weight around the value $\phi(0)$ and therefore
ignoring other possible regions with hot spots. For instance if
$\\{-0.5,0,0.5\\}=\arg\max_{z\in\mathbb{R}}\phi$ then the possible hot spots
of $\phi$ at $0.5$ and $-0.5$ wont be detected but the value of $P(\phi,\psi)$
will be very high (as far as we select $p$ high enough).

###### Remark 1

We then conclude that not the PAI at a particular level, not the average of
several PAIs at different levels, are good measures or indicators in order to
select one among different possible predictions of the random variable $X$, in
particular, hots spots reported after selecting among several models using PAI
as a main indicator are not adequate. See [8, 2].

In order to make better hot spots predictions in practice it is recommended,
before computing hots spots using PAI as indicator, that the selected model
shall be decided using other more suitable measures. See for instance [1, 6].

##  3 The integral average transform

In the previous section we presented an application where integral of averages
of a function on subregions are computed. We summarize this procedure as
follows: consider a function $f:\mathbb{R}^{n}\to\mathbb{R}$ and family of
regions neighboring ${\bf x}$, say $\\{B_{s,\bf
x}\subset\mathbb{R}^{n}\\}_{s>0,{\bf x}\in\mathbb{R}^{n}}$ such that: $\\{{\bf
x}\\}\subset B_{s,\bf x}\subset B_{s+\epsilon,\bf x}$ for all $s$ and
$\epsilon>0$. Define the following integral average transform of $f$ by

$u({\bf x})=\int_{\mathbb{R}}\frac{\lambda(s,{\bf x})}{|B_{s,{\bf
x}}|}\int_{B_{s,{\bf x}}}f(y)dy=\int_{\mathbb{R}}\lambda(s,{\bf
x})\fint_{B_{s,{\bf x}}}f(y)dy.$ (12)

That is, a weighed integral of plain average values of $f$ over the regions
$B_{s,{\bf x}}$, $s\in\mathbb{R}$. Here $\lambda(s,{\bf x})$ is a non-negative
weight function.

This procedure is equivalent to integrating against a possible singular
kernel. We formalize this interpretation in the next statement.

###### Theorem 3.1

Define

$K({\bf y},{\bf x})=\int_{\mathbb{R}}\frac{\lambda(s,{\bf x})}{|B_{s,{\bf
x}}|}{\bf 1}_{B_{s,{\bf x}}}({\bf y})ds$

and consider $u$ defined in (12). Then, $u({\bf
x})=\int_{\mathbb{R}^{n}}f({\bf y})K({\bf y},{\bf x})dy$.

As in the previous subsections we can choose for instance, subsets related to
levels curves of another functions $\psi_{\bf x}:\mathbb{R}^{n}\to\mathbb{R}$,
say,

$B_{s,{\bf x}}=\psi_{\bf x}^{-1}((-\infty,s)).$ (13)

###### Remark 2

In Section 2 the average PPAI, $P(\phi,\psi)$, defined in (7), was an integral
average transform of $\phi$ where the family of sets $B_{s}$ were given by
levels sets of $\psi$. In particular, in Section 2 $\psi$ is continuous and
has a maximum value ${\bf x}_{0}$, then $P$ corresponds to the integral
average transform of $\phi$ evaluated at ${\bf x}_{0}$. The definition of
subregions $B_{s}$ in (4) are related to superlevel sets of $\psi$ while for
this section, and the rest of the paper, we use $B_{s}$ as sublevel sets; See
(13). In the case of super level set the possible singularity of the
associated kernel $K(\cdot,{\bf x})$ will be related to the minimum value of
$\psi_{x}$ that, in order to fix ideas we are assuming to be a singleton.
Recall that we are assuming that $\\{{\bf x}\\}\subset B_{s,\bf x}\subset
B_{s+\epsilon,\bf x}$ for all $s$ and $\epsilon>0$.

Let us now consider a non-negative kernel given by
$K:\mathbb{R}^{n}\times\mathbb{R}^{n}\to\mathbb{R}$ a with a possible
singularity at ${\bf x}={\bf y}$ and smooth for ${\bf x}\not={\bf y}$. We can
then take, for instance, $\psi_{\bf x}({\bf y})=1/K({\bf x},{\bf y})^{q}$ for
some $q>0$. Then

$B_{s,{\bf x}}=\left[\frac{1}{s}<K(\cdot,{\bf x})^{q}\right]=\\{{\bf
z}\in\mathbb{R}^{n}:s^{-1/q}<K({\bf z},{\bf x})\\}.$ (14)

Note that $\partial B_{s,{\bf x}}$ corresponds to the $1/s$ level curve of
$K(\cdot,{\bf x})^{q}$. In this case if we define

$\lambda(s,{\bf x})=\frac{1}{q\ s^{\frac{1}{q}+1}}|B_{s,{\bf x}}|$

and therefore we have

$\int_{\mathbb{R}}\frac{\lambda(s,{\bf x})}{|B_{s,{\bf x}}|}{1}_{B_{s,{\bf
x}}}({\bf y})ds=\int_{\frac{1}{K({\bf x},{\bf
y})^{q}}}^{\infty}\frac{\lambda(s,{\bf x})}{|B_{s,{\bf
x}}|}ds=\int_{\frac{1}{K({\bf x},{\bf y})^{q}}}^{\infty}\frac{1}{q\
s^{\frac{1}{q}+1}}ds=K({\bf x},{\bf y}).$

We conclude that there is several ways to re-interpret an inner product
against a kernel as a integral average transform.

Due to the importance of kernels and its ubiquity in pure and applied
mathematics it is always useful to have several interpretations and equivalent
formulations for the results that are written as integration against kernels.
In the next section we present some well know examples.

###  3.1 Fundamental solution of Laplace equation as an integral average
transform

As a particular example let us consider the application of singular kernels
related to the Poisson problem ([7]). In order to fix ideas we do not
considered the more general setting regarding minimal regularity of functions
involved. Instead we assume that all functions are sufficiently regular in
order to show the usage of the integral average transform (12).

Let $f:\mathbb{R}^{n}\to\mathbb{R}$. Here we need to find a function $u$ such
that

$-\Delta u=f\mbox{ in }\mathbb{R}^{n}.$ (15)

Consider $\psi_{\bf x}({\bf z})=||{\bf z}-{\bf x}||.$ In this case

$B_{s,{\bf x}}=B_{s}({\bf x})=\\{{\bf z}\in\mathbb{R}^{n}:||{\bf z}-{\bf
x}||<s\\}.$ (16)

Denote $\omega_{n}$ the volume of the unit ball in $\mathbb{R}^{n}$ and define
the weight

$\lambda(s,{\bf x})=\begin{cases}\displaystyle\frac{|B_{s}({\bf
x})|}{|\partial B_{s}({\bf
x})|}=\frac{\omega_{n}s^{n}}{n\omega_{n}s^{n-1}}=\frac{s}{n},&0\leq s,\quad
n\geq 2,\\\ 0,&\mbox{otherwise}.\end{cases}$ (17)

Then, in order to compute the corresponding kernel note that, for $R>0$ and
$||{\bf x}-{\bf y}||<R$,

$\displaystyle K_{R}({\bf y},{\bf x}):$ $\displaystyle=$
$\displaystyle\int_{0}^{R}\frac{1}{|\partial B_{s}({\bf x})|}{\bf
1}_{B_{s,{\bf x}}}({\bf y})ds$ $\displaystyle=$ $\displaystyle\int_{||{\bf
x}-{\bf y}||}^{R}\frac{1}{n\omega_{n}s^{n-1}}ds$ $\displaystyle=$
$\displaystyle\begin{cases}\frac{1}{2\pi}\log\left(\frac{R}{||{\bf x}-{\bf
y}||}\right),&n=2,\\\ \frac{1}{n(2-n)\omega_{n}}\left(R^{2-n}-||{\bf x}-{\bf
y}||^{2-n}\right),&n\geq 3.\end{cases}$ (19) $\displaystyle=$ $\displaystyle
C_{n}(R)+G({\bf y},{\bf x})$ (20)

where the constant $C_{n}(R)$ is given by

$C_{n}(R)=\begin{cases}\frac{1}{2\pi}\log(R),&n=2,\\\
\frac{1}{n(2-n)\omega_{n}}R^{2-n}&n\geq 3,\end{cases}$

and $G$ is the fundamental solution of the Laplace equation. See [7, 5]. By
taking $R\to\infty$ we see that, for $n\geq 3$,

$K({\bf y},{\bf x})=\int_{0}^{\infty}\frac{1}{|\partial B_{s}({\bf x})|}{\bf
1}_{B_{s,{\bf x}}}({\bf y})ds=G(x,y).$

We have the following result.

###### Theorem 3.2

Assume that $n\geq 3$ and that $f$ is regular enough and with compact support.
Considered the integral average transform defined in (12) with family of sets
in (16) and weight in (17), that is,

$u({\bf x})=\int_{0}^{\infty}\frac{s}{n}\fint_{||{\bf x}-{\bf y}||<s}f({\bf
y})dyds,$ (21)

where

$\fint_{||{\bf x}-{\bf y}||<s}f({\bf y})d({\bf y})ds=\fint_{B_{s}({\bf
x})}f({\bf y})dyds=\frac{1}{|B_{s}({\bf x})|}\int_{B_{s}({\bf x})}f({\bf
y})d{\bf y}ds$

is the average of $f$ over the ball $B_{s}({\bf x})$. Then

$-\Delta u=f.$

Proof. Using (20) we have, for $R>0$, the truncated integral,

$\displaystyle u_{R}({\bf x})$ $\displaystyle=$
$\displaystyle\int_{0}^{R}\frac{s}{n}\fint_{||{\bf x}-{\bf
y}||<s}f(y)dyds=\int_{B_{R}({\bf 0})}f({\bf y})K_{R}({\bf x},{\bf y})d{\bf y}$
(22) $\displaystyle=$ $\displaystyle C_{n}(R)\int_{B_{R}({\bf x})}f({\bf
y})d{\bf y}+\int_{{B_{R}({\bf x})}}f({\bf y})G({\bf x},{\bf y})d{\bf y}.$ (23)

By taking $R$ large enough, we see that

$u_{R}({\bf x})=C_{n}(R)\int_{\mathbb{R}^{n}}f({\bf y})d{\bf
y}+\int_{\mathbb{R}^{n}}f({\bf y})G({\bf x},{\bf y})d{\bf y}.$

The results follows from the fact that $G$ is the fundamental solution of the
Laplace equation and the other term vanishes when $R\to\infty$ for $n\geq 3$
and $u_{R}({\bf x})\to u({\bf x})$.

###### Remark 3

Consider now the case $n=2$, ${\bf x}\in\mathbb{R}^{n}$, and $\epsilon>0$. For
all $R$ large enough we have

$u_{R}({\bf z})=C_{n}(R)\int_{\mathbb{R}^{n}}f({\bf y})d{\bf
y}+\int_{\mathbb{R}^{n}}f({\bf y})G({\bf z},{\bf y})d{\bf y}.$

for all ${\bf z}\in B_{\epsilon}({\bf x})$. It is enough to take
$R=R_{0}+||x||+\epsilon$ where $B_{R_{0}}({\bf 0})$ contains the support of
$f$. We then see that $-\Delta u_{R}({\bf x})=f({\bf x})$.

We have also the following result concerning a generalization of the mean
value property. See [3].

###### Theorem 3.3

Assume that $u$ and $f$ are sufficiently smooth and satisfy

$-\Delta u=f\mbox{ in }B_{R}({\bf x}_{0}).$

Then the following mean value property holds,

$u({\bf x}_{0})=\fint_{\partial B_{R}({\bf x}_{0})}u({\bf y})d{\bf
y}+\int_{0}^{R}\frac{s}{n}\fint_{||{\bf x}_{0}-{\bf y}||<s}f({\bf y})d{\bf
y}ds.$ (24)

Proof. From [3] we have

$u({\bf x}_{0})=\fint_{\partial B_{R}({\bf x}_{0})}u({\bf y})d{\bf
y}+\int_{B_{R}({\bf x}_{0})}f({\bf y})G_{B_{R}}({\bf x}_{0},{\bf y})d{\bf
y}ds$

where $G_{B_{R}}$ is the Green function on the ball $B_{R}({\bf 0})$ given by

$G_{B_{R}}({\bf x}_{0},{\bf
y})=\begin{cases}\frac{1}{2\pi}\log\left(\frac{R}{||{\bf x}_{0}-{\bf
y}||}\right),&n=2,\\\ \frac{1}{n(2-n)\omega_{n}}\left(R^{2-n}-||{\bf
x}_{0}-{\bf y}||^{2-n}\right),&n\geq 3.\end{cases}$

From (19) and the Fubini’s theorem it follows

$\displaystyle\int_{B_{R}({\bf x}_{0})}f({\bf y})G_{B_{R}}({\bf x}_{0},{\bf
y})d{\bf y}ds$ $\displaystyle=$ $\displaystyle\int_{B_{R}({\bf x}_{0})}f({\bf
y})K_{R}({\bf x}_{0},{\bf y})d{\bf y}ds$ (25) $\displaystyle=$
$\displaystyle\int_{0}^{R}\frac{s}{n}\fint_{||{\bf x}_{0}-{\bf y}||<s}f({\bf
y})d{\bf y}ds.$

This finished the proof.

We now turn to show how to rewrite the solution of the Poisson problem on the
positive semi-space as an integral average transform. Here we need to find a
function $u$ such that

$-\Delta u=f\mbox{ in }\mathbb{R}^{n}_{+}=\\{{\bf
z}\in\mathbb{R}^{n}:z_{n}>0\\}$ (26)

with $u=0$ on $\partial\mathbb{R}^{n}_{+}.$

###### Theorem 3.4

Assume that $n\geq 3$, $f$ is regular enough and with compact support
contained in $\mathbb{R}^{n}_{+}$ and considered the integral average
transform defined by

$u({\bf x})=\int_{0}^{\infty}\frac{s}{n}\fint_{B_{s}({\bf
x})}f(y){1}_{B_{s}({\bf x})\setminus B_{s}({\bf x}-2x_{n}{\bf e}_{n})}dyds.$
(27)

Then

$-\Delta u=f\mbox{ in }\mathbb{R}^{n}_{+}$

and $u=0$ on $\partial\mathbb{R}^{n}_{+}.$

Proof. We have (see [5, 7])

$\displaystyle u({\bf x})$ $\displaystyle=$
$\displaystyle\int_{\mathbb{R}^{n}}f({\bf y})\left(G({\bf x},{\bf y})-G({\bf
x}-2x_{n}{\bf e}_{n},{\bf y})d{\bf y}\right)$ (28) $\displaystyle=$
$\displaystyle\int_{0}^{\infty}\frac{s}{n}\left(\fint_{B_{s}({\bf
x})}f(y)dy-\fint_{B_{s}({\bf x}-2x_{n}{\bf e}_{n})}f(y)dy\right)ds$ (29)

Here we have used (21). The result follows from recalling that the support of
$f$ is contained in $\mathbb{R}^{n}_{+}$ and by noting that

$\fint_{B_{s}({\bf x})}f(y)dy-\fint_{B_{s}({\bf x}-2x_{n}{\bf
e}_{n})}f(y)dy=\fint_{B_{s}({\bf x})}f(y){1}_{B_{s}({\bf x})\setminus
B_{s}({\bf x}-2x_{n}{\bf e}_{n})}dy.$

###### Remark 4

For $n=2$ we have, for $R$ large enough

$\displaystyle G({\bf x},{\bf y})-G({\bf x}-2x_{n}{\bf e}_{n},{\bf y})d{\bf
y}$ $\displaystyle=$ $\displaystyle K_{R}({\bf x},{\bf y})-K_{R}({\bf
x}-2x_{n}{\bf e}_{n},{\bf y})$

and therefore

$\displaystyle\int_{\mathbb{R}^{n}}f({\bf y})\left(G({\bf x},{\bf y})-G({\bf
x}-2x_{n}{\bf e}_{n},{\bf y})d{\bf y}\right)=$ (30)
$\displaystyle\int_{\mathbb{R}^{n}}f({\bf y})\left(K_{R}({\bf x},{\bf
y})-K_{R}({\bf x}-2x_{n}{\bf e}_{n},{\bf y})\right)d{\bf y}$ (31)

We conclude the same result as in (27) by taking $R\to\infty$.

###### Remark 5

In the previous results we write the solution of the Poisson equation in the
half space as an integral of averages of the forcing term over balls centered
at ${\bf x}$. In the case the ball $B_{s}({\bf
x})\not\subset\mathbb{R}^{n}_{+}$, the function $f$ is cut to
$f{1}_{B_{s}({\bf x})\setminus B_{s}({\bf x}-2x_{n}{\bf e}_{n})}$. See Figure
2.

${\bf x}$${\bf x}-2x_{n}{\bf e}_{n}$

Figure 2: Illustration of $B_{s}({\bf x})\setminus B_{s}({\bf x}-2x_{n}{\bf
e}_{n})$. Formula (27)

illustrate that for the average of $f$ on $B_{s}({\bf x})$ only values of the
shaded region, $B_{s}({\bf x})\setminus B_{s}({\bf x}-2x_{n}{\bf e}_{n})$, are
considered in the integration.

Finally we mention that formula (21) give us additional interpretation of the
solution of the Poisson equations in domain with boundaries. Instead of
subtracting two solution as in formula (28), we could extend the forcing term
in such a way that averages centered at the boundary vanish. For instance, let
us consider the domain $\mathbb{R}^{n}_{+}$ and ${\bf
x}\in\partial\mathbb{R}^{n}_{+}$. In order to use (21) to obtain the solution
of the Poisson equation in $\mathbb{R}^{n}_{+}$ we could extend $f$ to the
whole $\mathbb{R}^{n}$, say $E(f):\mathbb{R}^{n}\to\mathbb{R}$ such that
$E(f)|_{\mathbb{R}^{n}_{+}}=f$ and with $\int_{B_{s}({\bf x})}f({\bf y})d{\bf
y}=0$ for all ${\bf x}\in\partial\mathbb{R}^{n}_{+}$. We then have the
following results as an alternative the Theorem 3.4.

###### Theorem 3.5

Assume that $n\geq 3$, $f$ is regular enough and with compact support
contained in $\mathbb{R}^{n}_{+}$ and considered

$Ef({\bf y})=\begin{cases}f({\bf y}),&{\bf y}\in\mathbb{R}^{n}_{+},\\\ 0,&{\bf
y}\in\partial\mathbb{R}^{n}_{+},\\\ -f({\bf y}-2y_{n}{\bf
e}_{n}),&\mbox{elsewhere},\\\ \end{cases}$

and $u$ defined by

$u({\bf x})=\int_{0}^{\infty}\frac{s}{n}\fint_{B_{s}({\bf x})}Ef(y)dyds.$ (33)

Then

$-\Delta u=f\mbox{ in }\mathbb{R}^{n}_{+}$

and $u=0$ on $\partial\mathbb{R}^{n}_{+}.$

Proof. Observe that formula (33) coincides with (27).

Similar argument can be applied to other domains with simple boundaries such
as strips and cubes.

##  4 Final comments

In this short note we introduced the integral average transform. Our
motivation comes from the need of a better mathematical understanding of some
practical measures such as the prediction accuracy index that is popular in
problems related to predictive security. In this paper we have explained the
mathematical and practical context of this application in order to motivate
our main definition. The integral average transform is defined for a given
function $f({\bf y})$ and it is the result of integrating plain averages of
$f$ over an family of sets (containing a point ${\bf x}$) indexed by the
integration argument. See (12) for a precise definition. We show that this
procedure is equivalent to computing integrals against a two variable kernel
$K({\bf y},{\bf x})$ with a possible singularity at ${\bf x}$. We also show
that any kernel integral of the form $\int f({\bf y})K({\bf y},{\bf x})d{\bf
y}$ can also be interpreted as an integral average transform. Given the
ubiquity of kernels $K({\bf y},{\bf x})$ in the solution of many problems, we
believe that this novel interpretation may be worth of further investigation.
For instance, other kernels can be considered such as Poisson’s kernels. We
can also associate some dynamics to the parameter $s$.

## References

  * [1] Sung-Hyuk Cha.  Comprehensive survey on distance/similarity measures between probability density functions.  City, 1(2):1, 2007.
  * [2] S. Chainey, L. Tompson, and Uhlig.  The utility of hotspot mapping for predicting spatial patterns of crime.  Security Journal, 21(1):4–28, 2008.
  * [3] John M DeLaurentis and Louis A Romero.  A monte carlo method for poisson’s equation.  Journal of Computational Physics, 90(1):123–140, 1990.
  * [4] Grant Drawve.  A metric comparison of predictive hot spot techniques and rtm.  Justice Quarterly, 33(3):369–397, 2016.
  * [5] Lawrence C Evans.  Partial differential equations.  Graduate studies in mathematics, 19(4):7, 1998.
  * [6] Alison L Gibbs and Francis Edward Su.  On choosing and bounding probability metrics.  International statistical review, 70(3):419–435, 2002.
  * [7] David Gilbarg and Neil S Trudinger.  Elliptic partial differential equations of second order, volume 224\.  springer, 2015.
  * [8] Chaitanya Joshi, Sophie Curtis-Ham, Clayton D’Ath, and Deane Searle.  Considerations for developing predictive spatial models of crime and new methods for measuring their accuracy.  ISPRS International Journal of Geo-Information, 10(9):597, 2021\.
  * [9] George Mohler, Michael Porter, Jeremy Carter, and Gary LaFree.  Learning to rank spatio-temporal event hotspots.  Crime Science, 9(1):1–12, 2020.