\section{Introduction}

The Laplace-Beltrami operator is a fundamental and widely studied mathematical tool carrying a lot of intrinsic topological and geometric information about the Riemannian manifold on which it is defined.
Its various discretizations, through graph Laplacians, have inspired many applications in data analysis and machine learning and led to popular tools such as
Laplacian EigenMaps~\cite{belkin2003laplacian} for dimensionality reduction, spectral clustering ~\cite{von2007tutorial}, or semi-supervised learning~\cite{belkin2004semi}, just to name a few.

During the last fifteen years, many efforts, leading to a vast literature, have been made to understand the convergence of graph Laplacian operators built on top of (random) finite samples to Laplace-Beltrami operators. For example pointwise convergence results have been obtained in \cite{belkin2005towards} (see also \cite{belkin2008towards}) and \cite{hein2007graph}, and a (uniform) functional central limit theorem has been established in \cite{gine2006empirical}. Spectral convergence results have also been proved by \cite{belkin2007convergence} and \cite{von2008consistency}. More recently, \cite{ting2011analysis} analyzed the asymptotic of a large family  of graph Laplacian operators by taking the diffusion process approach previously proposed in \cite{nadler2006diffusion}.

Graph Laplacians depend on scale or bandwidth parameters whose choice is often left to the user.  Although many convergence results for various metrics have been established,  little is known about how to  rigorously and efficiently tune these parameters in practice.  In this paper we address this problem in the case of unnormalized graph Laplacian. More precisely, given a Riemannian manifold $M$ of known dimension $d$  and a function $f : M \to \mathbb R$ , we consider the standard unnormalized graph Laplacian operator defined by
\[
\hat \Delta_h f(y) = \frac{1}{nh^{d+2}} \sum_i K\left( \frac{y-X_i}{h}\right) \left[ f(X_i) - f(y) \right], \qquad y \in M,\]
where $h$ is a bandwidth,  $X_1,\ldots,X_n$ is a finite point cloud sampled on $M$ on which the values of $f$ can be computed, and $K$ is the Gaussian kernel: for $y \in \mathbb R^m$
\begin{equation}\label{gauss_k}
K(y) = \frac{1}{(4\pi)^{d/2}} e^{-\|y\|_m^2/4},
\end{equation}
where $\|y\|_m$ is the Euclidean norm in the ambiant space $\mathbb R^m$.

In this case, previous results (see for instance \cite{gine2006empirical}) typically say that the bandwidth parameter $h$ in $\hat \Delta_h$ should be taken of the order of $n^{-\frac{1}{d+2+\alpha}}$ for some $\alpha >0$, but in practice, for a given point cloud, these asymptotic results are not sufficient to choose $h$ efficiently.
In the context of neighbor graphs \cite{ting2011analysis} proposes self-tuning graphs  by choosing $h$ locally in terms of the distances to the $k$-nearest neighbor, but  note that $k$ still need to be chosen and moreover as far as we know there is no guarantee for such method to be rate-optimal. More recently a data driven method for spectral clustering  has been proposed in \cite{rieser2015topological}. Cross validation~\cite{arlot2010survey} is the standard approach for tuning parameters in statistics and machine learning. Nevertheless, the problem of choosing $h$ in  $\hat \Delta_h $ is not easy to rewrite as a cross validation problem, in particular because there is no obvious contrast corresponding to the problem (see \cite{arlot2010survey}).

The so-called Lepski's method is another popular method for selecting the smoothing parameter of an estimator. The method has been introduced by Lepski \cite{lepskii1992asymptotically,lepskii1993asymptotically,lepski1992problems} for kernel estimators and local polynomials for various risks and several improvements of the method have then been proposed, see~\cite{lepski1997optimal,goldenshluger2009structural,goldenshluger2008universal}. In this paper we adapt Lepski's method for selecting $h$ in the graph Laplacian estimator $\hat \Delta_h $. Our method is supported by mathematical guarantees: first we obtain an oracle inequality - see Theorem \ref{prop_oineq} -  and second we obtain the correct rate of convergence - see Theorem \ref{cor_c} - already proved in the asymptotical studies of  \cite{belkin2005towards} and \cite{gine2006empirical} for non data-driven choices of the bandwidth. Our approach follows the ideas recently proposed in \cite{lacour2015minimal}, but for the specific problem of Laplacian operators on  smooth manifolds. In this first work about the data-driven estimation of Laplace-Beltrami operator,  we focus as in \cite{belkin2005towards} and \cite{gine2006empirical}  on  the pointwise estimation problem:  we consider a smooth function $f$ on $M$ and the aim is to estimate $\hat \Delta f$ for the $L^2$-norm $\| \cdot\|_{2,M}$  on $M \subset \mathbb R^m$. The data driven method presented here may be adapted and generalized for other types of risks (uniform norms on functional family and convergence of the spectrum) and other types of graph Laplacian operators, this will be the subject of future works.

