<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%~MoulinÃ© par MaN_auto v.0.34.0 (b272df1a) 2025-06-10 16:44:23
\documentclass[CRMATH,Unicode,XML,biblatex]{cedram}

\TopicFR{Statistiques}
\TopicEN{Statistics}

\addbibresource{CRMATH_Lasserre_20240534.bib}

\usepackage{mathtools}

\newcommand*\R{\mathbb{R}}
\newcommand*\N{\mathbb{N}}
\newcommand*\M{\mathbf{M}}

\renewcommand*\b{\boldsymbol{b}}
\newcommand*\p{\boldsymbol{p}}
\newcommand*\q{\boldsymbol{q}}
\renewcommand*\v{\boldsymbol{v}}

\DeclareMathOperator{\card}{card}
\DeclareMathOperator{\spt}{spt}
\DeclareMathOperator{\trace}{trace}
\DeclareMathOperator{\diam}{diam}

\newcommand*{\dd}{\mathrm{d}}

%%%---------------------------------------------------------------------------

%%% ARROWS

%%% \to
\renewcommand*{\to}{\mathchoice{\longrightarrow}{\rightarrow}{\rightarrow}{\rightarrow}}
%% Remplacer \xrightarrow{#1} par \overset{#1}{\longrightarrow}. 

%%% \mapsto
\let\oldmapsto\mapsto
\renewcommand*{\mapsto}{\mathchoice{\longmapsto}{\oldmapsto}{\oldmapsto}{\oldmapsto}}

%%% \longhookrightarrow
%\newcommand{\longhookrightarrow}{\!\lhook\joinrel\longrightarrow}

%%% \longrightrightarrows
%\newcommand{\longrightrightarrows}{\overset{\raisebox{-.17ex}{$\displaystyle{\longrightarrow}$}}{\smash{\raisebox{-.3ex}{$\longrightarrow$}}}}

%%%% \longrightharpoonup
%\newcommand{\longrightharpoonup}{\relbar\joinrel\rightharpoonup}

%%% Convergence
%\newcommand\dconverge[2][p \to + \infty]{\xrightarrow[#1]{#2}}
%\newcommand\tconverge[1][p \to + \infty]{\underset{#1}{\longrightarrow}}

%%% Isomorphism
%\newcommand{\isomto}{\overset{\!\!\raisebox{.3ex}{$\scriptstyle{\sim}$}}{\smash{\to}}}

%%%---------------------------------------------------------------------------

%%% BAR &amp; OVERLINE

%%% Better widebar macro
\makeatletter
\let\save@mathaccent\mathaccent
\newcommand*\if@single[3]{%
 \setbox0\hbox{${\mathaccent"0362{#1}}^H$}%
 \setbox2\hbox{${\mathaccent"0362{\kern0pt#1}}^H$}%
 \ifdim\ht0=\ht2 #3\else #2\fi
 }
%The bar will be moved to the right by a half of \macc@kerna, which is computed by amsmath:
\newcommand*\rel@kern[1]{\kern#1\dimexpr\macc@kerna}
%If there's a superscript following the bar, then no negative kern may follow the bar;
%an additional {} makes sure that the superscript is high enough in this case:
\newcommand*\widebar[1]{\@ifnextchar^{{\wide@bar{#1}{0}}}{\wide@bar{#1}{1}}}
%Use a separate algorithm for single symbols:
\newcommand*\wide@bar[2]{\if@single{#1}{\wide@bar@{#1}{#2}{1}}{\wide@bar@{#1}{#2}{2}}}
\newcommand*\wide@bar@[3]{%
 \begingroup
 \def\mathaccent##1##2{%
%Enable nesting of accents:
 \let\mathaccent\save@mathaccent
%If there's more than a single symbol, use the first character instead (see below):
 \if#32 \let\macc@nucleus\first@char \fi
%Determine the italic correction:
 \setbox\z@\hbox{$\macc@style{\macc@nucleus}_{}$}%
 \setbox\tw@\hbox{$\macc@style{\macc@nucleus}{}_{}$}%
 \dimen@\wd\tw@
 \advance\dimen@-\wd\z@
%Now \dimen@ is the italic correction of the symbol.
 \divide\dimen@ 3
 \@tempdima\wd\tw@
 \advance\@tempdima-\scriptspace
%Now \@tempdima is the width of the symbol.
 \divide\@tempdima 10
 \advance\dimen@-\@tempdima
%Now \dimen@ = (italic correction / 3) - (Breite / 10)
 \ifdim\dimen@&gt;\z@ \dimen@0pt\fi
%The bar will be shortened in the case \dimen@&lt;0 !
 \rel@kern{0.6}\kern-\dimen@
 \if#31
  \overline{\rel@kern{-0.6}\kern\dimen@\macc@nucleus\rel@kern{0.4}\kern\dimen@}%
  \advance\dimen@0.4\dimexpr\macc@kerna
%Place the combined final kern (-\dimen@) if it is &gt;0 or if a superscript follows:
  \let\final@kern#2%
  \ifdim\dimen@&lt;\z@ \let\final@kern1\fi
  \if\final@kern1 \kern-\dimen@\fi
 \else
  \overline{\rel@kern{-0.6}\kern\dimen@#1}%
 \fi
 }%
 \macc@depth\@ne
 \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar
 \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax}%
 \macc@set@skewchar\relax
 \let\mathaccentV\macc@nested@a
%The following initialises \macc@kerna and calls \mathaccent:
 \if#31
 \macc@nested@a\relax111{#1}%
 \else
%If the argument consists of more than one symbol, and if the first token is
%a letter, use that letter for the computations:
 \def\gobble@till@marker##1\endmarker{}%
 \futurelet\first@char\gobble@till@marker#1\endmarker
 \ifcat\noexpand\first@char A\else
  \def\first@char{}%
 \fi
 \macc@nested@a\relax111{\first@char}%
 \fi
 \endgroup
}
\makeatother

\let\oldbar\bar
\renewcommand*{\bar}[1]{{\mathchoice{\widebar{#1}}{\widebar{#1}}{\widebar{#1}}{\oldbar{#1}}}}

% /!\ Il y a parfois des soucis avec cette macro lorsqu'il y a des caractÃ¨res en minuscule en subscript (et dans les captions). Dans ce cas, faire avec \overline et des espaces manuels.

%%% Double bar
% \overline{\overline{\!a}}

%\newcommand\bx{\,\overline{\!x}}
%\newcommand\brho{\,\overline{\!\rho}}
%better widebar a apparemment des soucis avec les \subcaptions pour les CR :shrug:

%%%---------------------------------------------------------------------------

%%% DELIMITERS

%\usepackage{mathtools}
\DeclarePairedDelimiter{\parens}{\lparen}{\rparen}
\DeclarePairedDelimiter{\braces}{\{}{\}}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}
%\DeclarePairedDelimiter{\bracks}{[}{]}
%\DeclarePairedDelimiter{\bbracks}{\llbracket}{\rrbracket}
\DeclarePairedDelimiter{\angles}{\langle}{\rangle}
%\DeclarePairedDelimiter{\aangles}{\langle\!\langle}{\rangle\!\rangle}
%\DeclarePairedDelimiter{\pparens}{(\!(}{)\!)}

%%%---------------------------------------------------------------------------

%%% Change counter appearance
\newcommand*{\relabel}{\renewcommand{\labelenumi}{(\theenumi)}}
\newcommand*{\romanenumi}{\renewcommand*{\theenumi}{\roman{enumi}}\relabel}
\newcommand*{\Romanenumi}{\renewcommand*{\theenumi}{\Roman{enumi}}\relabel}
\newcommand*{\alphenumi}{\renewcommand*{\theenumi}{\alph{enumi}}\relabel}
\newcommand*{\Alphenumi}{\renewcommand*{\theenumi}{\Alph{enumi}}\relabel}
\newcommand*{\alphenumii}{\renewcommand*{\theenumii}{\alph{enumii}}\renewcommand{\labelenumii}{(\theenumii)}}

%%%---------------------------------------------------------------------------

\graphicspath{{./figures/}}

\newcommand*{\mk}{\mkern -1mu}
\newcommand*{\Mk}{\mkern -2mu}
\newcommand*{\mK}{\mkern 1mu}
\newcommand*{\MK}{\mkern 2mu}

\hypersetup{urlcolor=purple, linkcolor=blue, citecolor=red}

\let\oldforall\forall
\renewcommand*{\forall}{\mathrel{\oldforall}}

\title{An infinite-dimensional Christoffel function and detection of abnormal trajectories}
\alttitle{Fonction de Christoffel infinie-dimensionnelle et dÃ©tection de trajectoires aberrantes}

\author{\firstname{Didier} \lastname{Henrion}}
\address{LAAS-CNRS, Toulouse, France}
\address{Faculty of Electrical Engineering, Czech Technical University, Praha}
\email{henrion@laas.fr}

\author{\firstname{Jean-Bernard} \lastname{Lasserre}\CDRorcid{0000-0003-0860-9913}}
\address[1]{LAAS-CNRS, Toulouse, France}
\address{Toulouse School of Economics (TSE), Toulouse, France}
\email{lasserre@laas.fr}

\thanks{Didier Henrion is supported by the European Union under the project ROBOPROX (reg.~no.~CZ.02.01.01/00/22 008/0004590). This work has been supported by European Union's HORIZON-MSCA-2023-DN-JD programme under the Horizon Europe (HORIZON) Marie Sk{\l}odowska-Curie Actions, grant agreement 101120296 (TENORS), and also by the Artificial and Natural Intelligence Toulouse Institute, ANITI IA Cluster -- ANR-23-IACL-0002-IACL -- 2023}
\CDRGrant[European Union]{CZ.02.01.01/00/22 008/0004590}
\CDRGrant[European Union]{101120296}
\CDRGrant[Artificial and Natural Intelligence Toulouse Institute]{ANITI IA Cluster -- ANR-23-IACL-0002-IACL -- 2023}

\subjclass{42C05, 47B32, 46E22}

\begin{abstract}
We introduce an infinite-dimensional version of the Christoffel function, where now (i) its argument lies in a Hilbert space of functions, and (ii) its associated underlying measure is supported on a compact subset of the Hilbert space. We show that it possesses the same crucial property as its finite-dimensional version to identify the support of the measure (and so to detect outliers). Indeed, the growth of its reciprocal with respect to its degree is at least exponential outside the support of the measure and at most polynomial inside. Moreover, for a fixed degree, its computation mimics that of the finite-dimensional case, but now the entries of the moment matrix associated with the measure are moments of moments. To illustrate the potential of this new tool, we consider the following application. Given a database of registered reference trajectories, we consider the problem of detecting whether a newly acquired trajectory is abnormal (or out of distribution) with respect to the database. As in the finite-dimensional case, we use the infinite-dimensional Christoffel function as a score function to detect outliers and abnormal trajectories. A few numerical examples are provided to illustrate the theory.
\end{abstract}

\begin{altabstract}
On introduit une version infini-dimensionnelle de la fonction de Christoffel o\`u (i) ses arguments sont des
\'el\'ements d'un espace de Hilbert de fonctions, et (ii) sa mesure associ\'ee est support\'ee sur un compact de cet espace de Hilbert. On montre qu'elle poss\`ede la m\^eme propri\'et\'e cruciale que sa version fini-dimensionnelle, i.e.\ identifier le support de la mesure (et donc tr\`es utile pour d\'etecter des aberrations en analyse de donn\'ees). Dans le support de la mesure, la croissance de son inverse est au plus polynomiale dans son degr\'e, et au moins exponentielle \`a l'ext\'erieur du support. De plus, pour tout degr\'e fix\'e, son calcul imite celui de sa version fini-dimensionnelle, avec la particularit\'e que les entr\'ees de la matrice des moments de la mesure sont des moments de moments. Pour illustrer le potentiel de ce nouvel outil on consid\`ere l'application suivante: Ã©tant donn\'ee une base de donn\'ees de trajectoires de r\'ef\'erence enregistr\'ees, on consid\`ere le probl\`eme de d\'etecter si une trajectoire nouvellement acquise est anormale par rapport aux trajectoires de r\'ef\'erence. Comme dans le cas infini-dimensionnel on propose d'utiliser la fonction de Christoffel comme un score pour d\'etecter les trajectoires aberrantes. Deux exemples illustratifs sont d\'etaill\'es.
\end{altabstract}

\makeatletter
\def\cdr@preabstracthook{\par\smallskip}
\makeatother

\begin{document}

\maketitle

\vspace{-0.75em}

\section{Introduction}

\subsection*{Motivation}

Suppose that we are given a set of $N$ trajectories $\mathcal{D}\coloneqq\braces[\big]{\parens[\big]{t,g_j(t)}: t\in [0,1], \ j\in [N]\,}\subset [0,1]\times\R$, where $[N]\coloneqq\{1,\dotsc,N\}$ and $g_j\in L^2\parens[\big]{[0,1]}$ for all $j$. For example, each $j\in [N]$ refers to some patient and $\braces[\big]{\parens[\big]{t,g_j(t)}: t\in [0,1]}$ is some recorded data from that patient (e.g.\ time evolution of blood pressure after injection of some liquid product). The set $\mathcal{D}$ can correspond to a class of normal patients (e.g.\ with no pathology), or a class of patients whose time evolution of the observed quantity has a specific characteristic. Then the problem that we want to address is the following.

\begin{enonce*}{Problem}
Given a database\/ $\mathcal{D}$ of trajectories associated with some class of patients, detect whether a newly registered trajectory $\braces[\big]{\parens[\big]{t,f(t)}:t\in [0,1]}$ of a new patient is abnormal (with respect to this class of patients), or not.
\end{enonce*}

One possible approach is to compute a \emph{score function} of the form
\begin{equation}\label{intro-norm}
\rho(f)=\min_{g\in\mathcal{D}}\norm{g-f}_2 \qquad \text{e.g.}\ \min_{g\in\mathcal{D}} \parens[\Bigg]{\int_0^1 \parens[\big]{g(t)-f(t)}^2\dd t}^{1/2},
\end{equation}
and decide abnormality of $f$ w.r.t.\ $\mathcal{D}$, depending on how large is the score $\rho(f)$. In this approach, computing the score $\rho(f)$ requires to compare $f$ with
\emph{every} $g\in\mathcal{D}$ for every new trajectory $f$. Moreover, to be successful, such a test requires the database $\mathcal{D}$ to be perfect, i.e., with no outlier.

On the other hand, a highly desirable solution is a numerical test obtained via:
\begin{enumerate}\romanenumi
\item some score function $\theta \colon L^2\parens[\big]{[0,1]}\to\R$, $f\mapsto\theta(f)$,
\emph{computed once and for all};
\item a threshold $\tau$, such that $\theta(g)\leq \tau$ for all $g\in\mathcal{D}$, so that $f$ is declared abnormal if $\theta(f)&gt;\tau$. If not then the database $\mathcal{D}$ is possibly enriched with the new trajectory $\braces[\big]{\parens[\big]{t,f(t)}: t\in [0,1]}$ (considered to be normal), i.e., $\mathcal{D}\coloneqq \mathcal{D}\cup\{f\}$.
\end{enumerate}
In addition:
\begin{enumerate}\romanenumi
\setcounter{enumi}{2}
\item one should be able to compute the score function $\theta$ efficiently, and
\item update the score function $\theta$ efficiently when additional trajectories are added to (or deleted from) $\mathcal{D}$.
\end{enumerate}

Motivated by previous works in~\cite{neurips,lpp22} where properties of the Christoffel function have been proved to be useful for some problems of data analysis (e.g.\ for outlier detection~\cite{louise,neurips}, interpolation~\cite{recovery}, optimal transport~\cite{mula}) we propose an infinite-dimensional version of this approach where now a point of $\R^n$ is replaced with a trajectory (i.e., a function of time) and the cloud of data points (a subset of $\R^n$) is now replaced with a database $\mathcal{D}$ of recorded trajectories.

It turns out that there is an appropriate analytical framework, an infinite-dimensional Hilbert space, in which:
\begin{itemize}
\item An infinite-dimensional analogue of the Christoffel--Darboux (CD) polynomial kernel and Christoffel function (CF) can be defined in relatively simple terms.
\item The dichotomy property of the CF's growth with its degree, depending on whether the CF is evaluated in the support or outside the support of the underlying measure, is also preserved in the infinite-dimensional setting. This property is crucial to detect anomalies by our numerical scheme, the analogue of the one proposed in~\cite{louise,lpp22} in the finite-dimensional setting.
\end{itemize}

That these two essential features are preserved is somehow a little surprising because the infinite-dimensional analogues of polynomials, measures and their support are not trivial extensions of the finite-dimensional case and require some care, even in an appropriate Hilbert-space setting. This setting was initiated in~\cite{hikv23,hr24} for questions related to dynamical systems, non-linear partial differential equations and infinite-dimensional optimization. The present work can be seen as an additional contribution to this body of works.

A Matlab prototype code illustrates the developments. It uses the Chebfun package~\cite{chebfun}, an object-oriented system for performing numerical linear algebra on continuous functions and operators rather than the usual discrete vectors and matrices.

\begin{remark}\label{rem:naive}
Warning -- In a naive approach that mimics the finite-dimensional case, one could:
\begin{itemize}
\item consider the set $\Omega\subset\mathbb{R}^2$ occupied by the trajectories of $\mathcal{D}$ (or its finite version of points in $\mathbb{R}^2$ via samples of trajectories);
\item define a measure $\mu$ on $\Omega$ (e.g.\ the Lebesgue measure on $\Omega$, or the empirical measure supported on the sampled points of trajectories), its associated CF $\Lambda^{\mu}_d$ (the reciprocal of a degree-$2d$ bivariate sum-of-squares polynomial), and a threshold $\delta&gt;0$;
\item and decide that $f$ is an outlier if $\mu \parens[\big]{\braces[\big]{t: \Lambda^\mu_d\parens[\big]{t,f(t)}&lt;\delta}}$ is sufficiently large.
\end{itemize}

Indeed in such an approach, all trajectories contained in $\Omega$ would be declared inliers, which is obviously not true. The reason why this test fails (except when some portion of the trajectory $f$ is indeed outside $\Omega$) is that in contrast to~\eqref{intro-norm}, the score function $\Lambda^{\mu}_d\parens[\big]{t,f(t)}$ applies to \emph{each point} $\braces[\big]{\parens[\big]{t,f(t)}}$ of the trajectory $f$, \emph{separately}. In other words, at every time $t\in [0,1]$, $\min_{g\in\mathcal{D}} \abs[\big]{f(t)-g(t)}$ can be small even if $\rho(f)$ in~\eqref{intro-norm} is not small.

So we need a score function $f\mapsto \theta(f)$ for the entire trajectory $\braces[\big]{\parens[\big]{t,f(t)}: t\in [0,1]}$ taken as a whole and not point by point.
\end{remark}

\section{Preliminaries}

Some of the material of this section has been developed in more details in~\cite{h24}. It is reproduced for sake of clarity of exposition. Let $H$ be a separable real Hilbert space, equipped with an inner product $\angles{\,\cdot\,,\cdot\,}$ and let $(e_k)_{k=1,2,\dotsc}$ be a complete orthonormal system in $H$, with $e_1=1$. For instance, in the framework of the next section (and also the introduction), a natural choice for $H$ can be :
\begin{itemize}
\item $L^2\parens[\big]{[-1,1],\phi}$ with $\phi=\dd t/\pi\sqrt{1-t^2}$ and $e_k$ is the degree $k-1$ Chebyshev polynomial of the first kind (normalized to obtain an orthonormal basis), or
\item $L^2\parens[\big]{[0,1],\phi}$ with $\phi=\dd t$ and $e_k$ is the degree $k-1$ (shifted) Legendre polynomial (normalized to obtain an orthonormal basis).
\end{itemize}

It is also possible to consider complex valued and periodic functions. In this case $e_k$ could be a complex exponential $\exp (2\pi ikt)$. In this paper, for ease of exposition, however we restrict our attention to real non-periodic functions.

For any $n \in \N$, consider the projection mapping
\[
\begin{aligned}
	\pi_n \colon H	&amp; \to H
\\	f 				&amp; \mapsto \sum_{k=1}^n \langle f,e_k \rangle\, e_k.
\end{aligned}
\]
In particular, note that $f = \lim_{n\to\infty} \pi_n(f) = \sum_{k=1}^{\infty} \langle f,e_k \rangle\, e_k$ (in norm). Also note that
\begin{equation}\label{np}
\abs[\big]{\pi_n(f)}^2 = \sum_{k=1}^{n} \langle f, e_k \rangle^2 \qquad \text{and} \qquad \abs{f}^2= \lim_{n\to\infty} \abs[\big]{\pi_n(f)}^2 = \sum_{k=1}^{\infty} \langle f, e_k \rangle^2.
\end{equation}

\subsection{Polynomials}

Let $c_0(\N)$ denote the set of integer sequences with finitely many non-zero elements, i.e.\ if $a=(a_1,a_2,\dotsc) \in c_0(\N)$ then $ \card a \coloneqq \braces[\big]{k : a_k \neq 0}&lt; \infty$. Let us define the \emph{monomial} of degree $a \in c_0(\N)$~as
\[
f^a \coloneqq \prod_{k=1,2,\dotsc} {\langle f, e_k \rangle}^{a_k}.
\]
This is a product of finitely many powers of linear functionals. Then \emph{polynomials} in $H$ are defined as finite linear combinations of monomials $f^a$, that is:
\[
f\mapsto p(f) = \sum_{a \in \spt p} p_a f^a,\quad \forall f\in H,
\]
where $\spt p\coloneqq\braces[\big]{a: p_a\neq0}$ is a finite set. An important difference with the finite-dimensional setting is that a polynomial $p$ on $H$ has now two notions of degree:
\begin{itemize}
\item its \emph{algebraic degree} is $d\coloneqq\max_{a \in \spt p} \sum_k a_k$, which corresponds to the total degree in the finite-dimensional setting;
\item its \emph{harmonic degree} is $n\coloneqq\max_{a \in \spt p} \max_{a_k \neq 0} k$, which refers to its finite number of variables.
\end{itemize}

For instance if $H=L^2\parens[\big]{[-1,1],\phi}$ with $\phi=\dd t/\pi\sqrt{1-t^2}$ (the Chebyshev measure) and $e_1(t)=1$, $e_2(t)=\sqrt{2}t$, $e_3(t)=\sqrt{2}(2t^2-1),\dotsc$ the Chebyshev polynomials of the first kind (normalized to make them an orthonormal basis w.r.t.\ $\phi$), then
\begin{equation}\label{exemple}
f\mapsto p(f)=\sum_{a\in\spt p} p_a\,\prod_{k=1,2,\dotsc}\parens[\Bigg]{\int_{-1}^1 f(t)\,e_k(t)\,\dd t}^{a_k},\quad\forall f\in H.
\end{equation}

Given $d,n \in \N$, let $P_{d,n}$ denote the finite-dimensional vector space of polynomials of algebraic degree up to $d$ and harmonic degree up to $n$. Like $\mathbb{R}[x_1,\dotsc,x_n]_d$ in the finite-dimensional setting, its dimension is the binomial coefficient $\binom{n+d}{n}$. Each polynomial $p(\,\cdot\,) \in P_{d,n}$ can be identified with its coefficient vector $\p\coloneqq(p_a)_{a \in \spt p} \in \R^{\binom{n+d}{n}}$. For example, if $d=4$ and $n=2$, then $P_{4,2}$ has dimension $\binom{6}{2}=15$. The monomial of degree $a=(3,1,0,0,\dotsc)$ is $\langle x,e_1\rangle^3\langle x,e_2\rangle$. It belongs to $P_{4,2}$ since it has algebraic degree~$4$ and harmonic degree~$2$.

\begin{remark}
A polynomial $f\mapsto p(f)$, with $f\in H$, is a sum of product of integral terms (e.g.\ as in~\eqref{exemple}) and should not be confused with the \emph{function} $t\mapsto p\parens[\big]{f(t)}$, which is an element of $H$ (as $f(t)$ is) with its own development $\sum_{k=1,2,\dotsc} a_k\,e_k$ in the orthonormal basis $(e_k)_{k=1,2,\dotsc}$. For instance with $H=L^2\parens[\big]{[-1,1],\phi}$, $\phi$ the Chebyshev measure on $[-1,1]$ and $(e_k)_{k=1,2,\dotsc}$ the (normalized) Chebyshev polynomials, if $t\mapsto f(t)=\sqrt{2} t$, the function $t\mapsto f(t)^2=2t^2$ is the element $\sqrt{2}e_3/2+e_1$ of $H$. On the other hand with $a=(0,2,0,0,\dotsc)$,
\[
f\mapsto p(f)\coloneqq\,f^a=\langle f,e_2\rangle^2=\parens[\Bigg]{\int_{-1}^1f(t)\sqrt{2}t\,\dd t/\pi\sqrt{1-t^2}}^2,
\]
which when evaluated at $t\mapsto f(t)=\sqrt{2}t = e_2 \in H$, yields the value
\[
\parens[\Bigg]{\int_{-1}^1 2t^2\dd t/\pi\sqrt{1-t^2}}^2=\norm{e_2}^2=1.
\]
\end{remark}

\subsection{Moments}

With $F$ a compact subset of $H$, let $C(F)$ denote the space of continuous functions on $F$, and let $P(F) \subset C(F)$ denote the space of polynomials on $F$.

A useful characterization of compact sets in separable Hilbert spaces is as follows~\cite[Item~45, p.~346, IV.13.42]{Dunford}.

\begin{proposition}\label{compact}
A closed bounded set $F \subset H$ is compact if and only if for all $\epsilon \in \R$ there exists $n \in \N$ such that $\sup_{f \in F} \abs{f}^2-\abs[\big]{\pi_n(f)}^2 &lt; \epsilon^2$.
\end{proposition}

An example of a compact set is the ellipsoid
\[
\braces[\Bigg]{f \in H : \sum_{k=1,2,\dotsc} a_k \langle f,e_k \rangle^2 \leq 1}
\]
if the sequence $(a_k)_{k=1,2,\dotsc}$ is strictly positive and strictly increasing, e.g.\ $a_k = k $. Another example of a compact set is the Hilbert cube
\[
\braces[\Big]{f \in H : \abs[\big]{\angles{f,e_k}} \leq \tfrac{1}{k}, \ k=1,2,\dotsc}
\]
see~\cite[Item~70, p.~350]{Dunford}.

For an introduction to measures on infinite-dimensional spaces (either as countably additive functions on a sigma algebra, or as dual to continuous functions, or both), the interested reader is referred to e.g.~\cite{rf10}. Given a measure $\mu$ supported on $F$, and given $a \in c_0(\N)$, the \emph{moment} of $\mu$ of degree $a$ is the number
\[
\int_F f^a \,\dd\mu(f).
\]
A measure on $H$ is uniquely determined by its (countably infinite) sequence of moments.
\begin{proposition}
Let $\mu_1$ and $\mu_2$ be measures on $F$ such that
\[
\int_F f^a \,\dd\mu_1(f) = \int_F f^a \,\dd\mu_2(f)
\]
for all $a \in c_0(\N)$. Then $\mu_1= \mu_2$.
\end{proposition}
\begin{proof}
First observe that the set of polynomials on $F$ is an algebra (i.e.\ the product of two elements of $P(F)$ is an element of $P(F)$) that separates points (i.e.\ for all $f_1 \neq f_2 \in F$, there is a $p \in P(F)$ such that $p(f_1) \neq p(f_2)$) and that contains constant functions (corresponding to an empty support). From the Stone--Weierstrass Theorem~\cite[Section~12.3]{rf10} in (not necessarily finite-dimensional) topological Hausdorff spaces, it follows that $P(F)$ is dense in $C(F)$.

Now, if all moments of $\mu_1$ and $\mu_2$ coincide, then
\[
\int_F p(f) \,\dd\mu_1(f) = \int_F p(f) \,\dd\mu_2(f),
\]
for all polynomials on $F$, and by density, for all continuous functions on $F$.

Since continuous functions are bounded on a compact set $F$, we can use~\cite[Proposition~1.5]{d06} to conclude.
\end{proof}

\section{Infinite-dimensional Christoffel--Darboux polynomial}

Let $\mu$ be a given probability measure on a given compact set $F\subset H$. Given $d,n \in \N$, the finite-dimensional vector space $P_{d,n}$ of polynomials of algebraic degree up to $d$ and harmonic degree up to $n$ is a Hilbert space once equipped with the inner product
\[
\langle p,q \rangle_{\mu}\coloneqq\int_F p(f)q(f)\,\dd\mu(f).
\]
Let $\v_{d,n}(\,\cdot\,)$ denote a basis for $P_{d,n}$, of dimension $\binom{n+d}{n}$. Any element $p \in P_{d,n}$ can be expressed as $p(\,\cdot\,) = \p^T \v_{d,n}(\,\cdot\,)$ with $\p$ a vector of coefficients.

Let
\begin{equation}\label{matrix-mom}
\M_{d,n}(\mu) \coloneqq \int_F \v_{d,n}(f)\,\v_{d,n}(f)^T \,\dd\mu(f)
\end{equation}
be the \emph{moment matrix} of order $(d,n)$ of measure $\mu$, which is the Gram matrix of the inner products of pairwise entries of vector $\v_{d,n}(\,\cdot\,)$. This matrix is positive semi-definite of size $\binom{n+d}{n}$. If it is non-singular, then via its singular value decomposition, it can be written as
\[
\M_{d,n}(\mu) = Q S Q^T = \sum_{i=1}^{\binom{n+d}{n}} s_{ii}\, \q_i \q^T_i
\]
where $S=(s_{ij})$ is the diagonal matrix of singular values, $q_i(f)\coloneqq\q^T_i \v_{d,n}(f)$, and $\q^T_i \M_{d,n}(\mu) \q_j=s_{ii}$ if $i=j$ and $0$ if $i \neq j$.

Assuming that $\M_{d,n}(\mu)$ is non singular, the Christoffel--Darboux (CD) polynomial kernel is then defined by:
\begin{equation}\label{cd-kernel}
K^{\mu}_{d,n}(f,g)\coloneqq \sum_{i=1}^{\binom{n+d}{n}} s_{ii}^{-1}\, q_i(f) q_i(g) =
\v_{d,n}(f)^T\M_{d,n}(\mu)^{-1}\,\v_{d,n}(g),\quad\forall x,y\in H.
\end{equation}
So the arguments $f,g\in H$ of $K^\mu_{d,n}$ are infinite-dimensional objects. However, for each couple $(d,n)$, $K^\mu_{d,n}$ only sees finitely many of their components.

The CD polynomial is defined as the diagonal of the kernel, that is:
\begin{equation}\label{cd-polynomial}
f\mapsto p^{\mu}_{d,n}(f) \coloneqq K^{\mu}_{d,n}(f,f),\quad\forall f\in H.
\end{equation}
Observe that $p^\mu_{d,n}$ is a sum-of-squares polynomial with a Gram matrix which is the inverse of the degree $(d,n)$ moment matrix associated with $\mu$.

\begin{lemma}
The vector space $P_{d,n}$, equipped with $\angles{\,\cdot\,,\cdot\,}_\mu$ and the CD kernel $K^\mu_{d,n}$, is a RKHS (reproducible kernel Hilbert space).
\end{lemma}

\begin{proof}
The linear functional $p \mapsto \angles[\big]{p(\,\cdot\,), K^{\mu}_d(\,\cdot\,,g)}_{\mu}$ has the reproducing property:
\[
\begin{split}
\forall p \in P_{d,n}, \quad\angles[\big]{p(\,\cdot\,), K^{\mu}_{d,n}(\,\cdot\,,g)}_{\mu}
&amp; = \int_F p(f)K^{\mu}_{d,n}(f,g)\,\dd\mu(f) \\
&amp; = \int_F p(f)\,\v_{d,n}(f)^T \M_{d,n}(\mu)^{-1} \,\v_{d,n}(g)\,\dd\mu(f)\\
&amp; = \p^T \parens[\Bigg]{\int_F \v_{d,n}(f)\, \b_{d,n}(x)^T \dd\mu(f)} \M_{d,n}(\mu)^{-1} \,\v_{d,n}(g) \\
&amp; = \p^T \,\v_{d,n}(g) \\
&amp; = p(g),
\end{split}
\]
and it is continuous:
\[
\forall p \in P_{d,n}, \quad \angles[\big]{p(\,\cdot\,), K^{\mu}_{d,n}(\,\cdot\,,g)}_{\mu}^2 \leq \int_F p(f)^2\,\dd\mu(f) \int_F K^{\mu}_d(f,f)\,\dd\mu(f).\qedhere
\]
\end{proof}

\begin{remark}[Degenerate case]\label{degenerate}
It may happen that $F\subset H$ is contained in a finite-dimensional subspace of $H$. For instance this is the case if there exists $n_*\in\N$ such that $\langle f,e_k\rangle=0$ for all $f\in F$ and all $k&gt;n_*$. Then $F\subset V$, where $V\subset H$ is the finite-dimensional subspace associated with the coordinates $\langle f,e_k\rangle$, $k\leq n_*$. In this case the moment matrix $\M_{d,n}(\mu)$ in~\eqref{matrix-mom} is singular as soon as $n&gt;n_*$. In restricting to moments associated with harmonic degree $n\leq n_*$ one is back to the classical finite-dimensional studied in e.g.~\cite{lpp22}.

Infinite-dimensional functions $f$ that are specified by finitely many coordinates $\langle f,e_k\rangle$ can be handled as finite-dimensional objects. This is the essence of the Representer Theorem often used in machine learning, see e.g.~\cite[Section~5.3]{hr24} in the context of polynomial optimization.
\end{remark}

\section{Infinite-dimensional Christoffel function}

Let $F\subset H$ and $\mu$ be a measure supported on $F$. The degree $(d,n)$ Christoffel function (CF) associated with $\mu$ is defined by
\begin{equation}\label{cf}
\begin{aligned}
	\Lambda^{\mu}_{d,n} \colon H	&amp; \to [0,1]
\\ 	h 							&amp; \mapsto \min_{p \in P_{d,n}} \int_F p^2(f)\,\dd\mu(f) \quad \text{s.t.} \ p(h)=1.
\end{aligned}
\end{equation}

\begin{lemma}
Assume that\/ $\M_{d,n}(\mu)$ is non singular. Then for each $h \in H$, the minimum is
\[
\Lambda^{\mu}_{d,n}(h) = \frac{1}{K^{\mu}_{d,n}(h,h)} = \frac{1}{p^{\mu}_{d,n}(h)}\,
\]
and the minimum is achieved at the polynomial
\[
f\mapsto p(f) = \frac{K^{\mu}_{d,n}(f,h)}{K^{\mu}_{d,n}(h,h)},\quad\forall f\in H.
\]
Finally we also have the alternative formulation
\begin{equation}\label{ABC}
\Lambda^\mu_{d,n}(h)^{-1}=\v_{d,n}(h)^T\M_{d,n}(\mu)^{-1}\v_{d,n}(h).
\end{equation}
\end{lemma}

\begin{proof}
Let $h\in H$ be fixed, arbitrary, and let $p\in P_{d,n}$ be a feasible solution of~\eqref{cf}. Then
\[
\begin{aligned}
1
&amp; = p^2(h) 										&amp;&amp; \\
&amp; = \parens[\Bigg]{\int_F K^{\mu}_{d,n}(f,h)p(f)\,\dd\mu(f)}^2 	 			&amp;&amp; \text{[by the reproducing property]} \\
&amp; \leq \int_F K^{\mu}_{d,n}(f,h)^2\dd\mu(f) \int_F p^2(f)\,\dd\mu(f) \quad 	&amp;&amp; \text{[by Cauchy--Schwarz]} \\
&amp; = K^{\mu}_{d,n}(h,h) \int_F p^2(f)\,\dd\mu(f),	&amp;&amp; 
\end{aligned}
\]
and therefore
\[
\Lambda^\mu_{d,n}(h) \geq \frac{1}{K^\mu_{d,n}(h,h)}.
\]
On the other hand, observe that the polynomial
\[
p(\,\cdot\,)\coloneqq\frac{K^{\mu}_{d,n}(\,\cdot\,,h)}{K^{\mu}_{d,n}(h,h)} \in P_{d,n}
\]
is admissible for problem~\eqref{cf}, i.e.\ $p(h)=1$, and therefore
\[
\Lambda^{\mu}_{d,n}(h) \leq \int_F \frac{K^{\mu}_{d,n}(f,h)^2}{K^{\mu}_{d,n}(h,h)^2}\,\dd\mu(f) = \frac{1}{K^{\mu}_{d,n}(h,h)}.\qedhere
\]
\end{proof}

\begin{lemma}\label{average}
The CD polynomial in~\eqref{cd-polynomial} has average value
\[
\int_X p^{\mu}_{d,n}(f) \,\dd\mu(f) = \binom{n+d}{n}.
\]
\end{lemma}

\begin{proof}
\[
\begin{split}
	\int_F p^{\mu}_{d,n}(f) \,\dd\mu(f)
	&amp; = \int_F \v_{d,n}(f)^T\M_{d,n}(\mu)^{-1}\,\v_{d,n}(f)\,\dd\mu(f)
\\	&amp; = \trace\parens[\Bigg]{\M_{d,n}(\mu)^{-1}\cdot\int_F \v_{d,n}(f) \,\v_{d,n}(f)^T\,\dd\mu(f)}
\\	&amp; = \trace I_{\binom{n+d}{n}} = \binom{n+d}{n}.\qedhere
\end{split}
\]
\end{proof}

\begin{remark}\label{remark-singular}
\mbox{}
\begin{enumerate}\romanenumi
\item It may happen that $\M_{d,n}(\mu)$ is singular, e.g.\ as in the case described in Remark~\ref{degenerate}, or when $\mu$ is obtained as the empirical measure $\mu_N$ supported on a \emph{finite} sample of $N$ trajectories recorded in a database $\mathcal{D}$ (our motivation discussed in the introduction). In the latter case, as one uses the CF associated with $\mu_N$ (and not the underlying $\mu$), one must be careful. Indeed the couple degree-sample size $\braces[\big]{(d,n),N}$ cannot be arbitrary if the empirical CF $\Lambda^{\mu_N}_{d,n}$ has to inherit the same properties as $\Lambda^\mu_{d,n}$. For every fixed degree $(d,n)$, a large sample size $N$ is enough. Indeed by invoking the Strong Law of Large Numbers and continuity of eigenvalues, $\M_{d,n}(\mu_N)$ can be as close to $\M_{d,n}(\mu)$ as desired, almost surely (with respect to samples) provided that $N$ is sufficiently large~\cite[Theorem~6.2.3]{lpp22}.
\item \label{remark-singular_2} For practical computation, and as in the finite-dimensional case~\cite{lpp22}, one uses the regularized version $\M_{d,n}(\mu)+\varepsilon\,\mathbf{I}$ of the moment matrix, for some $\varepsilon&gt;0$, which ensures that it is always non singular. So if $\v_{d,n}(f)\in\ker \parens[\big]{\M_{d,n}(\mu)}$ then $\Lambda^\mu_{d,n}(f)=0$ while its regularized version is very small as desired. This allows to treat numerically in the same manner the singular and non singular cases.
\item For matching asymptotic properties of $\Lambda^\mu_{d,n}$ and $\Lambda^{\mu_N}_{d,n}$ as $d\wedge n\to\infty$, a more delicate analysis is required to provide a recipe to choose $N$ and $(d,n)$ accordingly, as done in~\cite[Section~6.3]{lpp22} and~\cite{esaim} in the finite-dimensional case. Notice that for practical purposes (and computational reasons) one is restricted to relatively small degree $(d,n)$ and so a large sample $N$ is enough to ensure that $\Lambda^{\mu_N}_{d,n}$ is a valid proxy for $\Lambda^\mu_{d,n}$. In any case, and for numerical reasons, in practice one replaces the inverse of the moment matrix with $\parens[\big]{\M_{d,n}(\mu)+\varepsilon\,\mathbf{I}_{\binom{n+d}{n}}}^{-1}$ for small $\varepsilon&gt;0$, which always exists; see for instance~\cite{lpp22} in the finite-dimensional case.
\end{enumerate} 
\end{remark}

In Table~\ref{tab1} we compare the standard CF in finite dimension with the new CF in infinite dimension. When $x\in\R^n$, the vector $\v_d(x)$ is the vector of the usual monomial basis of the vector space $\R[x]_d$ of polynomials of degree up to $d$.

\begin{table}[ht]
\caption{Comparing the standard CF with the new CF.}\label{tab1}
\begin{center}
\begin{tabular}{|c|c|}
\hline 	&amp;\\[-2.5ex]
\hline 	&amp;\\
\textbf{Standard CF $\boldsymbol{\Lambda^\mu_d}$}						&amp; \textbf{New CF $\boldsymbol{\Lambda^{\mu}_{d,n}}$}\\
		&amp;\\
\hline 	&amp;\\[-2.5ex]
\hline 	&amp;\\
point $x\in \R^{n}$ 													&amp; point $f\in H$\\
		&amp;\\
\hline 	&amp;\\
point evaluation at $x$ 										&amp; point evaluation at $f$\\
$\delta_{x}(p)=\angles[\big]{\p,\v_d(x)}$ &amp; $\delta_{f}(p)=\angles[\big]{\p,\v_{d,n}(f)}$\\
$p\in\R[x]_d$ &amp; $p\in P_{d,n}$			\\
		&amp;\\
\hline 	&amp;\\
measure $\mu$ on $X\subset\R^{n}$ 									&amp; measure $\mu$ on $F\subset H$ \\
		&amp;\\
\hline 	&amp;\\
moment matrix 														&amp; moment matrix \\
$\mathbf{M}_d(\mu)=\displaystyle\int_X \v_d(x)\,\v_d(x)^T\,\dd\mu(x)$ 	&amp; $\mathbf{M}_{d,n}(\mu)\,=\displaystyle\int_F \v_{d,n}(f)\,\v_{d,n}(f)^T\,\dd\mu(f)$		\\
		&amp;\\
\hline	&amp;\\
$\Lambda^\mu_d(x)^{-1}=\v_d(x)^T\,\mathbf{M}_d(\mu)^{-1}\,\v_d(x)$ 	&amp; $\Lambda^\mu_{d,n}(f)^{-1} =\v_{d,n}(f)^T\M_{d,n}(\mu)^{-1}\,\v_{d,n}(f)$	\\
		&amp;\\
\hline
\end{tabular}
\end{center}
\end{table}

\subsection{Asymptotic properties}

In this section we show that the new infinite-dimensional version $\Lambda^\mu_{d,n}$ on $H$ of the standard finite-dimensional Christoffel function on Euclidean spaces, also satisfies a distinguished dichotomy property that will prove crucial to detect abnormal trajectories (as it is crucial to detect outliers in the finite-dimensional setting~\cite{neurips,lp19,lpp22}). Let $d\wedge n\coloneqq\min(d,n)$.

\begin{lemma}\label{point}
For all $h \in F$, it holds\/ $\lim_{d\wedge n\to\infty} \Lambda^{\mu}_{d,n}(h) = \mu\parens[\big]{\{h\}}$.
\end{lemma}

\begin{proof}
Let $h \in F$. First observe that $\Lambda^{\mu}_{d,n}(h)$ is bounded below and non-increasing i.e.\ $\Lambda^{\mu}_{d'\wedge n'}(h) \leq \Lambda^{\mu}_{d \wedge n}(h)$ whenever $d\wedge n \leq d'\wedge n'$, so $\lim_{d\wedge n\to\infty} \Lambda^{\mu}_{d,n}(h)$ exists. If $p$ is admissible for problem~\eqref{cf}, it holds
\[
\int_F p^2(f)\,\dd\mu(f) \leq p^2(h)\mu\parens[\big]{\{h\}} = \mu\parens[\big]{\{h\}},
\]
so $\lim_{d\wedge n\to\infty} \Lambda^{\mu}_{d,n}(h) \leq \mu\parens[\big]{\{h\}}$. Conversely, for given $d,n \in \N$, let
\[
p(f)\coloneqq\parens[\Big]{1-\abs[\big]{\pi_n(f-h)}^2}^d.
\]
Note that $p(\,\cdot\,) \in P_{2d,n}$ and $p(h)=1$ so that $p(\,\cdot\,)$ is admissible for problem~\eqref{cf} and
\[
\begin{split}
\Lambda^{\mu}_{2d+1,n}(h)
&amp; \leq \Lambda^{\mu}_{2d,n}(h) \\
&amp; \leq \int_F p(f)^2 \dd\mu(f) \\
&amp; \leq \int_{B(h,d^{-\frac14})}\dd\mu(f) + \int_{F\setminus B(h,d^{-\frac14})} \parens[\Big]{1-\abs[\big]{\pi_n(f-h)}^2}^{2d} \dd\mu(f)
\end{split}
\]
where $B(h,r)\coloneqq\braces[\big]{f \in F : \abs{f-h} \leq r}$. For all $f \in F\setminus B(h,d^{-\frac14})$, using~\eqref{np} it holds
\[
\abs{f-h}^2=\sum_{k=1}^n \langle f-h, e_k \rangle^2 + \sum_{k=n+1}^{\infty} \langle f-h, e_k \rangle^2 \geq d^{-\frac12}
\]
and hence
\[
\parens[\Big]{1-\abs[\big]{\pi_n(f-h)}^2}^{2d} = \parens[\Bigg]{1-\sum_{k=1}^n \langle f-h, e_k \rangle^2}^{2d} \leq \parens[\Bigg]{1-d^{-\frac12}+\sum_{k=n+1}^{\infty} \langle f-h, e_k \rangle^2}^{2d}
\]
from which it follows that
\[
\lim_{n\to\infty} \int_{F\setminus B(h,d^{-\frac14})} \parens[\Big]{1-\abs[\big]{\pi_n(f-h)}^2}^{2d} \dd\mu(f) \leq \lim_{n\to\infty} \parens[\Bigg]{1-d^{-\frac12}+\sum_{k=n+1}^{\infty} \langle f-h, e_k \rangle^2}^{2d} = (1-d^{-\frac12})^{2d}.
\]
Combining these asymptotic expressions we get
\[
\lim_{d\wedge n\to\infty} \Lambda^{\mu}_{d,n}(h) \leq \lim_{d\to\infty} \int_{B(h,d^{-\frac14})}\dd\mu(f) + (1-d^{-\frac12})^{2d} = \mu\parens[\big]{\{h\}}.\qedhere
\]
\end{proof}

If $\mu$ is absolutely continuous with respect to e.g.\ the Gaussian measure restricted to $F\subset H$~\cite{b98,d06}, then it follows from Lemmas~\ref{average} and~\ref{point} that the Christoffel function on $F$ decreases to zero linearly with respect to the dimension of the vector space $P_{d,n}$. Equivalently, on $F$, the CD polynomial $p^\mu_{d,n}$ increases linearly with respect to the dimension. This is in sharp contrast with its exponential growth outside $F$, captured by the following result.

\begin{lemma}\label{outside}
Let $d,n \in \N$. For all $h \in H$ such that\/ $\min_{f \in F}\abs[\big]{\pi_n(f-h)} \geq \delta &gt; 0$ it holds
\[
p^{\mu}_{d,n}(h) \geq 2^{\frac{\delta}{\delta+\diam F}d-3},
\]
where\/ $\diam F\coloneqq\max_{f_1,f_2 \in F} \abs{f_1-f_2}$ is finite since $F$ is compact.
\end{lemma}

\begin{proof}
Let $\delta \in (0,1)$ and let
\[
q(f)\coloneqq\frac{T_d\parens[\big]{1+\delta^2-\abs[\big]{\pi_n(f)}^2}}{T_d(1+\delta^2)},
\]
where $T_d$ is the univariate Chebyshev polynomial of the first kind of degree $d \in \N$. This polynomial of $f \in H$ is such that
\begin{itemize}
\item $q(0)=1$;
\item $\abs[\big]{q(f)} \leq 1$ whenever $\abs[\big]{\pi_n(f)} \leq 1$;
\item $\abs[\big]{q(f)} \leq 2^{1-\delta d}$ whenever $0 &lt; \delta \leq \abs[\big]{\pi_n(f)} \leq 1$;
\end{itemize}
see~\cite[Lemma~6.3]{lp19}. Now let
\[
p(f)\coloneqq q\parens[\Bigg]{\frac{f-h}{\delta+\diam F}},
\qquad \bar{\delta} \coloneqq \frac{\delta}{\delta+\diam F},
\]
If $h\in H$ and $\min_{f \in F}\abs[\big]{\pi_n(f-h)} \geq \delta &gt; 0$, then
\[
0 &lt; \bar{\delta} \leq \abs[\Bigg]{\pi_n\parens[\Bigg]{\frac{f-h}{\delta+\diam F}}} \leq 1,
\]
for all $f \in F$. Note that $p(\,\cdot\,) \in P_{2d,n}$ and $p(h)=1$ so that $p(\,\cdot\,)$ is admissible in problem~\eqref{cf} and hence
\[
\Lambda^{\mu}_{2d,n}(h) \leq \int_F p(f)^2 \dd\mu(f)
\leq \int_F (2^{1-\bar{\delta}d})^2 \dd\mu(f) = 2^{2-2\bar{\delta}d} \leq 2^{3-2\bar{\delta}d}.
\]
Also $\Lambda^{\mu}_{2d+1,n}(h) \leq \Lambda^{\mu}_{2d,n}(h) \leq 2^{3-2\bar{\delta}d}$ and since $\bar{\delta} &lt; 1$, it holds $\Lambda^{\mu}_{2d+1,n}(h) \leq 2^{3-\bar{\delta}(2d+1)}$, from which we conclude that $\Lambda^{\mu}_{d,n}(h) \leq 2^{3-\bar{\delta}d}$.
\end{proof}

\subsection{Updating the empirical CF when new data are available}

In the case where $\mu$ is an empirical measure supported on the union of trajectories $g\in\mathcal{D}$ (see our motivation in the introduction) and if an additional trajectory $g_0$ is added to $\mathcal{D}$ (that is, the support becomes $\mathcal{D}\cup\{g_0\}$) then as in the finite-dimensional case, the CF $\Lambda^\mu_{d,n}$ is easily updated. This is because the inverse of the new moment matrix is a rank-one update of the initial one, and so is easily obtained the Sherman--Morrison--Woodbury formula.

More precisely, let the new trajectory be the element $g_0\in H$ with representation
\[
g_0=\sum_{k=1,2,\dotsc} \angles{g_0,e_k}\,e_k.
\]
Then if $\#\mathcal{D}=N$ and $\mu_{N+1}$ is the new empirical measure supported on $\mathcal{D}'\coloneqq\mathcal{D}\cup\{g_0\}$, the inverse of its associated moment matrix satisfies
\[
\begin{split}
\parens[\big]{(N+1)\,\M_{d,n}(\mu_{N+1})}^{-1} &amp;=\parens[\big]{N\,\M_{d,n}(\mu_{N})+\underbrace{\v_{d,n}(g_0)\v_{d,n}(g_0)^T}_{\text{rank-one}}}^{-1}\\
&amp;=\frac{1}{N}(\M_{d,n}(\mu_N)^{-1}-\frac{1}{N^2}\frac{\M_{d,n}(\mu_N)^{-1}\v_{d,n}(g_0)\v_{d,n}(g_0)^T\M_{d,n}(\mu_N)^{-1}}{1+\frac{1}{N}\v_{d,n}(g_0)\M_{d,n}(\mu_N)^{-1}\v_{d,n}(g_0)},
\end{split}
\]
and it can be computed efficiently. Indeed note that in this rank-one update, the corrective term only requires computing $\M^{-1}_{d,n}(\mu_N)\v_{d,n}(g_0)$ (one matrix-vector multiplication).

In particular one also obtains the formula:
\[
\frac{\Lambda^{\mu_{N+1}}_{d,n}(g)^{-1}}{N+1}=\frac{\Lambda^{\mu_{N}}_{d,n}(g)^{-1}}{N}-
\frac{\frac{1}{N^2}K^{\mu_N}_{d,n}(g,g_0)^2}{1+\frac{1}{N}\Lambda^{\mu^N}_{d,n}(g_0)^{-1}},\quad\forall g\in H.
\]

\section{Numerical illustration}

We designed a prototype Matlab code
\begin{center}
\url{http://homepages.laas.fr/henrion/software/hilbertcd/chebcd.zip}
\end{center}
using the {\tt chebfun} package to manipulate Chebyshev polynomials~\cite{chebfun}. Our Hilbert space $H$ is $W^{1,2}\parens[\big]{[-1,1]}$, the Sobolev space of real valued functions on the interval $[-1,1]$ whose weak derivatives are square integrable. Our orthonormal system consists of scaled Chebyshev polynomials of the first kind $e_1=1$, $e_k \coloneqq \sqrt{2}T_{k-1}$, $k=2,3,\dotsc$ with $T_1(t)\coloneqq\sqrt{2}\,t$, $T_2(t)=\sqrt{2}(2t^2-1),\dotsc$ and the scalar product
\[
\langle f, e_k \rangle = \int_{-1}^1 \frac{f(t)T_{k-1}(t) \, \dd t}{\pi\sqrt{1-t^2}},\quad\forall f\in H.
\]
Hence every function $f \in H$ can be expressed as a Chebyshev series $f = \sum_{k=1,2,\dotsc} c_k e_k$ where $\parens[\big]{c_k = \angles{f,e_k}}_{k=1,2,\dotsc}\subset \R$ are its associated Chebyshev coefficients.

\begin{example}\label{ex1}
In a first illustrative example:
\begin{itemize}
\item we fix the algebraic degree $d \in \N$ and harmonic degree $n \in \N$,
\item we choose a nominal function $g_0 \in H$, and
\item generate an \emph{empirical} moment matrix $\M_{d,n}(\mu_N)$ obtained from randomly generated sample functions $g_i$, $i=1,\dotsc,N$ around $g_0$:
\[
\M_{d,n}(\mu_N) = \frac{1}{N}\sum_{i=1}^N \v_{d,n}(g_i)\,\v_{d,n}(g_i)^T,
\]
where $N$ is much larger than the dimension $\binom{n+d}{n}$ of the vector space $P_{d,n}$ of polynomials of algebraic degree up to $d$ and harmonic degree up to $n$. Basis $\v_{d,n}(\,\cdot\,)$ consists of monomials.
\end{itemize}

For example, if $d=n=4$ the moment matrix has size $\binom{6}{3}=70$. We choose a nominal function $g_0 = \frac{1}{3}(T_1+T_2+T_3)$ and the $N=10^3$ samples $g_i=g_0 + \epsilon_1 T_1 + \epsilon_2 T_2 + \epsilon_3 T_3$, $i=1,\dotsc,N$ are generated for $\epsilon \in \R^3$ sampled uniformly in the Euclidean ball of radius $1/10$.

Now if we generate a function randomly with the same distribution, the CD polynomial evaluated at this function should have a value around $70$, consistently with Lemma~\ref{average}.

In contrast, if we generate an outlier function using a larger (say by an order of magnitude) perturbation around the nominal function, the CD polynomial evaluated at this function should be much larger, consistently with Lemma~\ref{average}.

\begin{figure}[h!]
\includegraphics[width=0.8\textwidth]{chebinout}
\caption{Inlier samples (gray), nominal function (black) and outlier function (red).}\label{fig:chebinout}
\end{figure}

On Figure~\ref{fig:chebinout} we represent in gray a large number of inlier functions $f_i$, $i=1,2,\dotsc,N$ sampled from the same distribution used to generate the moment matrix. In black we represent the nominal function $g_0$. In red we represent an outlier function $f$, at which the Christoffel--Darboux polynomial takes the large value $3904$, consistently with Lemma~\ref{average}. On Figure~\ref{fig:chebhisto} we represent the histogram of values of the CD polynomial at the samples. The average value is $75$, consistently with Lemma~\ref{average}.

\begin{figure}[h!]
\includegraphics[width=0.8\textwidth]{chebhisto}
\caption{Histogram of values of the CD polynomial evaluated at $10^3$ inlier samples.}\label{fig:chebhisto}
\end{figure}

This example also showcases why the naive approach alluded to in Remark~\ref{rem:naive} fails. Indeed observe that the graph of the outlier in red in Figure~\ref{fig:chebinout} is contained in the geometrical support of the inliers trajectories in grey (seen as points in $\R^2$ and not to be confused with the support of $\mu$ which is an infinite-dimensional object); however it is an \emph{outlier}.
\end{example}

\begin{example}
We next consider an educational example to illustrate how a trajectory $f$ obtained from the nominal trajectory $g_0$ of harmonic degree $n=4$ in Example~\ref{ex1}, by adding a perturbation that contains an harmonic not present in $g_0$ (e.g.\ $\langle f,e_{n+1}\rangle\neq 0$) is immediately detected as an outlier. Indeed consider the empirical moment matrix generated from the same uniform measure as above, but this time fixing the algebraic degree $d=1$ and harmonic degree $n=5$. The moment matrix reads:
\[
\arraycolsep=2pt
\M_{d,n}(\mu_N) = \parens*{
\begin{array}{cccccc}
1 &amp; -0.0024 &amp; 0.3315 &amp; 0.3326 &amp; 0.3352 &amp; 0 \\
-0.0024 &amp; 0.0016 &amp; -0.0007 &amp; -0.0008 &amp; -0.0008 &amp; 0 \\
0.3315 &amp; -0.0007 &amp; 0.1116 &amp; 0.1102 &amp; 0.1111 &amp; 0 \\
0.3326 &amp; -0.0008 &amp; 0.1102 &amp; 0.1123 &amp; 0.1115 &amp; 0 \\
0.3352 &amp; -0.0008 &amp; 0.1111 &amp; 0.1115 &amp; 0.1141 &amp; 0 \\
0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 0
\end{array}}
\]
%\[
%\M_{d,n}(\mu_N) =
%\begin{pmatrix}
%1 		&amp; -0.0024 	&amp; 0.3315 	&amp; 0.3326 	&amp; 0.3352 	&amp; 0 \\
%-0.0024	&amp; 0.0016 	&amp; -0.0007 	&amp; -0.0008 	&amp; -0.0008 	&amp; 0 \\
%0.3315 	&amp; -0.0007	&amp; 0.1116 	&amp; 0.1102 	&amp; 0.1111 	&amp; 0 \\
%0.3326 	&amp; -0.0008 	&amp; 0.1102 	&amp; 0.1123 	&amp; 0.1115 	&amp; 0 \\
%0.3352 	&amp; -0.0008 	&amp; 0.1111 	&amp; 0.1115 	&amp; 0.1141 	&amp; 0 \\
%0 		&amp; 0 			&amp; 0 			&amp; 0 			&amp; 0 			&amp; 0
%\end{pmatrix}
%\]
and its last row and column are identically zero since the samples have harmonic degree~$4$ only. The outlier $g_0+\epsilon T_4$ has harmonic degree~$5$, and the value of the CF at this function is zero (and hence the CD polynomial has infinite value) since the moment matrix is not invertible. Yet, on Figure~\ref{fig:chebout} we see that the outlier lies in the geometrical support of the inlier trajectories in grey. As mentioned in Remark~\ref{remark-singular}\eqref{remark-singular_2}, in practice one uses the regularized (and always non singular) version $\M_{d,n}(\mu)+\varepsilon\,\mathbf{I}$ of $\M_{d,n}(\mu)$, in which case the value of the CD polynomial is very large, as desired to detect outliers.

\begin{figure}[h]
\includegraphics[width=0.8\textwidth]{chebout}
\caption{Inlier samples (gray), nominal function (black) and outlier function (red).}\label{fig:chebout}
\end{figure}

On the other hand, this detection is effective no matter how large is the magnitude of the harmonic component $\langle f,e_5\rangle$ whereas the trajectory $f$ is almost indistinguishable graphically from $g_0$ when this component is small, which may not be desirable in a practical situation.
\end{example}

\section{Conclusion}

We have introduced an infinite-dimensional Christoffel--Darboux polynomial kernel and its associated Christoffel function on a separable Hilbert space (i.e.\ whose arguments are infinite-dimensional). It turns out that dichotomy property of the finite-dimensional kernel growth with respect to its degree~(in or outside the support of the underlying measure) is also valid for this infinite-dimensional version. This allows to treat some problems in data analysis (e.g.\ outlier detection) where the data now consist of a set of reference trajectories (e.g.\ functions of time in $L^2\parens[\big]{[0,1]}$) instead of a set of points in $\R^n$. As suggested by a referee, it would be interesting to investigate how well this strategy works when the underlying Hilbert space is a RKHS (so that ``point'' evaluations can be treated efficiently).

\section*{Declaration of interests}

The authors do not work for, advise, own shares in, or receive funds from any organization that could benefit from this article, and have declared no affiliations other than their research organizations.

\newpage

\printbibliography

\end{document}</pre></body></html>