The paper is organized as follows: Lepski's method is introduced in Section \ref{sec:Lep}. The main results are stated in Section \ref{res} and a sketch of their proof is given in Section \ref{pf_mthm} (the complete proofs are given in the supplementary material). A numerical illustration and a discussion about the proposed method are given in Sections \ref{sec:exp} and \ref{sec:disc} respectively.

\section{Lepski's procedure for estimating the Laplace-Beltrami operator}
\label{sec:Lep}

All the Riemannian manifolds considered in the paper are smooth compact $d$-dimensional submanifolds (without boundary) of $\mathbb R^m$ endowed with the Riemannian metric induced by the Euclidean structure of $\mathbb R^m$. Recall that, given a compact $d$-dimensional smooth Riemannian manifold $M$ with volume measure $\mu$, its Laplace-Beltrami operator is the linear operator $\Delta$ defined on the space of smooth functions on $M$ as $\Delta(f) = - \operatorname{\mathrm{div}}( \nabla f)$ where $\nabla f$ is the gradient vector field and $\operatorname{\mathrm{div}}$ the divergence operator. In other words, using the Stoke's formula, $\Delta$ is the unique linear operator satisfying
$$\int_M \| \nabla f \|^2 d\mu = \int_M \Delta(f) f d\mu.$$

Replacing the volume measure $\mu$ by a distribution $\mathrm P$ which is absolutely continuous with respect to $\mu$, the weighted Laplace-Beltrami operator $\Delta_{\mathrm P}$ is defined as
\begin{equation}\label{eqDL}
\Delta_{\mathrm P}f = \Delta f + \frac{1}{p} \langle \nabla p, \nabla f \rangle \, ,
\end{equation}
where $p$ is the density of $\mathrm P$ with respect to $\mu$. The reader may refer to classical textbooks such as, e.g., \cite{rosenberg1997laplacian} or \cite{grigoryan2009heat} for a general and detailed introduction to Laplace operators on manifolds.

In the following, we assume that we are given n points  $X_1,\dots,X_n$ sampled on $M$ according to the distribution $\mathrm P$. Given a  smooth function $f$ on $M$, the aim is to estimate $\Delta_{\mathrm P} f$, by selecting an estimator in a given finite family of graph Laplacian $ (\hat \Delta_{h} f)_{h \in \mathcal H}$, where $\mathcal H$ is a finite family of bandwidth parameters.

Lepski's procedure is generally presented as a method for selecting bandwidth in an adaptive way.
More generally, this method can be seen as an estimator selection procedure.

\subsection{Lepski's procedure}

We first shortly explain the ideas of Lepski's method. Consider a target quantity $s$, a collection of estimators $(\hat s_h)_{h\in\mathcal H}$ and a loss function $\ell(\cdot,\cdot)$. A  standard objective when selecting $\hat s_h$ is trying to minimize the risk $\mathbb E \ell( s,\hat s_h)$ among the family of estimators.  In most settings, the risk of an estimator can be decomposed into  a bias part and a variance part. Of course neither the risk, the bias nor the variance of an estimator are known in practice. However in many cases, the variance term can be controlled quite precisely.
Lepski's method requires that the variance of each estimator $\hat s_h$ can be tightly  upper bounded by a quantity $v(h)$. In most cases, the bias can be written as $\ell (s,\bar s_h)$ where  $\bar s_h$ corresponds to some (deterministic) averaged version of $\hat s_h$. It thus seems natural to estimate  $\ell (s,\bar s_h)$ by $\ell (\hat s_{h'},\hat s_h)$ for some $h'$ smaller than $h$. The later quantity incorporates some randomness while the bias does not. The idea is to remove the ``random part" of the estimation by considering $\left[\ell (\hat s_{h'},\hat s_h) - v(h) - v(h')\right]_+$, where $[ \: ]_+$ denotes the positive part. The bias term is estimated by considering all pairs of estimators $( s_{h},\hat s_{h'})$  through the quantity $\sup_{h'\leq h}\left[\ell (\hat s_{h'},\hat s_h) - v(h) - v(h')\right]_+$. Finally, the estimator minimizing the sum of the estimated bias and variance is selected, see ~\cref{h_lepski} below.

In our setting, the control of the variance of the graph Laplacian estimators $\hat \Delta_h$ is not tight enough to directly apply the above described method. To overcome this issue, we use a more flexible version of Lepski's method that involves some multiplicative coefficients $a$ and $b$ introduced in the variance and bias terms.
More precisely, let $ V(h) = V_f(h)$ be an upper bound for $ \mathbb E[ \| (\mathbb E[\hat \Delta_h] - \hat \Delta_h)f \|_{2,M}^2]$. The bandwidth $\hat h$  selected by our Lepski's procedure is defined by
\begin{equation}\label{h_lepski}
\hat h = \hat h_f= \mathrm{arg}\min_{h\in \mathcal H} \left\{  B(h) + b V(h) \right\}
\end{equation}
where
\begin{equation}\label{bh}
 B(h) = B_f(h) = \max_{h'\leq h, \, h' \in \mathcal H} \left[ \|( \hat \Delta_{h'} - \hat \Delta_h )f\|_{2,M}^2 - a V(h')  \right]_+
\end{equation}
with $0<a\leq b$. The calibration of the constants $a$ and $b$ in practice is beyond the scope of this paper, but we suggest a heuristic procedure inspired from \cite{lacour2015minimal} in \cref{sec:exp}.

\subsection{Variance of the graph Laplacian for smooth functions}\label{ref_sec}

In order to control the variance term, we consider  for this paper the set $\mathcal F$ of smooth functions $f: M \to \mathbb R$ uniformly bounded up to the third order. For some constant $C_{\mathcal F}  >0 $ , let
\begin{equation}\label{def_Cf}
\mathcal F = \left\{  f \in \mathcal C^3(M,\mathbb R) \,  , \,    \| f^{(k)}\|_{\infty} \leq C_{\mathcal F} , \,  {k=0,\dots,3} \right\}
\end{equation}
Here, by $\| f^{(k)} \|_\infty \leq C_{\cal F}$ we mean that in any normal coordinate systems all the partial derivatives of order $k$ of $f$ are bounded by $C_{\cal F}$.

We introduce some notation before giving the variance term for $f \in \mathcal F$. Define
\begin{align}
\label{def_Da}
D_{\alpha} & =  \frac{1}{(4\pi)^{d}} \int_{\mathbb R^d} \left( \frac{C \| u\|_d^{\alpha+2}}{2} + C_1 \|u\|_d^{\alpha}  \right)\ e^{-\|u\|_d^2/4}   \, \mathrm du\\
\label{def_tDa}
\tilde D_{\alpha} & =  \frac{1}{(4\pi)^{d/2}} \int_{\mathbb R^d} \left( \frac{C \| u\|_d^{\alpha+2}}{4} + C_1 \|u\|_d^{\alpha}  \right)\ e^{-\|u\|_d^2/8}   \, \mathrm du
\end{align}
where $\| \|_d$ is the euclidean norm in $\mathbb R^d$ and where  $C$ and $C_1$ are geometric constants that only depend on the metric structure of $M$ (see  Lemma~\ref{lem_2.2} in the appendices). We also introduce the $d$-dimensional Gaussian kernel on $\mathbb R^d$:
\[
K_d(u) = \frac{1}{(4\pi)^{d/2}} e^{-\|u\|_d^2/4}, \qquad u \in \mathbb R^d
\]
and we denote by $\| \cdot\|_{p,d}$  the $L^p$-norm on $\mathbb R^d$.
The next proposition provides an explicit bound $V(h)$ on the variance term.
Let
\begin{equation}\label{od}
\omega_d = 3 \times 2^{d/2-1}
\end{equation}
and
\begin{equation}\label{ad}
\alpha_d(h) = h^2 \left(  D_4+\frac{3}{2} \omega_d \ \| K_d\|_{2,d}^2 + \frac{2\mu(M)}{(4\pi)^{d}} \right)
+h^4 \frac{D_6}{4}.
\end{equation}

We first need to control the variance of $\hat \Delta_h f $ over $\cal F$. This will be possible by considering Taylor Young expansions of $f$  in normal coordinates.
For that purpose, for technical reasons following from Lemma~\ref{lem_2.2}, we constrain the parameter $h$ to satisfy the following inequality
\begin{equation}
\label{CondhmaxRayInj}
  2  \sqrt{d+4} h \log(h^{-1})^{1/2}  \leq  \rho(M) ,
\end{equation}
where $\rho(M)$ is a geometric constant that only depends on the reach and the injectivity radius of M.

\begin{prop}\label{eq_v}
Given $h\in \mathcal H$ and for any $f \in \mathcal F$, we have
\[
V(h) :=   \frac{2  C_{\mathcal F}^2}{n h^{d+2}} \Big[ w_d \| K_d\|_{2,d}^2 + \alpha_d(h)\Big]
\leq  \mathbb E[ \| (\mathbb E[\hat \Delta_h] - \hat \Delta_h)f \|_{2,M}^2].
\]
\end{prop}

\noindent
For the proof we refer to ~\cref{proof1}.\\[1mm]

\section{Results}\label{res}

We now give the main result of the paper: an oracle inequality for the estimator $\hat \Delta_{\hat h}$, or in other words, a bound on the risk that shows that the performance of the estimator is almost
as good as it would be if we knew the risks of each estimator.
In particular it performs an (almost) optimal trade-off between the variance term $V(h)$ and
the approximation term
\begin{multline*}
D(h) = D_f(h) = \max\left\{  \| (p\Delta_{\mathrm P} -  \mathbb E [\hat \Delta_{ h}])f \|_{2,M}, \, \sup_{h'\leq h}   \| ( \mathbb E [\hat\Delta_{ h'}]-  \mathbb E [\hat\Delta_h])f  \|_{2,M} \right\}\\
\leq 2 \sup_{h'\leq h} \| (p\Delta_{\mathrm P} -  \mathbb E [\hat \Delta_{ h'}])f \|_{2,M}.
\end{multline*}

\begin{thm}
\label{prop_oineq}
According to the notation introduced in the previous section,
let $\epsilon = \sqrt a/2 -1$ and
\[
\delta(h) = \sum_{h'\leq h} \max\left\{  \exp\left( -\frac{\min\{\epsilon^2,\epsilon\}   \sqrt n }{24} \right), \,  \exp\left( -\frac{\epsilon^2}{3}\gamma_d(h') \right) \right\}
\]
and
\[
\gamma_d(h) = \frac{1}{ h^{d} \|p\|_\infty } \left[ \frac{ \omega_d \ \|K_d\|_{2,d}^2 + \alpha_d(h)}{\left(\omega_d\ \| K_d\|_{1,d} + \beta_d(h)\right)^2}   \right]
\]
where $\alpha_d $ is defined by \eqref{ad} and where
\begin{align}
\label{bd}
\beta_d(h) & = h \left(\omega_d \ \| K_d\|_{1,d} +\frac{2 \mu(M)}{(4\pi)^{d/2}}  \right) +h^2\tilde D_3 + \frac{h^3 \tilde D_4}{2}.
\end{align}
Given $f \in \mathcal C^2(M,\mathbb R)$, with probability at least
$1-2\sum_{h \in \mathcal H}\delta(h)$,
\[
\| (p\Delta_{\mathrm P}  - \hat \Delta_{\hat h}) f\|_{2,M} \leq \inf_{h \in \mathcal H} \left\{3 D(h) + (1+\sqrt2) \sqrt{b V(h)}\right\}.
\]
\end{thm}

\noindent
Broadly speaking, Theorem~\ref{prop_oineq} says that there exists an event of large probability for which the estimator selected by Lepski's method is almost as good as the best estimator in the collection. Note that the size of the bandwidth family $\mathcal H$ has an impact on the probability term $1-2\sum_{h \in \mathcal H}\delta(h)$. If $\mathcal H$ is not too large, an oracle inequality for the risk of $\hat \Delta_{\hat h} f$ can be easily deduced from the later result. Henceforth we assume that $f \in \mathcal F$. We first  give a control on the approximation term $D(h)$.

\begin{prop}\label{prop_Dh}
Assume that the density $p$ is $\mathcal C^2$.
It holds that
\[
D(h) \leq \gamma \ C_{\mathcal F} h
\]
where $C_{\mathcal F}$ is defined in ~\cref{def_Cf} and $\gamma>0$ is a constant depending on $M$, $\| p\|_{\infty}$,  $\| p'\|_{\infty}$ and $\| p''\|_{\infty}$, where $\| p^{(k)} \|_\infty$ denotes the supremum of the absolute value of the partial derivatives of $p$ in any normal coordinates system.
\end{prop}

We consider the following grid of bandwidths:
\[
\mathcal H = \left\{ e^{-k}\ , \ \lceil \log\log(n)\rceil \leq k \leq \lfloor \log(n) \rfloor  \right\}.
\]
Note that this choice ensures that Condition~\eqref{CondhmaxRayInj} is always satisfied for $n$ large enough.
The previous results lead to the pointwise rate of convergence of the graph Laplacian selected by Lepski's method:
\begin{thm}\label{cor_c}
Assume that the density $p$ is $\mathcal C^2$. For any $f \in \mathcal F$, we have
\begin{equation}
\label{cor_a1}
\mathbb E \left[ \| (p\Delta_{\mathrm P}  - \hat \Delta_{\hat h}) f\|_{2,M}  \right] \lesssim n^{-\frac{1}{d+4}}.
\end{equation}
\end{thm}

\section{Sketch of the proof of ~\cref{prop_oineq}}\label{pf_mthm}
We observe that the following inequality holds
\begin{equation}\label{prop_base}
\|(p\Delta_{\mathrm P} - \hat \Delta_{\hat h})f \|_{2,M} \leq
 D(h) + \|(\mathbb E[\hat \Delta_h] - \hat \Delta_h)f\|_{2,M} +  \sqrt{2\left(  B(h) + b V(h) \right)} .
 \end{equation}
Indeed, for $h \in \mathcal H$,
\begin{align*}
\| (p\Delta_{\mathrm P} - \hat \Delta_{\hat h})f \|_{2,M}
& \leq \| (p\Delta_{\mathrm P} -  \mathbb E[\hat \Delta_h]  )f \|_{2,M} +  \| (\mathbb E[\hat \Delta_h]  - \hat \Delta_{ h})f \|_{2,M}
+ \| (\hat \Delta_h - \hat \Delta_{\hat h} )f \|_{2,M} \\
& \leq D(h) + \| (\mathbb E[\hat \Delta_h]  - \hat \Delta_{ h} )f\|_{2,M}
+  \| (\hat \Delta_h - \hat \Delta_{\hat h} )f \|_{2,M} .
\end{align*}

\noindent
By definition of $B(h)$, for any $h'\leq h$,
\[
\| (\hat \Delta_{h'} - \hat \Delta_{h})f \|_{2,M}^2 \leq B(h) + a V(h')
\leq  B( \max\{ h, h'\}) + a V( \min\{h,h'\}),
\]
so that,
according to the definition of $\hat h$ in ~\cref{h_lepski} and recalling that $a\leq b$,
\[
\| (\hat \Delta_{\hat h} - \hat \Delta_{h})f \|_{2,M}^2 \leq 2 \left[   B(h) +a V(h) \right] \leq 2 \left[   B(h) + b V(h) \right]
\]
which proves ~\cref{prop_base}.

\vskip2mm
\noindent
We are now going to bound the terms that appear in ~\cref{prop_base}.
The bound for $D(h)$ is already given in ~\cref{prop_Dh}, so that in the following we focus on
$B(h)$ and
$\|(\mathbb E[\hat \Delta_h] - \hat \Delta_h)f\|_{2,M}$.
More precisely the bounds we present in the next two propositions are
based on the following lemma from \cite{lacour2015minimal}.

\begin{lem}\label{lemma1}
Let $X_1, \dots, X_n$be an i.i.d. sequence of variables.
Let $\widetilde{\mathcal S}$ a countable set of functions and let $\eta(s) = \frac{1}{n} \sum_i \left[ g_s(X_i) - \mathbb E[g_s(X_i)]  \right]$ for any $s \in \widetilde{\mathcal S}$.
Assume that there exist constants $ \theta$ and $v_g$ such that for any $s\in \widetilde{\mathcal S}$
\[
\| g_s\|_{\infty} \leq \theta \quad \text{and} \quad \mathrm{Var}[ g_s(X)]\leq v_g.
\]
Denote $ H =  \mathbb E[ \sup_{s \in \widetilde{\mathcal S}} \eta(s) ]$. Then for any $\epsilon>0$ and any $H'\geq H$
\[
\mathbb P\left[ \sup_{s \in \widetilde{\mathcal S}} \eta(s) \geq (1+\epsilon)H'  \right]
\leq \max \left\{   \exp\left( -\frac{\epsilon^2 n H'^2}{6v_g} \right), \,  \exp\left( -\frac{\min\{\epsilon^2,\epsilon\}  n H'}{24\ \theta} \right)  \right\}.
\]
\end{lem}

\vskip2mm
\begin{prop}\label{main_prop}
Let $\epsilon = \frac{\sqrt a}{2}-1$.
Given $h \in \mathcal H$, define
\[
\delta_1(h) = \sum_{h'\leq h} \max\left\{  \exp\left( -\frac{\min\{\epsilon^2,\epsilon\}  \sqrt n }{24} \right), \,  \exp\left( -\frac{\epsilon^2}{3}\gamma_d(h') \right)  \right\}.
\]
With probability at least $1-\delta_1(h)$
\[
B(h) \leq 2 D(h)^2.
\]
\end{prop}

\begin{prop}\label{main_p2}
Let $\tilde \epsilon = \sqrt a -1$.
Given $h \in \mathcal H$, define
\[
\delta_2(h) = \max\left\{  \exp\left( -\frac{\min\{\tilde \epsilon^2,\tilde \epsilon\}   \sqrt n }{24} \right), \,  \exp\left( -\frac{\tilde \epsilon^2}{3}\gamma_d(h) \right) \right\}.
\]
With probability at least $1-\delta_2(h) $
\[
\| (\mathbb E[\hat \Delta_h] - \hat \Delta_{ h})f \|_{2,M}  \leq \sqrt{a V(h)}.
\]
\end{prop}

\noindent
Combining the above propositions with ~\cref{prop_base}, we get that,
for any $h\in \mathcal H$, with probability at least $1-(\delta_1(h) + \delta_2(h) )$,
\begin{align*}
\| (p\Delta_{\mathrm P} - \hat \Delta_{\hat h}) f\|_{2,M}
& \leq D(h) + \sqrt{a V(h)} + \sqrt{4 D(h)^2 + 2b V(h)}\\
& \leq 3 D(h) + (1+\sqrt2) \sqrt{b V(h)}
\end{align*}
where we have used the fact that $a\leq b$.
Taking a union bound on $h \in \mathcal H$ we conclude the proof.

\section{Numerical illustration} \label{sec:exp}

In this section we illustrate the results of the previous section on a simple example. In ~\cref{subsec:practical}, we describe a practical procedure when the data set $\mathbb{X}$ is sampled according to the uniform measure on $M$. A  numerical illustration us given in Section~\ref{subsec:sphere} when $M$ is the unit $2$-dimensional sphere in $\mathbb{R}^3$.

\subsection{Practical application of the Lepksi's method} \label{subsec:practical}

Lepski's method presented in Section~\ref{sec:Lep} can not be directly applied in practice for two reasons. First, we can not compute the $L^2$-norm  $\| \, \|_{2,M}$ on $M$, the manifold $M$ being unknown. Second, the variance terms involved in Lepski's method are not completely explicit.

Regarding the first issue, we can approximate $\| \, \|_{2,M}$  by splitting the data into two samples: an estimation sample  $\mathbb X_1$  for computing the estimators and a validation sample $\mathbb X_2$ for evaluating this norm. More precisely, given two estimators $ \hat \Delta_h f $ and $ \hat \Delta_{h'} f $ computed using $\mathbb X_1$, the quantity $   \| (\hat \Delta_h - \hat \Delta_{h'}) f \|_{2,M}^2  /  \mu(M) $ is approximated by the averaged sum  $\frac 1{n_2} \sum_{x \in \mathbb X_2} | \hat \Delta_h f(x)  - \hat \Delta_{h'} f (x) |^2$, where $n_2$ is the number of points in $\mathbb X_2$. We use these approximations to evaluate the bias terms  $B(h)$ defined by \eqref{bh}.

The second issue comes from the fact that the variance terms involved in Lepski's method  depend  on the metric properties of the manifold and on the sampling density, which are both unknown. Theses variance terms are thus only known up to a multiplicative constant. This situation contrasts with more standard frameworks for which a tight and explicit control on the variance terms can be proposed, as in  \citep{lepskii1992asymptotically,lepskii1993asymptotically,lepski1992problems}. To address this second issue, we follow the calibration strategy recently proposed in \cite{lacour2015minimal} (see also \cite{lacour2016estimator}). In practice we remove all the multiplicative constants from  $V(h)$: all these constants are passed into the terms a and b. This means that we rewrite Lepski's method as follows:
\begin{equation*}
\hat h(a,b)  = \mathrm{arg}\min_{h\in \mathcal H} \left\{  B(h) + b \frac{1}{n h ^4} \right\}
\end{equation*}
where
\[
 B(h) = \max_{h'\leq h, \, h' \in \mathcal H} \left[ \|( \hat \Delta_{h'} - \hat \Delta_h )f\|_{2,M}^2 - a \frac{1}{n {h'} ^4}  \right]_+ .
\]
We choose $a$ and $b$ according to the following heuristic:
\begin{enumerate}
\item Take $b=a$ and consider the sequence of selected models: $\hat h(a,a)$,
\item Starting from large values of $a$, make $a$ decrease and find the location $a_0$ of the main {\it bandwidth jump} in the step function $a \mapsto \hat h(a,a)$,
\item Select the model $\hat h(a_0,2a_0)$.
\end{enumerate}
The justification of this calibration method is currently the subject  of mathematical studies (\cite{lacour2015minimal}). Note that a similar strategy called "slope heuristic" has been proposed for calibrating $\ell_0$ penalties in various settings by strong mathematical results, see for instance \cite{birge2007minimal,arlot2009data,baudry2012slope}.

\subsection{Illustration on the sphere} \label{subsec:sphere}

In this section we illustrate the complete method on a simple example with data points generated uniformly on the sphere $\mathbb S^2$ in $\mathbb R^3$. In this case, the weighted Laplace-Beltrami operator is equal to the (non weighted) Laplace-Beltrami operator on the sphere.

We consider the function $f(x,y,z) = (x^2 + y ^2 + z )  \sin x  \cos x $.
The restriction of this function on the sphere has the following representation in spherical coordinates:
$$ \tilde f(\theta,\phi) = (\sin ^2  \phi   + \cos \phi )  \sin( \sin \phi \cos \theta) \cos( \sin \phi \cos \theta) .$$
It is well known that the Laplace-Beltrami operator on the sphere satisfies (see  Section~3 in \cite{grigoryan2009heat}):
$$
\Delta_{\mathcal S^2}   u= \frac 1 {\sin^2 \phi} \frac{\partial^2    u }{\partial  \theta^2 } + \frac{1}{\sin \phi }  \frac{\partial  }{\partial  \phi } \left(  \sin \phi   \frac{\partial   u  }{\partial  \phi}  \right)
$$
for any smooth polar function $u$. This allows us to derive an analytic expression of   $\Delta_{\mathcal S^2} \tilde f$.

We sample $n_1= 10^6$ points on the sphere for computing the graph Laplacians and we use  $n=10^3$ points for approximating the norms $ \| (\hat \Delta_h - \hat \Delta_{h'}) \tilde f  \|_{2,M}^2$. We compute the graph Laplacians for bandwidths in a grid $\mathcal H$ between 0.001 and 0.8 (see \cref{fig:GraphLap}). The risk of each graph Laplacian is estimated by a standard Monte Carlo procedure (see \cref{fig:risk}).
\begin{figure}[h]
\centering
	\includegraphics[scale=0.3]{LaplacianEstimationIllustration.png}
\caption{Choosing $h$ is crucial for estimating $\Delta_{\mathcal S^2} \tilde f$:  small bandwidth overfits  $\Delta_{\mathcal S^2} \tilde f$ whereas  large bandwidth leads to almost constant  approximation functions of $\Delta_{\mathcal S^2} \tilde f$.}
\label{fig:GraphLap}
\end{figure}
\begin{figure}[h]
\centering
	\includegraphics[scale=0.3]{RiskIllustration.png}
\caption{Estimation of the risk of each graph Laplacian operator: the oracle Laplacian is for approximatively  $h=0.15$.}
\label{fig:risk}
\end{figure}

Figure~\ref{fig:jump} illustrates the calibration method. On this picture, the $x$-axis corresponds to the values of $a$ and the $y$-axis represents the bandwidths. The blue step function represents the function $a \mapsto \hat h(a,a)$. The red step function gives the model selected by the rule $a \mapsto \hat h(a,2 a)$. Following the heuristics given in Section~\ref{subsec:practical}, one could take for this example the value $a_0 \approx 3.5$ (location of the bandwidth  jump for the blue curve) which leads to select the model $\hat h(a_0,2a_0) \approx 0.2$ (red curve).

\begin{figure}[h]
\centering
	\includegraphics[scale=0.3]{BandwidthJumpIllustration.png}
\caption{Bandwidth jump heuristic: find the location of the jump (blue curve) and deduce the selected bandwidth with the red curve.}
\label{fig:jump}
\end{figure}

\section{Discussion} \label{sec:disc}

This paper is a first attempt for a complete and well-founded data driven method for inferring Laplace-Beltrami operators from data points. Our results suggest various extensions and raised some questions of interest.
For instance, other versions of the graph Laplacian have been studied in the literature (see  for instance \cite{hein2007graph,belkin2008towards}), for instance when data is not sampled uniformly. It would be relevant to propose a bandwidth selection method for these alternative estimators also.

From a practical point of view, as explained in ~\cref{sec:exp},  there is a gap between the theory we obtain in the paper and what can be done in practice. To fill this gap, a first objective is to prove an oracle inequality in the spirit of Theorem~\ref{prop_oineq} for a bias term defined in terms of the empirical norms computed in practice. A second objective is to propose mathematically well-founded heuristics for the calibration of the parameters $a$ and $b$.

Tuning bandwidths for the estimation of the spectrum of the Laplace-Beltrami operator is a difficult but important problem in data analysis. We are currently working on the adaptation of our results to the case of operator norms and spectrum estimation.

\section*{Appendix: the geometric constants $C$ and $C_1$} \label{sec:geomConst}

The following classical lemma (see, e.g. \cite{gine2006empirical}[Prop. 2.2 and Eq. 3.20]) relates the constants $C$ and $C_1$ introduced in Equations \eqref{def_Da} and \eqref{def_tDa} to the geometric structure of $M$.

\begin{lem} \label{lem_2.2}
There exist constants $C, C_1 >0$ and a positive real number $r>0$ such that for any $x \in M$, and any $v \in T_x M$ such that $\| v \| \leq r$,
\begin{equation}\label{eq_310}
\left|\sqrt{\mathrm{det}(g_{ij})}(v) - 1 \right| \leq  C_1 \| v\|_d^2
\qquad \text{and}
\qquad \frac{1}{2} \| v\|_d^2 \leq  \| v\|_d^2 - C  \| v\|_d^4
\leq \|\mathcal E_x(v)- x \|_m^2 \leq  \| v\|_d^2
\end{equation}
where $\mathcal E_x: T_xM \to M$ is the exponential map and $(g_{i,j})_{i,j} \in \{1,\cdots, d\}$ are the components of the metric tensor in any normal coordinate system around $x$.
\end{lem}

Although the proof of the lemma is beyond the scope of this paper, notice that one can indeed give explicit bounds on $r$ and $C$ in terms of the reach and injectivity radius of the submanifold $M$.

\subsubsection*{Acknowledgments} The authors are grateful to Pascal Massart for helpful discussions on Lepski's method and to Antonio Rieser for his careful reading and for pointing a technical bug in a preliminary version of this work. This work was supported by the ANR project TopData ANR-13-BS01-0008 and ERC Gudhi No. 339025

{\small
\bibliographystyle{alpha}