---
author:
- 'Sébastien Gadat, Sébastien Gerchinovitz, and Clément Marteau'
bibliography:
- 'references.bib'
title: Optimal functional supervised classification with separation condition
---

Introduction {#sec:intro}
============

The binary supervised classification problem is perhaps one of the most common tasks in statistics and machine learning. Even so, this problem still fosters new theoretical and applied questions because of the large variety of the data encountered so far. We refer the reader to [@DGL96] and [@BBG2005] and to the references therein for a comprehensive introduction to binary supervised classification. This problem unfolds as follows. The learner has access to $n$ independent copies $(X_1,Y_1),\ldots, (X_n,Y_n)$ of a pair $(X,Y)$, where $X$ lies in a measurable space $\mathcal{H}$ and $Y \in \{0,1\}$. The goal of the learner is to predict the label $Y$ after observing the new input $X$, with the help of the sample $\mathcal{S}_n := (X_i,Y_i)_{1 {\leqslant}i {\leqslant}n}$ to learn the unknown joint distribution ${\mathbb{P}}_{X,Y}$ of the pair $(X,Y)$.

In some standard situations, $X$ lies in the simplest possible Hilbert space: $\mathcal{H} = \mathbb{R}^d$, which corresponds to the finite-dimensional binary classification problem. This setting has been extensively studied so far. Popular classification procedures that are now theoretically well understood include the ERM method [@MT99; @AT07], the $k$-nearest neighbors algorithm [@G78; @chaudhuri; @BD2015; @GKM16], support vector machines [@Steinwart], or random forests [@BiauScornet], just to name a few.

However there are situations where the inputs $X_i$ and $X$ are better modelled as functions; the set $\mathcal{H}$ is then infinite-dimensional. Practical examples can be found, [e.g.]{}, in stochastic population dynamics [@L03], in signal processing [@C02], or in finance [@LL96]. This binary supervised functional classification problem was tackled with nonparametric procedures such as kernel methods or the $k$-nearest neighbours algorithm. For example, [@CoH67] studied the nearest neighbour rule in any metric space, while [@KP95] analyzed the performances of the $k$-nearest neighbours algorithm in terms of a metric covering measure. Such metric entropy arguments were also used in [@CG06], or with kernel methods in [@ABC03].\
[**Our functional model.**  ]{} In the present work, we focus on one of the most elementary diffusion classification model: we suppose that the input $X=(X(t))_{t \in [0,1]}$ is a continuous trajectory, solution to the stochastic differential equation $$\label{eq:model}
\forall t \in [0,1], \qquad 
dX(t) = Y f(t) dt + (1-Y)g(t) dt +  dW(t) \,,$$ where $(W(t))_{0 {\leqslant}t {\leqslant}1}$ is a standard Brownian motion, and where $Y$ is a Bernoulli $\mathcal{B}(1/2)$ random variable independent from $(W(t))_{0 {\leqslant}t {\leqslant}1}$. In particular, in the sample $\mathcal{S}_n$, trajectories $X_i$ labeled with $Y_i=1$ correspond to observations of the signal $f$, while trajectories $X_i$ labeled with $Y_i=0$ correspond to $g$.\
The white noise model has played a key role in statistical theoretical developments; see, [e.g.]{}, the seminal contributions of [@IH81] in nonparametric estimation and of [@L90] in adaptive nonparametric estimation. In our supervised classification setting, the goal is not to estimate $f$ and $g$ but to predict the value of $Y$ given an observed continuous trajectory $(X(t))_{0 {\leqslant}t {\leqslant}1}$. Of course, we assume that both functions $f$ and $g$ are unknown so that the joint distribution $\mathbb{P}_{X,Y}$ of the pair $((X(t))_{t\in[0,1]},Y)$ is unknown. Without any assumption on $f$ and $g$, there is no hope to solve this problem in general. However, learning the functions $f$ and $g$ (and thus $\mathbb{P}_{X,Y}$) from the sample $\mathcal{S}_n$ becomes statistically feasible when $f$ and $g$ are smooth enough.

The functional model considered in this paper is very close to the one studied by [@Cadre]. Actually our setting is less general since [@Cadre] considered more general diffusions driven by state-dependent drift terms $t \longmapsto f(t,X(t))$ and $t \longmapsto g(t,X(t))$. We focus on a simpler model, but derive refined risk bounds (with a different approach) that generalize the worst-case bounds of [@Cadre], as indicated below. [**Some notation.**  ]{} We introduce some notation and definitions in order to present our contributions below. In our setting, a *classifier* $\Phi$ is a measurable function, possibly depending on the sample $\mathcal{S}_n$, that maps each new input $X=(X(t))_{t\in[0,1]}$ to a label in $\{0,1\}$. The *risk* associated with each classifier $\Phi$ depends on $f$ and $g$ and is defined by: $$\mathcal{R}_{f,g}(\Phi) := {\mathbb{P}}(\Phi(X) \not = Y) \,,$$ where the expectation is taken with respect to all sources of randomness ([i.e.]{}, both the sample $\mathcal{S}_n$ and the pair $(X,Y)$). The goal of the learner is to construct a classifier ${\widehat}{\Phi}$ based on the sample $\mathcal{S}_n$ that mimics the *Bayes classifier* $$\Phi^\star = {\operatornamewithlimits{arg\,min}}_\Phi \mathcal{R}_{f,g}(\Phi) \,,
\label{eq:oracle}$$ where the infimum is taken over all possible classifiers (the oracle $\Phi^\star$ is impractical since $f$ and $g$ and thus $\mathbb{P}_{X,Y}$ are unknown). We measure the quality of ${\widehat}{\Phi}$ through its *worst-case excess risk* $$\label{eq:max}
 \sup_{(f,g) \in \mathcal{E}} \left\{\mathcal{R}_{f,g}(\Phi) - \inf_{\Phi} \mathcal{R}_{f,g}(\Phi)\right\}$$ over some set $\mathcal{E}$ of pairs of functions. In the sequel we focus on Sobolev classes ${\mathcal{H}_s}(R)$ (see ) and consider subsets $\mathcal{E} \subseteq \mathcal{H}_s(R)^2$ parametrized by a separation lower bound $\Delta$ on $\|f-g\|$.

[**Main contributions and outline of the paper.**  ]{} In Section \[s:model\] we first state preliminary results about the margin behavior that will prove crucial in our analysis. We then make three types of contributions:

-   In Section \[s:upper\] we design a classifier ${\widehat}\Phi_{d_n}$ based on a thresholding rule. We derive an excess risk bound that generalizes the worst-case results of [@Cadre] but also imply faster rates when the distance $\|f-g\|$ is large. This acceleration is a consequence of the nice properties of the margin (see also, [e.g.]{}, [@AT07] and [@GKM16]).

    The classifier ${\widehat}\Phi_{d_n}$ defined in  with $d_n \approx n^{\frac{1}{2s+1}}$ has an excess risk roughly bounded by (omitting logarithmic factors and constant factors depending only on $s$ and $R$): for $n {\geqslant}N_{R,s}$ large enough, $$\sup_{\substack{f,g \in {\mathcal{H}_s}(R) \\ \|f-g\| {\geqslant}\Delta}} \left\{ \mathcal{R}_{f,g}({\widehat}\Phi_{d_n}) - \inf_{\Phi} \mathcal{R}_{f,g}(\Phi)  \right\}  \lesssim \left\{\begin{array}{ll}
        n^{-\frac{s}{2s+1}} & \textrm{if } \Delta \lesssim n^{-\frac{s}{2s+1}} \\[0.2em]
        \displaystyle \frac{1}{\Delta} n^{-\frac{2s}{2s+1}} & \textrm{if } \Delta \gtrsim n^{-\frac{s}{2s+1}}
    \end{array}\right.$$

-   In Section \[s:minimaxfano\] we derive a matching minimax lower bound (up to logarithmic factors) showing that the above worst-case bound cannot be improved by any classifier.

    For any number $n {\geqslant}N_{R,s}$ of observations, any classifier ${\widehat}{\Phi}$ must satisfy (omitting again logarithmic factors and constant factors depending only on $s$ and $R$): $$\sup_{\substack{f,g \in {\mathcal{H}_s}(R) \\ \|f-g\| {\geqslant}\Delta}} \left\{ \mathcal{R}_{f,g}({\widehat}\Phi) - \inf_{\Phi} \mathcal{R}_{f,g}(\Phi)  \right\} \gtrsim \left\{\begin{array}{ll}
        n^{-\frac{s}{2s+1}} & \textrm{if } \Delta \lesssim n^{-\frac{s}{2s+1}} \\[0.2em]
        \displaystyle \frac{1}{\Delta} n^{-\frac{2s}{2s+1}} & \textrm{if } \Delta \gtrsim n^{-\frac{s}{2s+1}}
    \end{array}\right.$$

-   Finally, in Section \[s:knn\], we show that the well-known $k$-nearest neighbors rule tuned in a classical and optimal way (see, [e.g.]{}, [@S12; @GKM16]) is far from optimality in our specific functional setting.

    For any threshold (dimension) ${\widehat}{d} \in \mathbb{N}^*$ based on a sample-splitting policy, and for the optimal choice $k_n^{opt}({\widehat}{d})=\lfloor n^{4/(4+{\widehat}{d})}\rfloor$, the ${\widehat}{d}$-dimensional $k_n^{opt}({\widehat}{d})$-nearest neighbors classifier $\Phi_{\textrm{NN}}$ suffers a logarithmic excess risk in the worst case: $$\sup_{f,g \in {\mathcal{H}_s}(r)} \Bigl\{ \mathcal{R}_{f,g}(\Phi_{\textrm{NN}}) - \inf_{\Phi} \mathcal{R}_{f,g}(\Phi) \Bigr\} \gtrsim \log(n)^{-2s} \,.$$

 \
Most proofs are postponed to Appendix \[s:A\] (for the upper bounds) and to Appendix  \[s:minimaxlowerbound\] (for the lower bounds).\
[**Other useful notation.**  ]{} We denote the joint distribution of the pair $((X(t))_{t\in[0,1]},Y)$ by $\mathbb{P}_{X,Y}$, and write $\mathbb{P}_{\otimes^n} = P_{X,Y}^{\otimes n}$ for the joint distribution of the sample $(X_i,Y_i)_{1 {\leqslant}i {\leqslant}n}$. For notational convenience, the measure $\mathbb{P}$ will alternatively stand for $\mathbb{P} = \mathbb{P}_{X,Y} \times \mathbb{P}_{\otimes^n}$ (we integrate over both the sample $\mathcal{S}_n$ and the pair $(X,Y)$) or for any other measure made clear by the context. The distribution of $(X(t))_{t\in[0,1]}$ will be denoted by $\mathbb{P}_X$, while the distribution of $(X(t))_{t\in[0,1]}$ *conditionally* on the event $\lbrace Y=1 \rbrace$ (resp. $\lbrace Y=0 \rbrace$) will be written as $\mathbb{P}_f$ (resp. $\mathbb{P}_g$).

We write ${\mathbb{L}^2}([0,1])$ for the set of square Lebesgue-integrable functions $f$ on $[0,1]$, with ${\mathbb{L}^2}$-norm $\|f\| = \bigl(\int_{0}^1 f^2(t) d t\bigr)^{1/2}$ and inner product $\langle f,g \rangle = \int_{0}^1 f(t) g(t) d t$. With a slight abuse of notation, when $X$ is a solution of  and $\varphi \in {\mathbb{L}^2}([0,1])$, we set $\langle \varphi,X \rangle = \int_{0}^1 \varphi(t) dX(t)$.

Finally we write $\operatorname{Ber}(p)$ or simply $\mathcal{B}(p)$ for the Bernoulli distribution of parameter $p \in [0,1]$, as well as $\mathcal{B}(n,p)$ for the binomial distribution with parameters $n \in {\mathbb{N}}^*$ and $p \in [0,1]$. We also set $x \wedge y = \min\{x,y\}$ for all $x,y \in {\mathbb{R}}$.

Preliminary results {#s:model}
===================

Bayes classifier {#sec:BayesRule}
----------------

We start by deriving an explicit expression for the optimal classifier $\Phi^\star$ introduced in (\[eq:oracle\]). This optimal classifier is known as *the Bayes classifier* of the classification problem (see, [e.g.]{}, [@G78; @DGL96]).

Let $\mathbb{P}_0$ denote the Wiener measure on the set of continuous functions on $[0,1]$. It is easy to check that the law of $X \vert Y$ is absolutely continuous with respect to $\mathbb{P}_0$ (see, [e.g.]{}, [@IW_1989]). Indeed, for any continuous trajectory $X$, the Girsanov formula implies that the density of ${\mathbb{P}}_f$ ([i.e.]{}, of $X|\{Y=1\}$) with respect to the reference measure $\mathbb{P}_0$ is given by $$q_f(X) := 
\frac{d \mathbb{P}_f}{d \mathbb{P}_0}(X) = \exp \left(\int_{0}^1 f(s) dX_s - \frac{1}{2}\|f\|^2 \right) \,.
\label{eq:qf}$$ Similarly, the density of ${\mathbb{P}}_g$ ([i.e.]{}, of $X|\{Y=0\}$) with respect to $\mathbb{P}_0$ is $$q_g(X) := \frac{d \mathbb{P}_g}{d \mathbb{P}_0}(X) = \exp \left(\int_{0}^1 g(s) dX_s - \frac{1}{2}\|g\|^2 \right) \,.
\label{eq:qg}$$ In the sequel we refer to $q_f$ and $q_g$ as the likelihood ratios of the models ${\mathbb{P}}_f$ and ${\mathbb{P}}_g$ versus ${\mathbb{P}}_0$. Now, using the Bayes formula, we can easily see that the regression function $\eta$ associated with (\[eq:model\]) is given by $$\begin{aligned}
\eta(X) &:=& \mathbb{E}[Y \vert X] = {\mathbb{P}}(Y=1 \vert X) \nonumber \\
&= &\frac{\frac{d {\mathbb{P}}_f}{d {\mathbb{P}}_0}(X)}{ \frac{d {\mathbb{P}}_f}{d {\mathbb{P}}_0}(X)+\frac{d {\mathbb{P}}_g}{d {\mathbb{P}}_0}(X)} \nonumber \\
& = & \frac{\exp\left(\int_{0}^1 (f(s)-g(s)) dX_s - \frac{1}{2}\|f\|^2 + \frac{1}{2}\|g\|^2\right)}{1+\exp\left(\int_{0}^1 (f(s)-g(s)) dX_s - \frac{1}{2}\|f\|^2 + \frac{1}{2}\|g\|^2\right)} \;.
\label{eq:eta}\end{aligned}$$ As an example, if we assume that we observe $dX(t)=f(t) dt$ with $X(0)=0$, then $\eta(X) = \frac{\exp \left( \frac{1}{2} \|f-g\|^2 \right)}{1+\exp \left( \frac{1}{2} \|f-g\|^2 \right)}$, which is larger than or equal to $1/2$ and gets closer to $1$ when $\|f-g\|$ increases. Roughly speaking, this means in that example that the distribution $\mathbb{P}_f$ is more likely than the distribution $\mathbb{P}_g$, which is consistent with the definition of the model given by .

 \
The Bayes classifier $\Phi^\star$ of the classification problem is then given by $$\label{eq:bayes_rule}
\Phi^{\star}(X) := 
\mathds{1}_{\left\lbrace \eta(X){\geqslant}\frac12 \right\rbrace} =
\mathds{1}_{\left\lbrace \int_{0}^1 (f(s)-g(s)) dX_s {\geqslant}\frac{1}{2}\|f\|^2 - \frac{1}{2}\|g\|^2  \right\rbrace} \;.$$ It is well known that the Bayes classifier $\Phi^{\star}$ corresponds to the optimal classifier of the considered binary classification problem (see, [e.g.]{}, [@DGL96]) in the sense that it satisfies . In particular, for any other classifier $\Phi$, the excess risk of classification is given by $$\label{eq:excess_risk}
\mathcal{R}_{f,g}(\Phi)-\mathcal{R}_{f,g}(\Phi^{\star}) = \mathbb{E} \left[ \left|2 \eta(X)-1\right| \mathds{1}_{\Phi(X) \neq \Phi^{\star}(X)}\right] \,.$$

In our statistical setting, the functions $f$ and $g$ are unknown so that it is impossible to compute the oracle Bayes classifier . However, we can construct an approximation of it using the sample $(X_i,Y_i)_{1 {\leqslant}i {\leqslant}n}$. In Section \[s:upper\] we design a plug-in estimator combined with a projection step, and analyze its excess risk under a smoothness assumption on $f$ and $g$. The next result on the margin will be a key ingredient of our analysis.

Control of the margin in the functional model {#s:margin}
---------------------------------------------

As was shown in earlier works on binary supervised classification (see, [e.g.]{}, [@MT99] or [@AT07]), the probability mass of the region where the regression function $\eta$ is close to $1/2$ plays an important role in the convergence rates. The behaviour of the function $\eta$ is classically described by a so-called *margin assumption*: there exist $\alpha {\geqslant}0$ and ${\varepsilon}_0,C > 0$ such that, for all $0 < {\varepsilon}{\leqslant}{\varepsilon}_0$, $${\mathbb{P}}_{X} \left( \left| \eta(X) - \frac{1}{2} \right| {\leqslant}{\varepsilon}\right) {\leqslant}C {\varepsilon}^\alpha \,.
\label{eq:marginassumption}$$  \
We will show in Proposition \[thm:margin\] which parameters $\alpha,{\varepsilon}_0,C > 0$ are associated with Model (\[eq:model\]). The role of  is easy to understand: classifying a trajectory $X$ for which $\eta(X)$ is close to $1/2$ is necessarily a challenging problem because the events $\{Y=1\}$ and $\{Y=0\}$ are almost equally likely. This not only makes the optimal (Bayes) classifier $\mathds{1}_{\eta(X){\geqslant}1/2}$ error-prone, but it also makes the task of mimicking the Bayes classifier difficult. Indeed, any slightly bad approximation of $\eta$ when $\eta(X) \simeq 1/2$ can easily lead to a prediction different from $\mathds{1}_{\eta(X){\geqslant}1/2}$. A large value of the margin parameter $\alpha$ indicates that most trajectories $X$ are such that $\eta(X)$ is far from $1/2$: this makes in a sense the classification problem easier.\
Our first contribution, detailed in Proposition \[thm:margin\] below, entails that the margin parameter associated with Model (\[eq:model\]) crucially depends on the distance between the functions $f$ and $g$ of interest. The proof is postponed to Appendix \[s:pmargin\].\

\[thm:margin\] Let $X$ be distributed according to Model (\[eq:model\]), and set $\Delta := \| f-g \|$. Then, for all $ 0 < {\varepsilon}{\leqslant}1/8$, we have $${\mathbb{P}}_{X} \left( \left| \eta(X) - \frac{1}{2} \right| {\leqslant}{\varepsilon}\right) {\leqslant}1 \wedge \frac{10 {\varepsilon}}{\Delta} \,.$$

In particular, if the distance $\| f-g \|$ is bounded from below by a positive constant, then  is satisfied with a margin parameter $\alpha=1$. If, instead, $\|f-g\|$ is allowed to be arbitrarily small, then nothing can be guaranteed about the margin parameter (except the obvious value $\alpha=0$ that always works).

Upper bounds on the excess risk {#s:upper}
===============================

In this section we construct a classifier with nearly optimal excess risk. We detail its construction in Section \[sec:pluginFinitedim\] and analyze its approximation and estimation errors in Sections \[sec:trunc\] and \[sec:estimationerror\]. Our main result, Theorem \[prop:minmax\], is stated in Section \[subsection:upper\_bound\]. Nearly matching lower bounds will be provided in Section \[s:lower\].

A classifier in a finite-dimensional setting {#sec:pluginFinitedim}
--------------------------------------------

Our classifier—defined in Section \[sec:defclassifier\] below—involves a projection step with coefficients $\theta_j$ and $\mu_j$ introduced in Section \[sec:HilbertWhitenoise\] and estimated in Section \[sec:estimatethetamu\].

### ${\mathbb{L}^2}$ orthonormal basis $(\varphi_j)_{j {\geqslant}1}$ and white noise model {#sec:HilbertWhitenoise}

*Orthonormal basis.* Let $(\varphi_j)_{j \in \mathbb{N}^*}$ be any orthonormal basis of ${\mathbb{L}^2}([0,1])$, and $d \in \mathbb{N}^*$ be some dimension that will be chosen as a function of the size $n$ of the sample (for projection purposes). In the sequel, the coefficients $(c_j(h))_{j {\geqslant}1}$ of any function $h \in {\mathbb{L}^2}([0,1])$ w.r.t. the basis $(\varphi_j)_{j {\geqslant}1}$ are defined by $$c_j(h) := \langle \varphi_j, h \rangle = \int_{0}^{1} h(s) \varphi_j(s) ds \,, \qquad j {\geqslant}1 \,,$$ and its ${\mathbb{L}^2}$-projection onto $\mathrm{Span}\left(  \varphi_j , \ 1 {\leqslant}j {\leqslant}d  \right)$ is given by $$\label{eq:defPid}
\Pi_d(h) = \sum_{j=1}^d c_j(h) \varphi_j \,.$$ In particular, we will pay a specific attention to the coefficients of $f$ and $g$ involved in , $$\label{eq:defckfckg}
\forall j {\geqslant}1, \qquad 
\theta_j := c_j(f) \qquad \text{and} \qquad \mu_j:= c_j(g) \,,$$ and to their $d$-dimensional projections $f_d := \Pi_d(f) = \sum_{j=1}^d \theta_j \varphi_j$ and $g_d:=\Pi_d(g) = \sum_{j=1}^d \mu_j \varphi_j$.

 \
*White noise model.* We now make a few comments on the white noise model considered in  (see also [@IH81] for further details and its link with the infinite Gaussian sequence model). First note that, for all $\varphi \in {\mathbb{L}^2}([0,1])$, almost surely, $$\int_{0}^1 \varphi(t) dX(t) = 
Y \int_{0}^1 f(t) \varphi(t) dt + (1-Y) \int_{0}^1 g(t) \varphi(t) dt + \int_{0}^1 \varphi(t) dW(t) \,.$$ Recall that, with a slight abuse of notation, we write $\langle \varphi,X \rangle := \int_{0}^1 \varphi(t) dX(t)$. The above almost sure equality implies that the conditional distribution of $\langle \varphi,X \rangle$ given $Y$ is Gaussian with expectation $\langle \varphi,f \rangle \mathds{1}_{Y=1} + \langle \varphi,g \rangle \mathds{1}_{Y=0}$ and variance $\|\varphi\|^2$. Therefore, the distribution of $\langle \varphi , X\rangle$ is a mixture of two Gaussian distributions: $$\frac{1}{2} \mathcal{N}\Bigl(\langle \varphi,f\rangle,\|\varphi\|^2\Bigr) + \frac{1}{2} \mathcal{N}\Bigl(\langle\varphi,g\rangle,\|\varphi\|^2\Bigr) \,.$$

 \
An important feature of the white noise model is that the coefficients $\bigl(\langle \varphi_j,W \rangle\bigr)_{j {\geqslant}1}$ associated with different frequencies of the standard Brownian motion are independent. This is because they are jointly Gaussian, with a diagonal infinite covariance matrix: $$\forall j \neq j',  \qquad \mathbb{E} \Big[\langle \varphi_j,W \rangle \langle \varphi_{j'},W \rangle\Big] = \int_{0}^1 \varphi_j(t) \varphi_{j'}(t) d t = 0 \,.$$ The above remarks imply together with  that $$\label{eq:Gaussiancoeffs}
\forall j {\geqslant}1, \qquad \mathcal{L}\left( \langle \varphi_j,X \rangle|Y=1\right) = \mathcal{N}(\theta_j,1) \qquad \text{and} \qquad  \mathcal{L}\left(\langle \varphi_j,X \rangle|Y=0\right) =  \mathcal{N}(\mu_j,1) \,,$$ and that the coefficients $\bigl(\langle \varphi_j,X \rangle\bigr)_{j {\geqslant}1}$ are conditionally independent given $Y$.

### Estimation of $(\theta_j)_{1 {\leqslant}j {\leqslant}d}$ and $(\mu_j)_{1 {\leqslant}j {\leqslant}d}$ {#sec:estimatethetamu}

In order to estimate the $\theta_j$ and $\mu_j$, we split the sample $(X_i,Y_i)_{1 {\leqslant}i {\leqslant}n}$ into two subsamples corresponding to either $Y_i=0$ or $Y_i=1$. More formally, we define the two subsamples $(X^0_i)_{1 {\leqslant}i {\leqslant}N_0}$ and $(X^1_i)_{1 {\leqslant}i {\leqslant}N_1}$ (one of which can be empty) by $$\left\{\begin{array}{l}
    X^0_i := X_{\tau^0_i} \,, \quad 1 {\leqslant}i {\leqslant}N_0 \\
    X^1_i := X_{\tau^1_i} \,, \quad 1 {\leqslant}i {\leqslant}N_1
\end{array}\right.$$ where $$\label{eq:defN0N1}
 N_0 := \sum_{i=1}^n \mathds{1}_{\lbrace Y_i = 0\rbrace} \quad \mathrm{and} \quad N_1 := \sum_{i=1}^n \mathds{1}_{\lbrace Y_i = 1\rbrace} \,,$$ and where $\tau^k_i$ is the index $t \in \{1,\ldots,n\}$ such that $Y_t = k$ for the $i$-th time, [i.e.]{}, for all $k \in \{0,1\}$ and $i \in \{1,\ldots,N_k\}$, $$\tau^k_i := \min \left\{t \in \{1,\ldots,n\} : \; \sum_{t'=1}^t \mathds{1}_{\{Y_{t'}=k\}} {\geqslant}i \right\} \,.$$ The sizes $N_0$ and $N_1$ are random variables; they satisfy $N_0 + N_1 = n$ and both have a binomial distribution $\mathcal{B}(n,1/2)$. In particular, both subsamples have (with high probability) approximately the same sizes.

 \
Note from  that the two subsamples $(X^0_i)_{1 {\leqslant}i {\leqslant}N_0}$ and $(X^1_i)_{1 {\leqslant}i {\leqslant}N_1}$ correspond to observations of the functions $g$ and $f$ respectively. Following our comments from Section \[sec:HilbertWhitenoise\], it is natural to define the random coefficients $(X_{i,j}^0)_{\substack{1 {\leqslant}i {\leqslant}N_0\\ 1 {\leqslant}j {\leqslant}d}}$ and $(X_{i,j}^1)_{\substack{1 {\leqslant}i {\leqslant}N_1\\ 1 {\leqslant}j {\leqslant}d}}$ by $$\label{eq:defX0X1}
\left\lbrace  
\begin{array}{l}
X_{i,j}^0 := \langle \varphi_j, X_i^0 \rangle  = \mu_j + {\varepsilon}_{i,j}^0 \,, \quad i=1\dots N_0 \,, \\
X_{i,j}^1 := \langle \varphi_j, X_i^1 \rangle = \theta_j + {\varepsilon}_{i,j}^1 \,, \quad i=1\dots N_1 \,,
\end{array}
\right.   \quad j\in \lbrace 1,\dots, d \rbrace ,$$ where the dimension $d \in \mathbb{N}^*$ will be determined later (as a function of $n$), and where $${\varepsilon}_{i,j}^k = \int_{0}^1 \varphi_{j}(t) dW_{\tau^k_i}(t) \,.$$ By independence of the random variables $Y_1,W_1,\ldots,Y_n,W_n$ used to generate the sample $(X_i,Y_i)_{1 {\leqslant}i {\leqslant}n}$ according to , and by the comments made in Section \[sec:HilbertWhitenoise\], we have the following conditional independence property for the ${\varepsilon}_{i,j}^k$.

\[rmk:conditionallyGaussian\] Conditionally on $(Y_1,\ldots,Y_n)$, the $n d$ random variables (or any $(Y_1,\ldots,Y_n)$-measurable permutation of them) $$\begin{array}{l}
{\varepsilon}^0_{1,1},\ldots,{\varepsilon}^0_{1,d},{\varepsilon}^0_{2,1},\ldots,{\varepsilon}^0_{2,d},\ldots,{\varepsilon}^0_{N_0,1},\ldots,{\varepsilon}^0_{N_0,d}, \\
{\varepsilon}^1_{1,1},\ldots,{\varepsilon}^1_{1,d},{\varepsilon}^1_{2,1},\ldots,{\varepsilon}^1_{2,d},\ldots,{\varepsilon}^1_{N_1,1},\ldots,{\varepsilon}^1_{N_1,d}
\end{array}$$ are i.i.d. ${\mathcal{N}}(0,1)$. As a consequence, on the event $\{N_0>0\} \cap \{N_1>0\}$, the random variables $N_k^{-1/2} \sum_{i=1}^{N_k} {\varepsilon}^k_{i,j}$, $1 {\leqslant}j {\leqslant}d$, $k \in \{0,1\}$, are i.i.d. ${\mathcal{N}}(0,1)$ conditionally on $(Y_1,\ldots,Y_n)$.

 \
For every $j\in \lbrace 1, \dots, d \rbrace$, we use the coefficients defined in to estimate the coefficients $\mu_j$ and $\theta_j$ by $$\label{eq:defhatthethamu}
{\widehat}\mu_j = \mathds{1}_{\{N_0>0\}}\frac{1}{N_0} \sum_{i=1}^{N_0} X_{i,j}^0  \quad \mathrm{and} \quad {\widehat}\theta_j = \mathds{1}_{\{N_1>0\}} \frac{1}{N_1} \sum_{i=1}^{N_1} X_{i,j}^1 \,.$$ Note that we arbitrarily impose the value $0$ for ${\widehat}{\mu}_j$ when $N_0=0$ or for ${\widehat}{\theta}_j$ when $N_1=0$. This convention has a negligible impact, since with high probability $N_0$ and $N_1$ are both positive.

### A simple classifier {#sec:defclassifier}

We now build a simple classifier using the estimators ${\widehat}{\mu}_j$ and ${\widehat}{\theta}_j$ defined in . After observing a new trajectory $X = (X(t))_{0 {\leqslant}t {\leqslant}1}$, we construct the vector $\mathbf{X}_d \in {\mathbb{R}}^d$ defined by $$\mathbf{X}_d := \Bigl(\langle \varphi_1, X \rangle, \ldots, \langle \varphi_d, X \rangle\Bigr) \,.$$ Then, we assign the label $1$ to the trajectory $X$ if $\mathbf{X}_d$ is closer to ${\widehat}{\theta} := ({\widehat}\theta_1,\dots,{\widehat}\theta_d)$ than to ${\widehat}{\mu}:=({\widehat}\mu_1,\dots,{\widehat}\mu_d)$, and the label $0$ otherwise. More formally, our classifier ${\widehat}\Phi_d$ is defined for all trajectories $X$ by $${\widehat}\Phi_d(X) = \left\lbrace
\begin{array}{lcr}
1 & \mathrm{if} &  \| \mathbf{X}_d - {\widehat}\theta \|_d {\leqslant}\| \mathbf{X}_d- {\widehat}\mu \|_d  \\
0 & \mathrm{if} & \| \mathbf{X}_d - {\widehat}\theta \|_d > \| \mathbf{X}_d- {\widehat}\mu \|_d 
\end{array}
\right.  ,
\label{eq:classif}$$ where $\| x \|_d = \sqrt{\sum_{j=1}^d x_j^2}$ denotes the Euclidean norm in $\mathbb{R}^d$; we also write $\langle x, y \rangle_d = \sum_{j=1}^d x_j y_j$ for the associated inner product.

[**Reinterpretation as a plug-in classifier**  ]{} We now explain why ${\widehat}\Phi_d$ can be reinterpreted as a plug-in classifier in a truncated space. Recall the expression  for the regression function $\eta$. It is thus natural to consider the ’truncated’ regression function $\eta_d$ by replacing $f$ and $g$ with their projections $\Pi_d(f) = \sum_{j=1}^d \theta_j \varphi_j$ and $\Pi_d(g) = \sum_{j=1}^d \mu_j \varphi_j$, [i.e.]{}, $$\begin{aligned}
\eta_d(X) & := \frac{\exp\left(\int_{0}^1 (\Pi_d(f)(s)-\Pi_d(g)(s)) dX_s - \frac{1}{2}\|\Pi_d(f)\|^2 + \frac{1}{2}\|\Pi_d(g)\|^2\right)}{1+\exp\left(\int_{0}^1 (\Pi_d(f)(s)-\Pi_d(g)(s)) dX_s - \frac{1}{2}\|\Pi_d(f)\|^2 + \frac{1}{2}\|\Pi_d(g)\|^2\right)} \label{eq:eta_d} \\
& = \frac{\exp\left( \langle {\boldsymbol{\theta}}_d - {\boldsymbol{\mu}}_d , {\mathbf{X}}_d \rangle_d -\frac{1}{2}\|{\boldsymbol{\theta}}_d\|_d^2 + \frac{1}{2}\|{\boldsymbol{\mu}}_d\|_d^2 \right)}{1+\exp\left( \langle {\boldsymbol{\theta}}_d - {\boldsymbol{\mu}}_d, {\mathbf{X}}_d \rangle_d -\frac{1}{2}\|{\boldsymbol{\theta}}_d\|_d^2 + \frac{1}{2}\|{\boldsymbol{\mu}}_d\|_d^2 \right)} \nonumber \,,\end{aligned}$$ where ${\boldsymbol{\theta}}_d := (\theta_j)_{1 {\leqslant}j {\leqslant}d}$, and ${\boldsymbol{\mu}}_d := (\mu_j)_{1 {\leqslant}j {\leqslant}d}$. We also define the associated oracle classifier (that still depends on the unknown functions $f$ and $g$): $$\label{eq:bayes_rule_d}
\Phi_d^{\star}(X) := 
\mathds{1}_{\left\lbrace \eta_d(X){\geqslant}\frac12 \right\rbrace} = \mathds{1}_{\left\lbrace 
\int_{0}^1 (\Pi_d(f)(s)-\Pi_d(g)(s)) dX_s {\geqslant}\frac{1}{2}\|\Pi_d(f)\|^2 - \frac{1}{2}\|\Pi_d(g)\|^2 \right\rbrace} \,.$$ As shown in Remark \[rmk:truncatedSpace\] (see Section \[sec:estimationerror\] below), $\eta_d$ and $\Phi_d^{\star}$ correspond to the regression function and the Bayes classifier of the restricted classification problem where the learner has only access to the projected input ${\mathbf{X}}_d \in {\mathbb{R}}^d$, rather than the whole trajectory $X$.\
We are now ready to reinterpret ${\widehat}\Phi_d$ as a plug-in classifier. Note that $$\begin{aligned}
\| \mathbf{X}_d - {\widehat}\theta \|_d {\leqslant}\| \mathbf{X}_d- {\widehat}\mu \|_d, 
& \Longleftrightarrow & \frac{\exp\left( \frac{1}{2} \lbrace\| \mathbf{X}_d - {\widehat}\mu \|_d^2 - \| \mathbf{X}_d- {\widehat}\theta \|_d^2 \rbrace \right)}{1+\exp\left( \frac{1}{2} \lbrace\| \mathbf{X}_d - {\widehat}\mu \|_d^2 - \| \mathbf{X}_d- {\widehat}\theta \|_d^2 \rbrace\right)} {\geqslant}\frac{1}{2} \;, \\
& \Longleftrightarrow & {\widehat}\eta_d(X)  {\geqslant}\frac{1}{2} \;,\end{aligned}$$ where the estimated regression function ${\widehat}{\eta}_d$ is defined by $$\label{eq:etadestim}
{\widehat}\eta_d(X):= \frac{\exp\left( \langle {\widehat}\theta - {\widehat}\mu , {\mathbf{X}}_d \rangle_d -\frac{1}{2}\|{\widehat}\theta\|_d^2 + \frac{1}{2}\|{\widehat}\mu\|_d^2 \right)}{1+\exp\left( \langle {\widehat}\theta - {\widehat}\mu, {\mathbf{X}}_d \rangle_d -\frac{1}{2}\|{\widehat}\theta\|_d^2 + \frac{1}{2}\|{\widehat}\mu\|_d^2 \right)} \;.$$ In other words, our classifier ${\widehat}\Phi_d$ can be rewritten as ${\widehat}\Phi_d(X) = \mathds{1}_{\lbrace {\widehat}\eta_d(X) {\geqslant}1/2  \rbrace}$ where ${\widehat}\eta_d$ is an estimator of the ’truncated’ regression function $\eta_d$ introduced in .

[**Proof strategy.**  ]{} In the next sections we upper bound the excess risk of ${\widehat}\Phi_d$. We use the following classical decomposition (all quantities below are defined in Section \[sec:intro\], , and ): $$\mathcal{R}_{f,g}({\widehat}{\Phi}_{d}) - \mathcal{R}_{f,g}(\Phi^\star) = \underbrace{\mathcal{R}_{f,g}({\widehat}{\Phi}_{d}) - \mathcal{R}_{f,g}(\Phi_d^{\star})}_{\textrm{estimation error}} +
\underbrace{\mathcal{R}_{f,g}(\Phi_d^{\star}) - \mathcal{R}_{f,g}(\Phi^\star)}_{\textrm{approximation error}} \,.$$ The first term of the right-hand side (estimation error) measures how close ${\widehat}{\Phi}_{d}$ is to the oracle $\Phi_d^{\star}$ in the trunctated space; we analyse it in Section \[sec:estimationerror\] below. The second term (approximation error) quantifies the statistical loss induced by the $d$-dimensional projection; we study it in Section \[sec:trunc\].

Approximation error {#sec:trunc}
-------------------

We first upper bound the approximation error $\mathcal{R}_{f,g}(\Phi_d^{\star}) - \mathcal{R}_{f,g}(\Phi^\star)$, where the two oracle classifiers $\Phi_d^{\star}$ and $\Phi^\star$ are defined by  and  respectively. Comparing the definitions of $\eta$ and $\eta_d$ in  and , we can expect that, for $d$ large enough, $\Pi_d(f) \approx f$ and $\Pi_d(g) \approx g$, so that $\eta_d(X) \approx \eta(X)$ and therefore $\mathcal{R}_{f,g}(\Phi_d^\star) \approx \mathcal{R}_{f,g}(\Phi^\star)$.

Lemma \[prop:CO\] below quantifies this approximation. The proof is postponed to Appendix \[s:pCO\]. We recall that, for notational convenience, we write $f_d=\Pi_d(f)$ and $g_d=\Pi_d(g)$.

\[prop:CO\] Let $X$ be distributed according to Model (\[eq:model\]), and recall that $\Delta := \|f-g\|$. Let $0<{\varepsilon}{\leqslant}1/8$ and $d\in \mathbb{N}^\star$ such that $$\max \left( \| f-f_d\|^2,\| g-g_d \|^2   \right) {\leqslant}\frac{{\varepsilon}^2}{512 \ln(1/{\varepsilon}^2)}\,.
\label{eq:lemma1conditioneps}$$ Then, the two oracle classifiers $\Phi_d^\star$ and $\Phi^\star$ defined by  and  satisfy $$\mathcal{R}_{f,g}(\Phi_d^\star) - \mathcal{R}_{f,g}(\Phi^\star) {\leqslant}12 {\varepsilon}^2 + 2 {\varepsilon}\left( 1 \wedge \frac{10{\varepsilon}}{\Delta} \right) \,.$$

We stress that the distance $\Delta$ between $f$ and $g$ has a strong influence on the approximation error. In particular, if $\Delta$ is bounded from below independently from $n$, then the approximation error is at most of the order of ${\varepsilon}^2$, while it can only be controlled by ${\varepsilon}$ if $\Delta \lesssim {\varepsilon}$. This key role of $\Delta$ is a consequence of the margin behavior analyzed in Proposition \[thm:margin\] (Section \[s:margin\]) and will also appear in the estimation error.

[**A smoothness assumption.**  ]{} When $d \in {\mathbb{N}}^*$ is fixed, we can minimize the bound of Lemma \[prop:CO\] in ${\varepsilon}$. Unsurprisingly the resulting bound involves the distances $ \| f-f_d\|$ and $\| g-g_d \| $ of $f$ and $g$ to their projections $f_d$ and $g_d$. In the sequel, we assume that the functions $f$ and $g$ are smooth in that their (Fourier) coefficients w.r.t. the basis $(\varphi_j)_{j {\geqslant}1}$ decay sufficiently fast. More precisely, we assume that, for some parameters $s,R>0$, the functions $f$ and $g$ belong to the set $$\label{def:Hs}
{\mathcal{H}_s}(R) := \left\{h \in {\mathbb{L}^2}([0,1]) : \; \sum_{j=1}^{+\infty} c_j(h)^2 j^{2s} {\leqslant}R^2 \right\} \,.$$ The set ${\mathcal{H}_s}(R)$ corresponds to a class of smooth functions with smoothness parameter $s$: when $s=0$, we simply obtain the ${\mathbb{L}^2}([0,1])$-ball of radius $R$. For larger $s$, for example $s=1$, we obtain a smaller Sobolev space of functions such that $f' \in {\mathbb{L}^2}([0,1])$ with $\|f'\|_2 {\leqslant}R$.

 \
Under the above assumption on the tail of the spectrum of $f$ and $g$, the loss of accuracy induced by the projection step is easy to quantify. Indeed, for all $f \in {\mathcal{H}_s}(R)$ we have $$\|f-f_{d}\|^2 = \sum_{j=d+1}^{+\infty} c_j(f)^2 {\leqslant}d^{-2s} \sum_{j=d+1}^{+\infty} c_j(f)^2 j^{2s} {\leqslant}R^2 d^{-2s} \,,$$ so that, omitting logarithmic factors, ${\varepsilon}$ can be chosen of the order of $R d^{-s}$ in the statement of Lemma \[prop:CO\].

Estimation error {#sec:estimationerror}
----------------

We now upper bound the estimation error $\mathcal{R}_{f,g}({\widehat}{\Phi}_{d}) - \mathcal{R}_{f,g}(\Phi_d^{\star})$ of our classifier ${\widehat}\Phi_d$. To that end, we first reinterpret $\eta_d$ and $\Phi_d^{\star}$; this will be useful to rewrite the estimation error as an excess risk (as in ) in the truncated space. The next remark follows from direct calculations.

\[rmk:truncatedSpace\] Denote by ${\mathbf{X}}_d := \bigl(\langle\varphi_j,X\rangle\bigr)_{1 {\leqslant}j {\leqslant}d}$, ${\boldsymbol{\theta}}_d = (\theta_j)_{1 {\leqslant}j {\leqslant}d}$, and ${\boldsymbol{\mu}}_d = (\mu_j)_{1 {\leqslant}j {\leqslant}d}$ the versions of $X$, $\theta$, and $\mu$ in the truncated space. Then, $$\eta_d(X) = \frac{\frac{1}{2} q_{f_d}(X)}{\frac{1}{2} q_{f_d}(X) + \frac{1}{2} q_{g_d}(X)} \qquad \textrm{and} \qquad q_{f_d}(X) = e^{\frac{1}{2} \|{\mathbf{X}}_d\|^2} e^{-\frac{1}{2}\|{\mathbf{X}}_d-{\boldsymbol{\theta}}_d\|^2} \;.$$ Since the conditional distribution of ${\mathbf{X}}_d$ is ${\mathcal{N}}({\boldsymbol{\theta}}_d,I_d)$ given $Y=1$ and ${\mathcal{N}}({\boldsymbol{\mu}}_d,I_d)$ given $Y=0$, this entails that $\eta_d(X) = {\mathbb{P}}(Y=1|{\mathbf{X}}_d)$ almost surely.

In other words, $\eta_d$ is the regression function of the restricted classification problem where the learner has only access to the projected trajectory ${\mathbf{X}}_d \in {\mathbb{R}}^d$, instead of the whole trajectory $X$. The function $\Phi^*_d = \mathds{1}_{\{\eta_d {\geqslant}1/2\}}$ is the associated Bayes classifier.

 \
We are now ready to compare the risk of our classifier ${\widehat}\Phi_d$ to that of the $d$-dimensional oracle $\Phi_d^\star$. The proof of the next lemma is postponed to Appendix \[s:pproj\]. (The value of $4608$ could most probably be improved.) We recall that $f_d=\Pi_d(f)$ and $g_d=\Pi_d(g)$.

\[lem:proj\] We consider Model (\[eq:model\]). Let $d\in \mathbb{N}^*$ and set $\Delta_d := \| f_d - g_d \|$. Let $0 < {\varepsilon}{\leqslant}1/8$ and $n {\geqslant}27$ such that $$\left(\Delta_d + 2 \sqrt{\frac{d\log(n)}{n}} \, \right) \sqrt{\frac{d\log(n)}{n}} {\leqslant}\frac{{\varepsilon}}{48} \;.
\label{eq:lemma2conditioneps}$$ Then, the classifiers ${\widehat}\Phi_d$ and $\Phi_d^\star$ defined by  and  satisfy $$\mathcal{R}_{f,g}({\widehat}\Phi_d) - \mathcal{R}_{f,g}(\Phi_d^\star) {\leqslant}2 {\varepsilon}\left( 1\wedge \frac{10 {\varepsilon}}{\Delta_d}  \right) + 6 \exp \left(  - \frac{n {\varepsilon}^2}{4608 \, d \log n } \right) + \frac{13}{n} \;.$$

In the same vein as for the approximation error, the estimation error bound above strongly depends on the distance between the two functions $f_d$ and $g_d$ of interest. This is again a consequence of the margin behavior analyzed in Proposition \[thm:margin\] (Section \[s:margin\]).

More precisely, when ${\varepsilon}$ is chosen at least of the order of $\sqrt{d/n} \log(n)$ (in order to kill the exponential term), the estimation error bound above is roughly of the order of $\min\bigl\{{\varepsilon}, {\varepsilon}^2/\Delta_d\bigr\}$. In particular, if $\Delta_d$ is bounded from below, then the estimation error is at most of the order of ${\varepsilon}^2 \approx d \log^2(n)/n$. On the other hand, if no lower bound is available for $\Delta_d$, then the only estimation error bound we get is a slower rate of the order of ${\varepsilon}\approx \sqrt{d/n} \log(n)$.

Convergence rate under a smoothness assumption {#subsection:upper_bound}
----------------------------------------------

We now state the main result of this paper. We upper bound the excess risk $\mathcal{R}_{f,g}({\widehat}\Phi_d) - \mathcal{R}_{f,g}(\Phi^\star)$ of our classifier when $f$ and $g$ belong to subsets of the Sobolev ball ${\mathcal{H}_s}(R)$ defined in . These subsets are parametrized by a separation distance $\Delta$: a larger value of $\Delta$ makes the classification problem easier, as reflected by the non-increasing bound below.

\[prop:minmax\] There exist an absolute constant $c>0$ and a constant $N_{s,R} {\geqslant}86$ depending only on $s$ and $R$ such that the following holds true. For all $s,R > 0$ and all $n {\geqslant}N_{s,R}$, the classifier ${\widehat}\Phi_{d_n}$ defined by  with $d_n = \lfloor (R^2 n)^{\frac{1}{2s+1}} \rfloor $ satisfies $$\sup_{\substack{f,g \in {\mathcal{H}_s}(R) \\ \|f-g\| {\geqslant}\Delta}} \left\{ \mathcal{R}_{f,g}({\widehat}\Phi_{d_n}) - \inf_{\Phi} \mathcal{R}_{f,g}(\Phi)  \right\}  {\leqslant}\left\{\begin{array}{ll}
    c \, R^{\frac{1}{2s+1}} n^{-\frac{s}{2s+1}} \log(n) & \textrm{if } \Delta < R^{\frac{1}{2s+1}} n^{-\frac{s}{2s+1}} \log(n) \\[0.2em]
    \displaystyle \frac{c}{\Delta} R^{\frac{2}{2s+1}} n^{-\frac{2s}{2s+1}} \log^2(n) & \textrm{if } \Delta {\geqslant}R^{\frac{1}{2s+1}} n^{-\frac{s}{2s+1}} \log(n)
\end{array}\right.$$

 \
The proof is postponed to Appendix \[s:pminmax\] and combines Lemmas \[prop:CO\] and \[lem:proj\] from the previous sections. A proof sketch is also provided below.

Note that the two bounds of the right-hand side coincide when $\Delta = R^{1/(2s+1)} \, n^{-s/(2s+1)} \log(n)$. Therefore, there is a continuous transition from a slow rate (when $\Delta$ is small) to a fast rate (when $\Delta$ is large). This leads to the following remark.

 \

-   Taking $\Delta=0$, we recover the worst-case bound of [@Cadre Corollary 4.4] (where $u=1/s$) up to logarithmic factors. As shown by Theorem \[thm:minimaxlowerbound\] below, this slow rate is unimprovable for a small distance $\| f- g \|$.

-   However, we obtain a significantly faster rate when $\| f- g \|$ is bounded from below. This improved rate is a consequence of the margin behavior (see, [e.g.]{}, [@AT07; @GKM16]), but not of the choice of $d_n$ that is oblivious to $\| f- g \|$.

-   Continuous transitions from slow rates to faster rates were already derived in the past. For instance, for any supervised classification problem where the margin $\big|2\eta(X)-1\big| {\geqslant}h$ is almost surely bounded from below, [@MaNe-06-RiskBounds Corollary 3] showed that the excess risk w.r.t. a class of VC-dimension $V$ varies continuously from $\sqrt{V/n}$ to $V/(nh)$ (omitting log factors) as a function of the margin parameter $h$. In a completely different setting, [@RaSrTs-13-MinimaxRegretRisk Theorem 5] analyzed the minimax excess risk for nonparametric regression with well-specified and misspecified models. They showed a continuous transition from slow to faster rates when the distance of the regression function to the statistical model decreases to zero.

We finally note that, though the choice of the parameter $d_n$ does not depend on $\Delta$, it still depends on the (possibly unknown) smoothness parameter $s$. Though designing an adaptive classifier is beyond the scope of this paper, it might be addressed via the Lepski method (see, [e.g.]{}, [@L90]) after adapting it to the classification setting.

 \
*Sketch of the proof.* We outline the main ingredients. For all $d \in {\mathbb{N}}^*$ and $0 < {\varepsilon}_1,{\varepsilon}_2 {\leqslant}1/8$ satisfying the assumptions of Lemmas \[lem:proj\] and \[prop:CO\], $$\begin{aligned}
\mathcal{R}_{f,g}({\widehat}\Phi_d) - \mathcal{R}_{f,g}(\Phi^\star) 
& = & \mathcal{R}_{f,g}({\widehat}\Phi_d) - \mathcal{R}_{f,g}(\Phi_d^\star) + \mathcal{R}_{f,g}(\Phi_d^\star) - \mathcal{R}_{f,g}(\Phi^\star) \nonumber \\
& \lesssim &{\varepsilon}_1 \left( 1\wedge \frac{{\varepsilon}_1}{\| f_d -g_d \|}  \right) + \exp \left(  - \frac{n {\varepsilon}_1^2}{4608 \, d \log n } \right)  + \frac{1}{n} + {\varepsilon}_2^2 + 
{\varepsilon}_2  \left( 1\wedge \frac{{\varepsilon}_2}{\| f -g \|}  \right) \nonumber \\
& \lesssim & \min\left\{{\varepsilon}_1+{\varepsilon}_2, \frac{{\varepsilon}_1^2 + {\varepsilon}_2^2}{\| f-g \|} \right\} + \exp \left(  - \frac{n {\varepsilon}_1^2}{4608 \, d \log n } \right) + \frac{1}{n} + {\varepsilon}_2^2 \nonumber \\
& \lesssim & \min\left\{\sqrt{\frac{d}{n}} \log(n)+{\varepsilon}_2, \frac{d \log^2(n)/n + {\varepsilon}_2^2}{\| f-g \|} \right\} + \frac{1}{n} + {\varepsilon}_2^2 \nonumber \end{aligned}$$ for $d$ large enough, and for the choice of ${\varepsilon}_1 \approx \sqrt{d/n} \log(n)$. Following the comments at the end of Section \[sec:trunc\], we also choose ${\varepsilon}_2 \approx R d^{-s}$ (up to logarithmic factors). We obtain, omitting constant but also logarithmic factors: $$\begin{aligned}
\mathcal{R}_{f,g}({\widehat}\Phi_d) - \mathcal{R}_{f,g}(\Phi^\star)  & \lesssim \min\left\{\sqrt{\frac{d}{n}} + d^{-s} , \frac{d/n + d^{-2s}}{\| f-g \|} \right\} \lesssim \min\left\{n^{-\frac{s}{2s+1}} , \frac{n^{-\frac{2s}{2s+1}}}{\| f-g \|} \right\} \;,\end{aligned}$$ where the last inequality is obtained with the optimal value of $d \approx n^{\frac{1}{2s+1}}$. A detailed and more formal proof (with, [e.g.]{}, a rigorous treatment of the approximation $\| f_d -g_d \| \approx \| f -g \|$) can be found in Appendix \[s:pminmax\]. $\square$

Lower bounds on the excess risk {#s:lower}
===============================

\[sec:minimaxlowerbounds\]

In this section we derive two types of excess risk lower bounds.

The first one decays polynomially with $n$ and applies to *any* classifier. This minimax lower bound indicates that, up to logarithmic factors, the excess risk of Theorem \[prop:minmax\] cannot be improved in the worst case. This result is derived via standard nonparametric statistical tools ([e.g.]{}, Fano’s inequality) and is stated in Section \[s:minimaxfano\].

Our second lower bound is of a different nature: it decays logarithmically with $n$ and only applies to the nonparametric $k$-nearest neighbors algorithm evaluated on projected trajectories ${\mathbf{X}}_{i,d} \in {\mathbb{R}}^d$ and ${\mathbf{X}}_d \in {\mathbb{R}}^d$. We allow $d$ to be chosen adaptively via a sample-splitting strategy, and we consider $k$ tuned (optimally) as a function of $d$. Our logarithmic lower bound indicates that this popular algorithm is not fit for our particular model; see Section \[s:knn\] below.

A general minimax lower bound {#s:minimaxfano}
-----------------------------

We provide a lower bound showing that the excess risk bound of Theorem \[prop:minmax\] is minimax optimal up to logarithmic factors. The proof is postponed to Appendix \[s:minimaxlowerbound\].

\[thm:minimaxlowerbound\] Consider the statistical model  and the set ${\mathcal{H}}_s(R)$ defined in , where $s,R>0$ and where $(\varphi_j)_{j {\leqslant}1}$ is any Hilbert basis of ${\mathbb{L}^2}([0,1])$. Then, every classifier ${\widehat}{\Phi}$ satisfies, for any number $n {\geqslant}\max\bigl\{R^{1/s}, (32 \log(2) + 2)^{2s+1}/(3R^2/4)\bigr\}$ of i.i.d. observations $(X_i,Y_i)_{1 {\leqslant}i {\leqslant}n}$ from  and all $\Delta \in (0,R/2]$, $$\sup_{\substack{f,g \in {\mathcal{H}_s}(R) \\ \|f-g\| {\geqslant}\Delta}} \left\{ \mathcal{R}_{f,g}({\widehat}\Phi) - \inf_{\Phi} \mathcal{R}_{f,g}(\Phi)  \right\} {\geqslant}\left\{ \begin{array}{ll}
\displaystyle c e^{-2 R^{2/(2s+1)}} \, R^{1/(2s+1)} \, n^{-s/(2s+1)} & \textrm{if $\Delta < R^{1/(2s+1)} \, n^{-s/(2s+1)}$} \\[0.5cm]
\displaystyle \frac{c e^{-2 \Delta^2}}{\Delta} \, R^{2/(2s+1)} \, n^{-2s/(2s+1)}  & \textrm{if $\Delta {\geqslant}R^{1/(2s+1)}\, n^{-s/(2s+1)}$}
\end{array}\right.$$ for some absolute constant $c>0$.

We note two minor differences between the upper and lower bounds: Theorem \[prop:minmax\] involves extra logarithmic factors, while Theorem \[thm:minimaxlowerbound\] involves an extra term of $e^{-2\Delta^2}$. Fortunately both terms have a minor influence (note that $e^{-2\Delta^2} {\geqslant}e^{-8R^2}$ since $f,g \in {\mathcal{H}_s}(R)$). We leave the question of identifying the exact rate for future work. [^1]

 \
If we omit logarithmic factors and constant factors depending only on $s$ and $R$, Theorems \[prop:minmax\] and \[thm:minimaxlowerbound\] together imply that, for $n {\geqslant}N_{s,R}$ large enough:

-   when $\Delta \lesssim R^{1/(2s+1)} \, n^{-s/(2s+1)}$, the optimal worst-case excess risk is of the order of $n^{-s/(2s+1)}$;

-   when $\Delta \gtrsim R^{1/(2s+1)} \, n^{-s/(2s+1)}$, the optimal worst-case excess risk is of the order of $n^{-2s/(2s+1)}/\Delta$.

Lower bound for the $k$-NN classifier {#s:knn}
-------------------------------------

In this section, we focus on the $k$-nearest neighbor (kNN) classifier. This classification rule has been intensively studied over the past fifty years. In particular, this method provides interesting theoretical and practical properties. It is quite easy to handle and implement. Indeed, given a sample $\mathcal{S} = \lbrace (X_1,Y_1),\dots, (X_n,Y_n) \rbrace$, a number of neighbors $k$, a norm $\|.\|$ and a new incoming observation, the kNN classifier is defined as $$\Phi_{n,k}(X) = \mathds{1}_{\lbrace \frac{1}{k} \sum_{j=1}^k Y_{(j)}(X)>1/2  \rbrace},
\label{eq:knn}$$ where the $Y_{(j)}$ correspond to the label of the $X_{(j)}$ re-arranged according to the ordering $$\| X_{(1)} - X \| {\leqslant}... {\leqslant}\| X_{(n)} - X \|.$$ We refer the reader, [e.g.]{}, to [@G78], [@DGL96] or [@BD2015] for more details.\
We are interested below in the performances of the classifier $ \Phi_{n,k}$ in this functionnal setting. For this purpose, we will use the recent contribution of [@chaudhuri] that provides a lower bound of the misclassification rate of the kNN classifier in a very general framework. This lower bound is expressed as the measure of an uncertain set around $\eta \simeq 1/2$. We emphasize that we want to understand if a truncation strategy associated to a non parametric supervised classification approach is suitable for this kind of problem.

### Finite-dimensional case

#### Smoothness parameter $\alpha$

We shall consider first a finite $d$-dimensional case for our Gaussian translation model. In that case, Remark \[rmk:truncatedSpace\] in Section \[sec:estimationerror\] reveals that the truncation approach problem we are studying is, without loss of generality, equivalent to a supervised classification in $\mathbb{R}^d$ where conditionally on the event $\lbrace Y=0\rbrace$ (resp. $\lbrace Y=1 \rbrace$), $X_d$ is a standard Gaussian variable (resp. a Gaussian random variable with mean $m$ and variance $1$). If $\gamma_d$ refers to the Gaussian density: $$\forall x \in \mathbb{R}^d \qquad \gamma_d(x) := (2\pi)^{-d/2} e^{-\|x\|^2/2},$$ then in that case, the Bayes classifier in $\mathbb{R}^d$ is: $$\Phi_d^\star(x) = \mathds{1}_{\lbrace \eta_d(x) {\geqslant}1/2 \rbrace } \qquad \mathrm{with} \qquad \eta_d(x) = \frac{\gamma_d(x)}{\gamma_d(x)+\gamma_d(x-m)} \quad \forall x\in \mathbb{R}^d,$$

In the following, to simplify the notations, we will drop the subscript $d$ in all these terms and will write $\gamma, \eta$ instead of $\gamma_d,\eta_d$. Following [@chaudhuri], the rate of convergence of the kNN depends on a smoothness parameter $\alpha$ involved in the next inequality: $$\label{eq:smooth}
\forall x \in \mathbb{R}^d \qquad |\eta(B(x,r)) - \eta(x)| {\leqslant}L \mu(B(x,r))^{\beta}$$ where $\eta(B(x,r))$ refers to the mean value of $\eta$ on $B(x,r)$ w.r.t. the distribution of the design $X$ given by $\mu=\frac{1}{2} \gamma(.)+\frac{1}{2} \gamma(.-m)$. Therefore, our first task is to determine the value of $\beta$ in our Gaussian translation model. We begin with a simple proposition that entails that the value of $\beta$ corresponding to our Gaussian translation model in $\mathbb{R}^d$ is $2/d$. The proof of Proposition \[prop:gaussian\_alpha\] is postponed to Appendix \[proof:gaussian\_alpha\].

\[prop:gaussian\_alpha\] Assume that $\|x\| {\leqslant}R$ for some $R \in \mathbb{R}^+$. Then an explicit constant $L_R$ exists such that $$\forall r {\leqslant}\frac{1}{R} \qquad 
|\eta(B(x,r))-\eta(x)| {\leqslant}L_R \mu(B(x,r))^{2/d}.$$

An important point given in the previous proposition is that when we are considering design points $x$ such that $\|x\| {\leqslant}R/2$ and $\|m\| {\leqslant}R/2$, we then have $$\forall r {\leqslant}1 \quad \forall x \in B(0,R/2) \qquad 
\left| \eta(B(x,r)) - \eta(x)\right|{\leqslant}60 \pi e d R^2 e^{R^2/d} \mu(B(x,r))^{2/d},$$ so that the constant $L_R$ involved in the statement of Proposition \[prop:gaussian\_alpha\] can be chosen as: $$\label{eq:value_LR}
L_R =  60 \pi e d R^2 e^{R^2/d}$$

According to inequality (\[eq:smooth\]) and thanks to Proposition \[prop:gaussian\_alpha\], the smoothness of the Gaussian translation model is given by: $$\beta_d=2/d.$$ Now, we slightly modify the approach of [@chaudhuri] to obtain a lower bound on the excess risk that involves the margin of the classification problem. As pointed above, in the Gaussian translation model, when the two classes are well separated (meaning that the center of the two classes are separated with a distance independent on $n$), the margin parameter is equal to $1$ (see Theorem \[thm:margin\]).\

#### Optimal calibration of the kNN

Before giving our first result on the rate of convergence of the kNN classifier, we remind first some important facts regarding the choice of the number of neighbors $k$ for the kNN classifier. The ability of the kNN to produce a universally consistent classification rule highly depends on the choice of the bandwidth parameter $k_n$. In particular, this bandwidth parameter must satisfy $k_n \longrightarrow + \infty$ and $k_n/n \longrightarrow 0$ as $n \longrightarrow + \infty$ to produce an asymptotically vanishing variance and bias (see, [e.g.]{}, [@DGL96] for details). However, to obtain an optimal rate of convergence, $k_n$ has to be chosen to produce a nice trade-off between the bias and the variance of the excess risk. It is shown in [@chaudhuri] that, when the marginal law of $X$ is compactly supported, the optimal calibration $k^{opt}_n$ is: $$\label{eq:optimal_k}
\frac{1}{\sqrt{k^{opt}_n}(d)} = c \left( \frac{k^{opt}_n(d)}{n}\right)^{\beta_d} \quad \Leftrightarrow \quad k^{opt}_n(d) \sim n^{\frac{4}{4+d}}$$ where $c$ refers to any non negative constant and $\beta_d = 2/d$ refers to the smoothness parameter of the model involved in Inequality . On the other hand, when $\beta_d=1/d$, it is shown in [@GKM16] that (almost) optimal rates of convergence can be obtained in the non-compact case, choosing for instance $$k_n \sim n^{\frac{2}{2+ d + \tau}},$$ for some positive $\tau$. The following results provides a lower bound on the convergence rate with a number of neighbor $k$ contained in a range of values .

\[theo:knngauss\] For any $d\in \mathbb{N}$, a constant $C_1$ exists such that $$\mathcal{R}_{f,g}(\Phi_{k,n,d})-\mathcal{R}(\Phi_d^{\star}) {\geqslant}\frac{C_1}{k_n}$$ when $k \in  \mathcal{K}_n$ where $$\mathcal{K}_n = \left\lbrace \ell \in \mathbb{N}\ s.t. \ \frac{1}{\sqrt{\ell}} {\geqslant}d \left( \frac{\ell}{n}  \right)^{2/d} \quad \text{and} \quad \ell {\leqslant}n \right\rbrace.$$

The proof of this result is given in Appendix \[proof:knngauss\].

Proposition \[theo:knngauss\] is an important intermediary result to understand the behaviour of kNN with functional data. We briefly comment on this result below.

-   The set $\mathcal{K}_n$ contains all the integers from $1$ to an integer equivalent to $n^{4/(4+d)} d^{-2d/(4+d)}$. In particular, the “optimal" standard calibration of $k_n$ given by Equation is included in the set $\mathcal{K}_n$ and Proposition \[theo:knngauss\] applies in particular for such a calibration.

-   Proposition \[theo:knngauss\] entails that tuning the kNN classifier in an “optimal way" cannot produce faster rates of convergence than $n^{-4/(d+4)}$, even with some additional informations on the considered model (here the Gaussian distribution of the conditional distributions): $$\mathcal{R}_{f,g}(\Phi_{k^{opt}_n(d),n,d})-\mathcal{R}(\Phi_d^{\star}) {\geqslant}C_1 n^{-\frac{4}{d+4}}.$$ These performances have to be compared to those obtained with our procedure that explicitly exploits the additional knowledge of Gaussian conditional distributions (see, [e.g.]{}, Lemma \[lem:proj\]).

-   The last important point is that the lower bound in the statement of Proposition \[theo:knngauss\] appears to be seriously damaged when $d$ increases. This is a classical feature of the curse of dimensionality. For us, it invalidates any approach that will jointly associate a truncation strategy with a kNN plug-in classifier: we will be led to choose $d$ large with $n$ to avoid too much loss of information but in the same time this will harms the statistical misclassification.

### Lower bound of the misclassification rate with truncated strategies

As pointed by Proposition \[theo:knngauss\], the global behavior of the kNN classifier heavily depends on the choice of the dimension $d$. In the same time, the size of $d$ is important to obtain a truncated Bayes classifier $\Phi_d^{\star}$ close to the Bayes classifier $\Phi^{\star}$. To assess the performance of kNN, we consider a sample splitting strategy $\mathcal{S}=\mathcal{S}_1 \cup \mathcal{S}_2$ where $(\mathcal{S}_1,\mathcal{S}_2)$ is a partition of $\mathcal{S}$. Then, $\mathcal{S}_1$ is used to choose a dimension ${\widehat}{d}$, then we apply an optimal kNN classifier method based on the samples of $\mathcal{S}_2$ on the truncated spaces with $\Pi_{{\widehat}{d}}$ with $k_n^{opt}({\widehat}{d})$ chosen as in Equation . It is important to note that the sample splitting strategy produces a choice ${\widehat}{d}$ independent on the samples in $\mathcal{S}_2$.

Theorem \[thm:lwr\_bound\_knn\] below shows that any sample splitting strategy, every choice of ${\widehat}{d}$ will lead to bad performances of classification on model . The proof is postponed to Appendix \[proof:lwr\_bound\_knn\].

\[thm:lwr\_bound\_knn\] In the functional Gaussian translation model, any kNN classifier $\Phi_{k_n^{opt},n,{\widehat}{d}}$ satisfies $$\inf_{{\widehat}{d}\in \mathbb{N}}\sup_{f,g \in {\mathcal{H}_s}(r)} \mathcal{R}_{f,g}(\Phi_{k_n^{opt}({\widehat}{d}),n,{\widehat}{d}})-R_n(\Phi^{\star})  \gtrsim \log(n)^{-2s}.$$

The main conclusion of this section and of Theorem \[thm:lwr\_bound\_knn\] is that the kNN rule based on a truncation strategy does not lead to satisfying rates of convergence, regardless the choice of the dimension ${\widehat}{d}$ is. We stress that this result is only valid for a specific choice of $k_n^{opt}({\widehat}{d})$. Although this choice appears to be classic regarding the existing literature, obtaining a global lower bound ([i.e.]{}, for any choice of $k$) remains an open (and difficult) problem. Even though we suspect that such a logarithmic lower bound also holds for some more general procedures (without sample splitting and with a more general possible choice of $k_n$), we do not have any proof of such a result. However, it should be kept in mind that the misclassification of the classifier ${\widehat}\Phi_{d_n}$ proposed in Equation attains a polynomial rate of convergence, which is an important encouragement for its use instead of the use of a nonparametric classifier associated with a threshold rule.

Proof of the upper bounds {#s:A}
=========================

The goal of this section is to prove the polynomial upper bound of Theorem \[prop:minmax\] together with the intermediate results of Proposition \[thm:margin\] and Lemma \[lem:proj\]. We will pay a specific attention to the acceleration (in terms of the number $n$ of samples) obtained when the functions $f$ and $g$ appearing in are well separated.

Proof of Proposition \[thm:margin\] (control of the margin) {#s:pmargin}
-----------------------------------------------------------

We start by proving Proposition \[thm:margin\], [i.e.]{}, we analyze the margin behavior in Model . This result is a key ingredient to derive our excess risk upper bounds.

We use the Girsanov Equations (\[eq:qf\]) and (\[eq:qg\]) that define the likelihood ratio $q_f$ and $q_g$. We therefore deduce that $$\begin{aligned}
\lefteqn{ {\mathbb{P}}_{X} \left( \left| \eta(X) - \frac{1}{2} \right| {\leqslant}{\varepsilon}\right) }\nonumber \\
 &= &  {\mathbb{P}}_{X} \left( \frac{|q_f(X) - q_g(X) |}{2(q_f(X) + q_g(X))} {\leqslant}{\varepsilon}\right) \nonumber \\
& = &   {\mathbb{P}}_{X} \left( \left\lbrace \frac{|q_f(X) - q_g(X) |}{2(q_f(X) + q_g(X))} {\leqslant}{\varepsilon}\right\rbrace \cap \left\lbrace q_f(X) {\leqslant}q_g(X) \right\rbrace \right)+{\mathbb{P}}_{X} \left( \left\lbrace \frac{|q_f(X) - q_g(X) |}{2(q_f(X) + q_g(X))} {\leqslant}{\varepsilon}\right\rbrace \cap \left\lbrace  q_f(X)>q_g(X) \right\rbrace \right) \nonumber \\
  & {\leqslant}&   {\mathbb{P}}_{X} \left( \left\lbrace \frac{|q_f(X) - q_g(X) |}{4 q_g(X)} {\leqslant}{\varepsilon}\right\rbrace \cap \left\lbrace q_f(X) {\leqslant}q_g(X) \right\rbrace \right) +  {\mathbb{P}}_{X} \left(\left\lbrace \frac{|q_f(X) - q_g(X) |}{ 4 q_f(X)} {\leqslant}{\varepsilon}\right\rbrace \cap \left\lbrace q_f(X)>q_g(X) \right\rbrace\right) \nonumber \\ 
  & {\leqslant}&  {\mathbb{P}}_{X} \left( \left|\frac{q_f(X)}{q_g(X)} -1 \right|  {\leqslant}4 {\varepsilon}\right) +  {\mathbb{P}}_{X} \left( \left|\frac{q_g(X)}{q_f(X)} -1 \right|  {\leqslant}4 {\varepsilon}\right) \,. \label{eq:LRcontrol}\end{aligned}$$ The two terms of the last line are handled similarly, and we only deal with the first one. We note that $$\frac{q_f(X)}{q_g(X)} = \exp\left(\int_{0}^1 (f-g)(s) dX_s - \frac{1}{2} [\|f\|^2-\|g\|^2] \right) \,.$$ Using the fact that $Y \sim \mathcal{B}(1/2)$ and conditionning by $Y=1$ and $Y=0$, we can see that $$\begin{aligned}
\lefteqn{ {\mathbb{P}}_{X} \left( \left|\frac{q_f(X)}{q_g(X)} -1 \right|  {\leqslant}4 {\varepsilon}\right)} \nonumber \\
&= & {\mathbb{P}}\left( \left| e^{\int_{0}^1 (f-g)(s) f(s) ds +\int_{0}^1 (f-g)(s)  dW_s   - \frac{1}{2} [\|f\|^2-\|g\|^2]} - 1 \right| {\leqslant}4 {\varepsilon}\right) {\mathbb{P}}(Y=1) \nonumber\\
 & & \hspace{2cm}+   {\mathbb{P}}\left( \left| e^{\int_{0}^1 (f-g)(s) g(s) ds +\int_{0}^1 (f-g)(s)  dW_s   - \frac{1}{2} [\|f\|^2-\|g\|^2]} - 1 \right| {\leqslant}4 {\varepsilon}\right){\mathbb{P}}(Y=0) \nonumber\\
  & & =  \frac{1}{2}   {\mathbb{P}}\left( \left|  e^{\frac{1}{2} \|f-g\|^2 +\int_{0}^1 (f-g)(s)  dW_s} - 1 \right| {\leqslant}4 {\varepsilon}\right) +
  \frac{1}{2}   {\mathbb{P}}\left( \left|  e^{-\frac{1}{2} \|f-g\|^2 +\int_{0}^1 (f-g)(s)  dW_s} - 1 \right| {\leqslant}4 {\varepsilon}\right) \nonumber\\
  & & =  \frac{1}{2}   {\mathbb{P}}\left( \left|  e^{\frac{1}{2} \Delta^2 + \Delta \xi } - 1 \right| {\leqslant}4 {\varepsilon}\right) +
  \frac{1}{2}   {\mathbb{P}}\left( \left|  e^{-\frac{1}{2} \Delta^2 +\Delta \xi} - 1 \right| {\leqslant}4 {\varepsilon}\right) \,, \label{eq:intervalle_gaussienne}\end{aligned}$$ where $\Delta := \|f-g\|$ and $\xi \sim \mathcal{N}(0,1)$ because $\int_{0}^1 [f(s)-g(s)] dW_s \sim \mathcal{N}(0,\Delta^2)$.\
Using the inequalities $\ln(1+ 4{\varepsilon}) {\leqslant}4{\varepsilon}$ and $\ln(1-4{\varepsilon}){\geqslant}-8{\varepsilon}$ when ${\varepsilon}{\leqslant}1/8$, the above probability can be upper bounded as $$\begin{aligned}
 {\mathbb{P}}_{X} \left( \left|\frac{q_f(X)}{q_g(X)} -1 \right|  {\leqslant}4 {\varepsilon}\right) 
 & {\leqslant}& \frac{1}{2} {\mathbb{P}}\left(-\frac{8 {\varepsilon}}{\Delta} - \frac{\Delta}{2} {\leqslant}\xi {\leqslant}\frac{4 {\varepsilon}}{\Delta} - \frac{\Delta}{2}\right)   
 + \frac{1}{2} {\mathbb{P}}\left(-\frac{8 {\varepsilon}}{\Delta} + \frac{\Delta}{2} {\leqslant}\xi {\leqslant}\frac{4 {\varepsilon}}{\Delta} + \frac{\Delta}{2} \right), \\
  & {\leqslant}& \frac{5 {\varepsilon}}{\Delta},\end{aligned}$$ where the last inequality follows from ${\mathbb{P}}(a {\leqslant}\xi {\leqslant}b) {\leqslant}(b-a)/\sqrt{2\pi}$ and $12/\sqrt{2 \pi}{\leqslant}5$. Inverting the roles of $f$ and $g$, we get by symmetry of the problem that the second term of  is also upper bounded by $5 {\varepsilon}/ \Delta$. This concludes the proof.

\[rem:pid\] Following the same proof strategy, it is easy to check that the same result hold in the truncated space, [i.e.]{}, replacing $\eta$ with $\eta_d$ and $\Delta$ with $\Delta_d := \|\Pi_d(f-g)\|$. Namely, for all $d \in {\mathbb{N}}^*$ and all $ 0 < {\varepsilon}{\leqslant}1/8$, $${\mathbb{P}}_{X} \left( \left| \eta_d(X) - \frac{1}{2} \right| {\leqslant}{\varepsilon}\right) {\leqslant}1 \wedge \frac{10 {\varepsilon}}{\Delta_d} \,.$$ In particular, Equation holds with $q_{f_d}(X)/q_{g_d}(X)$ on the left-hand side and with $\Delta_d$ on the right-hand side because $\int_{0}^1 \Pi_d(f-g)(s) dW_s \sim \mathcal{N}(0,\Delta_d^2)$.

Proof of Lemma \[prop:CO\] (control of the approximation error) {#s:pCO}
---------------------------------------------------------------

One key ingredient of the proof is to control the excess risk $\mathcal{R}_{f,g}(\Phi^{\star}_d) - \mathcal{R}_{f,g}(\Phi^{\star})$ in terms of the closeness of $f_d$ and $g_d$ to $f$ and $g$ respectively. To do so, we set $$\delta_d := \|f-f_d\| = \sqrt{\|f\|^2-\|f_d\|^2} \qquad \text{and} \qquad {\widetilde}{\delta}_d := \|g-g_d\| = \sqrt{\|g\|^2-\|g_d\|^2} \;.$$

We start with the well-known formula on the excess risk of any classifier (see, [e.g.]{}, [@G78]): $$\mathcal{R}_{f,g}(\Phi^{\star}_d) - \mathcal{R}_{f,g}(\Phi^{\star}) = \mathbb{E} \left[  \left| 2 \eta(X) - 1 \right|
\mathds{1}_{\left\lbrace \Phi_d^{\star}(X) \neq \Phi^{\star}(X) \right\rbrace}
 \right].$$ Then, following a classical control of the excess risk (see, [e.g.]{}, [@GKM16]), $$\begin{aligned}
\mathcal{R}_{f,g}(\Phi^{\star}_d) - \mathcal{R}_{f,g}(\Phi^{\star}) &=& \mathbb{E} \left[  \left| 2 \eta(X) - 1 \right|
\mathds{1}_{\left\lbrace \Phi_d^{\star}(X) \neq \Phi^{\star}(X) \right\rbrace} \left[ 
\mathds{1}_{\left\lbrace |\eta(X)-1/2| {\leqslant}{\varepsilon}\right\rbrace}+\mathds{1}_{\left\lbrace |\eta(X)-1/2| > {\varepsilon}\right\rbrace}
\right]  \right] \nonumber \\
& {\leqslant}&  \underbrace{2 {\varepsilon}{\mathbb{P}}\left( |\eta(X)-1/2| {\leqslant}{\varepsilon}\right)}_{:=T_1} +
\underbrace{{\mathbb{P}}\bigl(
\{ \Phi_d^{\star}(X) \neq \Phi^{\star}(X) \}  \cap \{|\eta(X)-1/2| > {\varepsilon}\}\bigr)}_{:=T_2} \,.
\label{eq:inter1}\end{aligned}$$ Note that, up to the quantity $2{\varepsilon}$, the term $T_1$ corresponds to the margin behavior discussed in Section \[s:margin\] above. By Proposition \[thm:margin\] (note that $0<{\varepsilon}{\leqslant}1/8$), we have $$T_1 := 2 {\varepsilon}{\mathbb{P}}\bigl( |\eta(X)-1/2| {\leqslant}{\varepsilon}\bigr) {\leqslant}2{\varepsilon}\left( 1 \wedge \frac{10 {\varepsilon}}{\Delta}   \right).$$

To control the second term $T_2$, we note (classically) that $\Phi^{\star}(X) = \mathds{1}_{\eta(X) {\geqslant}1/2}$ and $\Phi_d^{\star}(X) = \mathds{1}_{\eta_d(X) {\geqslant}1/2}$ together imply that $$T_2 := {\mathbb{P}}\bigl(
\{ \Phi_d^{\star}(X) \neq \Phi^{\star}(X) \}  \cap \{|\eta(X)-1/2| > {\varepsilon}\}\bigr) {\leqslant}\mathbb{P} \bigl( |\eta_d(X) - \eta(X) | > {\varepsilon}\bigr) \,.$$ Using $Y \sim \mathcal{B}(1/2)$ and the conditional distribution of $X \vert Y$, we have $$T_2 {\leqslant}\frac{1}{2} \underbrace{{\mathbb{P}}_{f} \bigl(|\eta_d(X)-\eta(X)|> {\varepsilon}\bigr)}_{:=T_{2,1}} +  \frac{1}{2} \underbrace{{\mathbb{P}}_{g} \bigl(|\eta_d(X)-\eta(X)|> {\varepsilon}\bigr) }_{:=T_{2,2}}.$$ For the sake of brevity, we only study $T_{2,1}$ (the second term $T_{2,2}$ can be upper bounded similarly by symmetry of the problem and by inverting the roles of $f$ and $g$). To alleviate the notation, we set $f_d:=\Pi_d(f)$ and $g_d:=\Pi_d(g)$. Recall from  that $q_{f}$ denotes the likelihood ratio of the model ${\mathbb{P}}_{f}$. Next we decompose $\eta-\eta_d $ using the four (a.s. positive) likelihood ratios $q_f$, $q_g$, $q_{f_d}$, and $q_{g_d}$: $$\eta-\eta_d = \frac{q_f}{q_f+q_g} - \frac{q_{f_d}}{q_{f_d}+q_{g_d}} = \frac{q_{f}-q_{f_d}}{q_{f}+q_g} + q_{f_d} \left(\frac{1}{q_f+q_g}-\frac{1}{q_{f_d}+q_{g_d}}\right).$$ In order to upper bound $T_{2,1}$, we use the triangle inequality three times in the decomposition above, we note that $$\left|\frac{1}{q_f+q_g}-\frac{1}{q_{f_d}+q_{g_d}}\right| = \left|\frac{q_{f_d}-q_f+q_{g_d}-q_g}{(q_f+q_g)(q_{f_d}+q_{g_d})}\right| {\leqslant}\frac{\left|q_{f_d}-q_f\right|}{q_f q_{f_d}} + \frac{\left|q_{g_d}-q_g\right|}{q_g q_{f_d}} \;,$$ and we use the inclusion $\{Z_1+Z_2+Z_3>{\varepsilon}\} \subseteq \{Z_1>{\varepsilon}/2\} \cup \{Z_2>{\varepsilon}/4\} \cup \{Z_3>{\varepsilon}/4\}$ valid vor any random variables $Z_1, Z_2, Z_3$. We get: $$\begin{aligned}
\lefteqn{T_{2,1}}\\
 & {\leqslant}& {\mathbb{P}}_f \left( |q_{f_d}(X)-q_f(X)| > \frac{{\varepsilon}}{2} |q_f(X)+q_g(X)| \right)   +  {\mathbb{P}}_f \left( q_{f_d}(X)|q_f(X)-q_{f_d}(X)| > \frac{{\varepsilon}}{4} q_f(X) q_{f_d}(X)| \right) \\&&+ 
 {\mathbb{P}}_f \left( q_{f_d}(X)|q_g(X)-q_{g_d}(X)| > \frac{{\varepsilon}}{4} q_g(X) q_{f_d}(X)| \right)  \\
 & {\leqslant}&  {\mathbb{P}}_f \left( |q_{f_d}(X)-q_{f}(X)| > \frac{{\varepsilon}}{2} q_f(X) \right) + {\mathbb{P}}_f \left( |q_{f_d}(X)-q_f(X)| > \frac{{\varepsilon}}{4} q_f(X) \right)  + {\mathbb{P}}_f \left( |q_{g_d}(X)-q_g(X)| > \frac{{\varepsilon}}{4} q_g(X) \right) \\
 & {\leqslant}& 2{\mathbb{P}}_f \left( |q_{f_d}(X)-q_f(X)| > \frac{{\varepsilon}}{4} q_f(X) \right)  + {\mathbb{P}}_f \left( |q_{g_d}(X)-q_g(X)| > \frac{{\varepsilon}}{4} q_g(X) \right) \\\end{aligned}$$ Taking the logarithm, we can see that: $${\mathbb{P}}_f \left( \left|\frac{q_{f_d}(X)}{q_f(X)}-1\right| > \frac{{\varepsilon}}{4}  \right)  = {\mathbb{P}}_f \left(\log \left( \frac{q_{f_d}}{q_f} \right) <  \log (1-{\varepsilon}/4) \right) +{\mathbb{P}}_f \left( \log \left( \frac{q_{f_d}}{q_f} \right)  > \log(1+{\varepsilon}/4) \right)$$ Using the inequalities $\log(1+{\varepsilon}/4) {\geqslant}{\varepsilon}/8$ and $\log(1-{\varepsilon}/4) {\leqslant}-{\varepsilon}/4$ (that hold at least for all $0 < {\varepsilon}{\leqslant}1$) we obtain: $$T_{2,1} {\leqslant}2  \underbrace{{\mathbb{P}}_f \left(  \log \frac{q_{f_d}(X)}{q_f(X)}  > {\varepsilon}/8 \right) }_{:=S_1} + 
2 \underbrace{{\mathbb{P}}_f  \left(\log  \frac{q_{f_d}(X)}{q_f(X)} < -\frac{{\varepsilon}}{4} \right)}_{:=S_2} +  \underbrace{{\mathbb{P}}_f \left(  \log \frac{q_{g_d}(X)}{q_g(X)}  > \frac{{\varepsilon}}{8} \right)}_{:=S_3}  + 
 \underbrace{{\mathbb{P}}_f  \left(\log  \frac{q_{g_d}(X)}{q_g(X)} < -\frac{{\varepsilon}}{4} \right)}_{:=S_4} .
\label{eq:T21}$$ The Girsanov formula makes it possible to write $
\log \frac{q_{f_d}(X)}{q_f(X)} = \int_{0}^1 (f_d-f)(s) dX_s - \frac{1}{2} [\|f_d\|^2-\|f\|^2].
$ We study $S_1$ and remark that under ${\mathbb{P}}_f$, $dX_s = f(s) ds + dW_s$ for all $s\in [0,1]$ so that $$\begin{aligned}
S_1= {\mathbb{P}}_f \left(  \log \frac{q_{f_d}(X)}{q_f(X)}  > \frac{{\varepsilon}}{8} \right) 
& = & {\mathbb{P}}\left( \langle f_d-f,f \rangle + \int_{0}^1 (f_d-f)(s) dW_s - \frac{1}{2}\left[ \|f_d\|^2-\|f\|^2\right] >  \frac{{\varepsilon}}{8}\right), \\
& = &  {\mathbb{P}}\left(  \int_{0}^1 (f_d-f)(s) dW_s > \frac{1}{2}\left[ \|f\|^2-\|f_d\|^2\right] +  \frac{{\varepsilon}}{8}\right)\\
& {\leqslant}& {\mathbb{P}}\left( \xi >  \frac{{\varepsilon}}{8}\right) \,,\end{aligned}$$ where $\xi \sim \mathcal{N}\bigl(0,\|f_d-f\|^2\bigr) = \mathcal{N}(0,\delta_d^2)$. But, by a classical (sub)Gaussian tail bound stated, [e.g.]{}, in [@BLM p.22], we get $$S_1  {\leqslant}\exp\left(-\frac{({\varepsilon}/8)^2}{2 \delta_d^2}\right) = \exp\left(-\frac{{\varepsilon}^2}{128 \delta_d^2}\right) \,.
\label{eq:contS1}$$ Combining the last inequality with the assumption $$\delta_d^2 {\leqslant}\frac{{\varepsilon}^2}{512 \ln(1/{\varepsilon}^2)} {\leqslant}\frac{{\varepsilon}^2}{128 \ln(1/{\varepsilon}^2)} \,,
$$ we finally obtain $S_1  {\leqslant}{\varepsilon}^2$.

 \
The second term $S_2$ introduced in (\[eq:T21\]) can be dealt similarly, except that we can no longer neglect the positive term $\bigl(\|f\|^2-\|f_d\|^2\bigr)/2 = \delta_d^2/2$: considering again $\xi \sim \mathcal{N}(0,\delta_d^2)$, we have $$\begin{aligned}
S_2 & = {\mathbb{P}}_f \left(  \log \frac{q_{f_d}(X)}{q_f(X)}  < -\frac{{\varepsilon}}{4} \right) 
 = {\mathbb{P}}\left( \xi < \frac{\delta_d^2}{2} - \frac{{\varepsilon}}{4}\right) 
 {\leqslant}{\mathbb{P}}\left( \xi < - \frac{{\varepsilon}}{8}\right) {\leqslant}{\varepsilon}^2 \,,\end{aligned}$$ where the last inequality follows from the same Gaussian concentration argument as in , and where the inequality before last is because $\delta_d^2/2 {\leqslant}{\varepsilon}/8$. Indeed, by the assumptions of Lemma \[prop:CO\], $${\varepsilon}{\geqslant}\sqrt{512 \ln(8^2)} \max\bigl\{\delta_d,{\widetilde}{\delta}_d\bigr\} {\geqslant}24 \max\bigl\{\delta_d^2,{\widetilde}{\delta}_d^2\bigr\} \,,
\label{eq:epsilondelta}$$ where the second inequality follows from $\max\{\delta_d, {\widetilde}{\delta}_d\} {\leqslant}{\varepsilon}/24 {\leqslant}1$ (as a result of the first inequality and ${\varepsilon}{\leqslant}1$). Therefore, $\delta_d^2/2 {\leqslant}{\varepsilon}/48 {\leqslant}{\varepsilon}/8$ as claimed above.

 \
We now focus on $S_3$: noting that $
\log \frac{q_{g_d}(X)}{q_g(X)} = \int_{0}^1 (g_d-g)(s) dX_s - \frac{1}{2} [\|g_d\|^2-\|g\|^2],
$ we get $$\begin{aligned}
S_3 = {\mathbb{P}}_f \left(  \log \frac{q_{g_d}(X)}{q_g(X)}  > \frac{{\varepsilon}}{8} \right) & = {\mathbb{P}}\left(
\langle g_d-g,f\rangle + \int_{0}^1 (g_d-g)(s) dW_s - \frac{1}{2} \left[ \|g_d\|^2-\|g\|^2 \right]> \frac{{\varepsilon}}{8} \right) \\
& = {\mathbb{P}}\left(
\langle g_d-g,f-f_d\rangle + \int_{0}^1 (g_d-g)(s) dW_s - \frac{1}{2} \left[ \|g_d\|^2-\|g\|^2 \right]> \frac{{\varepsilon}}{8} \right) \,,\end{aligned}$$ where we used the fact that $g_d-g$ and $f_d$ are orthogonal. Recall now that $\delta_d = \|f-f_d\|$ and ${\widetilde}{\delta}_d = \|g-g_d\| = \sqrt{\|g\|^2-\|g_d\|^2}$. If ${\widetilde}\xi  \sim \mathcal{N}(0,{\widetilde}\delta_d^2)$, the last equality entails $$S_3 {\leqslant}{\mathbb{P}}\left( {\widetilde}\xi  > \frac{{\varepsilon}}{8} - \frac{{\widetilde}{\delta}_d^2}{2} - {\widetilde}{\delta}_d \delta_d  \right) {\leqslant}{\mathbb{P}}\left( {\widetilde}\xi  > \frac{{\varepsilon}}{8} - \frac{{\widetilde}{\delta}_d^2}{2} - \frac{{\widetilde}{\delta}_d^2}{2} - \frac{\delta_d^2}{2} \right) {\leqslant}{\mathbb{P}}\left( {\widetilde}\xi  > \frac{{\varepsilon}}{16} \right) {\leqslant}{\varepsilon}^2 \,,
$$ where the second inequality follows from ${\widetilde}{\delta}_d \delta_d {\leqslant}\bigl({\widetilde}{\delta}_d+\delta_d^2\bigr)/2$, where the third inequality is because $\max\bigl\{\delta_d^2,{\widetilde}{\delta}_d^2\bigr\} {\leqslant}{\varepsilon}/24$ (by ), and where the last inequality follows from the same Gaussian tail bound as the one used in  and from the assumption ${\widetilde}{\delta}_d^2 {\leqslant}{\varepsilon}^2/\bigl(512 \ln(1/{\varepsilon}^2)\bigr)$.

 \
A similar analysis shows that the last term $S_4$ introduced in (\[eq:T21\]) also satisfies $S_4 {\leqslant}{\varepsilon}^2$. Putting everything together, we finally get $$T_{2,1} {\leqslant}6{\varepsilon}^2 \,.
$$ By symmetry of the problem and by inverting the roles of $f$ and $g$, we can also see that $T_{2,2} {\leqslant}6 {\varepsilon}^2$. Summing the bounds on $T_1$, $T_{2,1}$, and $T_{2,2}$ concludes the proof.

Proof of Lemma \[lem:proj\] (control of the estimation error) {#s:pproj}
-------------------------------------------------------------

Though we now focus on the estimation error, most of the proof follows similar arguments as for Lemma \[prop:CO\] above: comparison of two regression functions, and Gaussian-type concentration inequalities.

Recall from Remark \[rmk:truncatedSpace\] (Section \[sec:estimationerror\]) that $\eta_d$ and $\Phi^*_d = \mathds{1}_{\{\eta_d {\geqslant}1/2\}}$ correspond to the regression function and the Bayes classifier of the classification problem when the learner has only access to the projected input ${\mathbf{X}}_d := (\langle\varphi_j,X\rangle)_{1 {\leqslant}j {\leqslant}d}$. Since ${\widehat}{\Phi}_d(X)$ only depends on $X$ through ${\mathbf{X}}_d$, its excess risk can be rewritten as $$\mathcal{R}_{f,g}({\widehat}\Phi_d) - \mathcal{R}_{f,g}(\Phi_d^\star) = {\mathbb{E}}\left[ |2\eta_d(X)-1| \mathds{1}_{\lbrace {\widehat}\Phi_d(X) \not = \Phi_d^\star(X)  \rbrace}   \right] \,,$$ where the expectation is with respect to both the sample $(X_i,Y_i)_{1 {\leqslant}i {\leqslant}n}$ and the new input $X$. Now, for all ${\varepsilon}>0$, $$\begin{aligned}
\mathcal{R}_{f,g}({\widehat}\Phi_d) - \mathcal{R}_{f,g}(\Phi_d^\star)  &=& 
{\mathbb{E}}\!\left[ |2\eta_d(X)-1| \mathds{1}_{\lbrace {\widehat}\Phi_d(X) \not = \Phi_d^\star(X)  \rbrace} \mathds{1}_{
\lbrace{|\eta_d(X)-1/2| {\leqslant}{\varepsilon}\rbrace}}    \right] \nonumber\\
&&
+ \, {\mathbb{E}}\left[ |2\eta_d(X)-1| \mathds{1}_{\lbrace {\widehat}\Phi_d(X) \not = \Phi_d^\star(X)  \rbrace} \mathds{1}_{
\lbrace{|\eta_d(X)-1/2| > {\varepsilon}\rbrace}}    \right]
\nonumber\\
&{\leqslant}& 2 {\varepsilon}{\mathbb{P}}_{X} \left( |\eta_d(X)-1/2| {\leqslant}{\varepsilon}\right)  + \mathbb{P} ( | {\widehat}\eta_d(X) - \eta_d(X) | > {\varepsilon}) \,,\end{aligned}$$ where the last inequality follows from the inclusion $\bigl\{ {\widehat}\Phi_d(X) \not = \Phi_d^\star(X) \bigr\}  \cap \bigl\{|\eta_d(X)-1/2| > {\varepsilon}\bigr\} \subseteq \bigl\{|{\widehat}{\eta}_d(X)-\eta_d(X)| > {\varepsilon}\bigr\}$ (because ${\widehat}{\Phi}_d(X) = \mathds{1}_{{\widehat}{\eta}_d(X) {\geqslant}1/2}$ and $\Phi^*_d(X) = \mathds{1}_{\eta_d(X) {\geqslant}1/2}$). We can now apply the adaptation of Proposition \[thm:margin\] to the truncated space (see Remark \[rem:pid\]) to get $$\label{eq:toto}
\mathcal{R}_{f,g}({\widehat}\Phi_d) - \mathcal{R}_{f,g}(\Phi_d^\star) {\leqslant}2 {\varepsilon}\left( 1 \wedge\frac{10 {\varepsilon}}
{\Delta_d}\right)
+ \mathbb{P} ( | {\widehat}\eta_d(X) - \eta_d(X) | > {\varepsilon}) \,.$$ Using $Y \sim \mathcal{B}(1/2)$ and the conditional distribution of $X$ given $Y$, we have: $$\mathbb{P} ( | {\widehat}\eta_d(X) - \eta_d(X) | > {\varepsilon}) = \frac{1}{2}  \underbrace{\mathbb{P}_f ( | {\widehat}\eta_d(X) - \eta_d(X) | > {\varepsilon})}_{:=T_1} + \frac{1}{2} \underbrace{\mathbb{P}_g ( | {\widehat}\eta_d(X) - \eta_d(X) | > {\varepsilon})}_{:=T_2} \,,$$ where, with a slight abuse of notation, the first probability ${\mathbb{P}}_f(\cdot)$ is with respect to both the sample $(X_i,Y_i)_{1 {\leqslant}i {\leqslant}n}$ drawn i.i.d. from  and a new independent input $X$ drawn from ${\mathbb{P}}_f$; and similarly for the second probability ${\mathbb{P}}_g(\cdot)$.

We now focus on $T_1$ until the end of the proof. (The control of $T_2$ is exactly similar, by symmetry of the model and by inverting the roles of $f$ and $g$.) Denote by $\gamma_d(x)=(2\pi)^{-d/2}e^{-\|x\|^2/2}$ the density of the standard Gaussian distribution on $\mathbb{R}^d$. By Remark \[rmk:truncatedSpace\] (Section \[sec:estimationerror\]), we have, setting ${\boldsymbol{\theta}}_d := (\theta_1,\ldots,\theta_d)$ and ${\boldsymbol{\mu}}_d := (\mu_1,\ldots,\mu_d)$, $$\eta_d(X) = \frac{F_d(X)}{F_d(X)+G_d(X)} \,, \quad \textrm{where} \quad  F_d (x) = \gamma_d(x- {\boldsymbol{\theta}}_d) \quad \textrm{and} \quad G_d(x) = \gamma_d(x-{\boldsymbol{\mu}}_d) \,.$$ Similarly, by , the estimated regression function ${\widehat}{\eta}_d$ can be rewritten as $${\widehat}\eta_d(X) = \frac{ {\widehat}F_d(X) }{{\widehat}F_d(X)+ {\widehat}G_d(X)} \,, \quad \textrm{where} \quad {\widehat}F_d (x) = \gamma_d(x- {\widehat}\theta) \quad \textrm{and} \quad \quad{\widehat}G_d(x) = \gamma_d(x-{\widehat}\mu) \,.$$ Using simple algebra, we get $$\begin{aligned}
\lefteqn{T_1:= \mathbb{P}_f ( | {\widehat}\eta_d(X) - \eta_d(X) | > {\varepsilon}) } \nonumber \\
& = & \mathbb{P}_f\left(  \left| \frac{{\widehat}F_d(X)}{{\widehat}F_d(X) + {\widehat}G_d(X) } - \frac{F_d(X)}{F_d(X)+G_d(X)}      \right| > {\varepsilon}\right)  \nonumber \\
& {\leqslant}& \mathbb{P}_f\left(  \left| \frac{{\widehat}F_d(X)- F_d(X)}{ F_d(X) +  G_d(X) } + {\widehat}F_d(X) \left( \frac{1}{{\widehat}F_d(X)+{\widehat}G_d(X)} -\frac{1}{F_d(X)+G_d(X)} \right)      \right| > {\varepsilon}\right) \nonumber  \\
& {\leqslant}& \mathbb{P}_f\left(  \left| \frac{{\widehat}F_d(X)- F_d(X)}{ F_d(X) + G_d(X) }  \right| > \frac{{\varepsilon}}{3} \right)  + \mathbb{P}_f \left( \left|  {\widehat}F_d(X) \left( \frac{1}{{\widehat}F_d(X)+{\widehat}G_d(X)} -\frac{1}{F_d(X)+G_d(X)} \right)      \right| > \frac{2 {\varepsilon}}{3} \right)  \nonumber \\
& =: & \mathbb{P}(A_1) + \mathbb{P}(A_2) \,.
\label{eq:pa12}\end{aligned}$$  \
**Control of $\mathbb{P}(A_1)$.** First note that $$\begin{aligned}
 \mathbb{P}(A_1) 
 & = & \mathbb{P}_f\left( | {\widehat}F_d(X) - F_d(X) | > \frac{{\varepsilon}}{3} (F_d(X)+G_d(X)) \right) \nonumber \\ 
 & {\leqslant}& \mathbb{P}_f\left( |{\widehat}F_d(X) - F_d(X) | > \frac{{\varepsilon}}{3} F_d(X) \right) \label{eq:FdFdhat} \\
 & = & \mathbb{P}_f\left( \bigl| {\widehat}F_d(X) /F_d(X) -1 \bigr| > \frac{{\varepsilon}}{3}\right) \nonumber\\
 & = & \mathbb{P}_f \left( \left|  e^{\langle {\mathbf{X}}_d-({\widehat}{\theta}+ {\boldsymbol{\theta}}_d)/2 , {\widehat}{\theta} - {\boldsymbol{\theta}}_d \rangle} -1    \right| > \frac{{\varepsilon}}{3}   \right) \,. \nonumber\end{aligned}$$ Since we have $-\log(1-u) {\geqslant}\log(1+u) {\geqslant}u/2$ for $u \in (0,1)$, some straightforward computations yield: $$\begin{aligned}
 \mathbb{P}(A_1) 
 & {\leqslant}& \mathbb{P}_f \left( \left| \left\langle {\mathbf{X}}_d-\frac{{\widehat}{\theta}+ {\boldsymbol{\theta}}_d}{2} , {\widehat}{\theta} - {\boldsymbol{\theta}}_d \right\rangle \right| > \log\left(1+\frac{{\varepsilon}}{3}\right) \right) \\
& {\leqslant}& \mathbb{P}_f \left( \left| \left\langle {\mathbf{X}}_d-\frac{{\widehat}{\theta}+ {\boldsymbol{\theta}}_d}{2} , {\widehat}{\theta} - {\boldsymbol{\theta}}_d \right\rangle \right| > \frac{{\varepsilon}}{6}\right) \\
 & = & \mathbb{P}_f \left( \left|\left\langle {\mathbf{X}}_d-{\boldsymbol{\theta}}_d +\frac{{\boldsymbol{\theta}}_d- {\widehat}{\theta}}{2} , {\widehat}{\theta} - {\boldsymbol{\theta}}_d \right\rangle \right| > \frac{{\varepsilon}}{6} \right) \\
 & {\leqslant}& \mathbb{P}_f \left( \left|\left\langle {\mathbf{X}}_d-{\boldsymbol{\theta}}_d , {\widehat}{\theta} - {\boldsymbol{\theta}}_d \right\rangle \right| > \frac{{\varepsilon}}{6} - \frac{\|{\widehat}{\theta} - {\boldsymbol{\theta}}_d\|^2}{2} \right) \,.
 \end{aligned}$$ Now, note from , –, and Remark \[rmk:conditionallyGaussian\] that, under $\mathbb{P}_{\otimes^n} \otimes {\mathbb{P}}_f$ and on the event $\{N_1 > 0\}$, the random variables $\xi_j := X_{d,j}-\theta_{d,j} = \langle \varphi_j , X \rangle - \theta_j$, $1 {\leqslant}j {\leqslant}d$, and $$\zeta_j := \sqrt{N_1} \left({\widehat}\theta_{j} - \theta_{d,j}\right) = \frac{1}{\sqrt{N_1}} \sum_{i=1}^{N_1} {\varepsilon}^1_{i,j} \,, \qquad 1 {\leqslant}j {\leqslant}d\,,$$ are i.i.d. ${\mathcal{N}}(0,1)$ conditionally on $Y_{1:n} := (Y_1,\ldots,Y_n)$. (On the event $\{N_1=0\}$, we define the $\zeta_j$ so as to coincide with other independent ${\mathcal{N}}(0,1)$ random variables $\zeta'_j$.) As a consequence, the random variables $\xi_1,\ldots,\xi_d,\zeta_1,\ldots,\zeta_d$ are i.i.d. ${\mathcal{N}}(0,1)$ (unconditionally).

 \
Note also from Hoeffding’s lemma (see, [e.g.]{}, [@BLM]) and $n/2 - \sqrt{n \log(n)/2} {\geqslant}n/4$ (because $n {\geqslant}27$) that $${\mathbb{P}}\left( N_1 < \frac{n}{4} \right) {\leqslant}{\mathbb{P}}\left( N_1 < \frac{n}{2} - \sqrt{\frac{n \log n}{2}} \right) {\leqslant}\frac{1}{n} \;.
\label{eq:Hoeffdingn4}$$ Therefore, we deduce that $$\begin{aligned}
 \mathbb{P}(A_1) & {\leqslant}& \mathbb{P}_f \left( \left|\left\langle {\mathbf{X}}_d-{\boldsymbol{\theta}}_d , {\widehat}{\theta} - {\boldsymbol{\theta}}_d \right\rangle \right| > \frac{{\varepsilon}}{6} - \frac{\|{\widehat}{\theta} - {\boldsymbol{\theta}}_d\|^2}{2}\,, N_1 {\geqslant}\frac{n}{4} \right) + 
 \, {\mathbb{P}}\left( N_1 < \frac{n}{4} \right) \nonumber \\
&{\leqslant}& \mathbb{P} \left( \left| \sum_{j=1}^d \xi_j \zeta_j \right| {\geqslant}\frac{\sqrt{N_1} {\varepsilon}}{6} - \frac{\|\zeta\|^2}{2 \sqrt{N_1}} \,, N_1 {\geqslant}\frac{n}{4} \right)  + \frac{1}{n} \nonumber \\
&{\leqslant}& \mathbb{P} \left( \left| \sum_{j=1}^d \xi_j \zeta_j \right| {\geqslant}\frac{\sqrt{n} {\varepsilon}}{12} - \frac{\|\zeta\|^2}{\sqrt{n}} \right)  + \frac{1}{n} \nonumber \\
&{\leqslant}& \mathbb{P} \left( \left| \sum_{j=1}^d \xi_j \zeta_j \right| {\geqslant}\frac{\sqrt{n} {\varepsilon}}{24} \right) + \mathbb{P} \left( \|\zeta\|^2 > \frac{n {\varepsilon}}{24} \right)  + \frac{1}{n} \,. \label{eq:PA1twodeviations}\end{aligned}$$ We control the first deviation probability above. First, recalling that the $\xi_j$ and $\zeta_j$ are i.i.d. ${\mathcal{N}}(0,1)$, and conditioning by $(\xi_1,\ldots,\xi_d)$, we get $$\mathbb{P} \left( \left| \sum_{j=1}^d \xi_j \zeta_j \right| {\geqslant}\frac{\sqrt{n} {\varepsilon}}{24} \right)  {\leqslant}\mathbb{E} \left[  \mathbb{P} \left(    \left| \sum_{j=1}^d \xi_j \zeta_j \right| {\geqslant}\frac{\sqrt{n} {\varepsilon}}{24} \; \Big| \; \xi_1,\dots,\xi_d    \right)  \right] {\leqslant}2 \, \mathbb{E} \left[  \exp \left(  - \frac{n {\varepsilon}^2}{1152 \sum_{j=1}^d \xi_j^2} \right) \right]\,, \nonumber$$ where the last inequality is because, conditionally on $(\xi_1,\ldots,\xi_d)$, the random variable $Z=\sum_{j=1}^d \xi_j \zeta_j$ is Gaussian with zero mean and variance $V=\sum_{j=1}^d \xi_j^2$ and thus satisfies ${\mathbb{P}}(|Z| > z \, | \, \xi_1,\dots,\xi_d) {\leqslant}2 e^{-z^2/(2 V)}$ for all $z>0$. But, distinguishing whether $\sum_{j=1}^d \xi_j^2$ is below or above $4 d \log n$, we obtain $$\begin{aligned}
\mathbb{P} \left( \left| \sum_{j=1}^d \xi_j \zeta_j \right| {\geqslant}\frac{\sqrt{n} {\varepsilon}}{24} \right) & {\leqslant}2 \exp\!\left( \!- \frac{n {\varepsilon}^2}{4608 d \log n } \right) + 2 {\mathbb{P}}\!\left(\sum_{j=1}^d \xi_j^2 > 4 d \log n\right) {\leqslant}2 \exp\!\left(\! - \frac{n {\varepsilon}^2}{4608 d \log n } \right) + \frac{2}{n} \,,\end{aligned}$$ where we used the concentration inequality for the $\chi^2$ statistics of [@Beatrice2000 Lemma 1] $$\forall x >0\,, \qquad \mathbb{P}\left( \sum_{j=1}^d \xi_j^2 > d + 2 \sqrt{d x} + 2x   \right) {\leqslant}e^{-x}
\label{eq:chi2concentration}$$ for $x=\log(n)$, and where we noted (since $2 a b {\leqslant}a^2 + b^2$ and $\log n {\geqslant}2$ for $n {\geqslant}27$) that $$d + 2 \sqrt{d \log n} + 2 \log n {\leqslant}2d + 3 \log n {\leqslant}4 d \log n \,.
\label{eq:bounddlogn}$$ Plugging the above inequalities into , we finally obtain $$\mathbb{P}(A_1) {\leqslant}2 \exp \left(  - \frac{n {\varepsilon}^2}{4608 d \log n } \right) + \mathbb{P} \left( \|\zeta\|^2 > \frac{n {\varepsilon}}{24} \right) + \frac{3}{n} \,.
\label{eq:PA1bound}$$

 \
**Control of $\mathbb{P}(A_2)$.** We have: $$\begin{aligned}
\mathbb{P}(A_2) 
& := & \mathbb{P}_f \left( \left|  {\widehat}F_d(X) \left( \frac{1}{{\widehat}F_d(X)+{\widehat}G_d(X)} -\frac{1}{F_d(X)+G_d(X)} \right)      \right| > \frac{2{\varepsilon}}{3} \right) \\
& = & \mathbb{P}_f \left( \left|  {\widehat}F_d(X) \left( \frac{F_d(X)- {\widehat}F_d(X) + G_d(X) - {\widehat}G_d(X)}{({\widehat}F_d(X)+{\widehat}G_d(X))(F_d(X)+G_d(X))} \right)      \right| > \frac{2{\varepsilon}}{3} \right) \\
& {\leqslant}& \mathbb{P}_f \left( \left|  {\widehat}F_d(X) (F_d(X)- {\widehat}F_d(X) ) \right| > \frac{{\varepsilon}}{3} (F_d(X)+ G_d(X)) ({\widehat}F_d(X) + {\widehat}G_d(X)) \right) \\
&  & + \, \mathbb{P}_f \left( \left|  {\widehat}F_d(X) (G_d(X)- {\widehat}G_d(X) ) \right| > \frac{{\varepsilon}}{3} (F_d(X)+ G_d(X)) ({\widehat}F_d(X) + {\widehat}G_d(X)) \right) \\
& {\leqslant}& \mathbb{P}_f \left( \left|  {\widehat}F_d(X) (F_d(X)- {\widehat}F_d(X) ) \right| > \frac{{\varepsilon}}{3} F_d(X){\widehat}F_d(X)  \right) \\
&  & + \, \mathbb{P}_f \left( \left|  {\widehat}F_d(X) (G_d(X)- {\widehat}G_d(X) ) \right| > \frac{{\varepsilon}}{3}  G_d(X) {\widehat}F_d(X) \right) \\
& {\leqslant}& \mathbb{P}_f \left( \left| F_d(X)- {\widehat}F_d(X)  \right| > \frac{{\varepsilon}}{3} F_d(X) \right)  + \mathbb{P}_f \left( \left|  G_d(X)- {\widehat}G_d(X)  \right| > \frac{{\varepsilon}}{3}  G_d(X)  \right) \,. \\\end{aligned}$$ The first term has already been studied above (see  and the following inequalities) and thus satisfies the same upper bound as $\mathbb{P}(A_1)$ in . As for the second term, following the same lines as those leading to , we can see that $$\begin{aligned}
& \mathbb{P}_f \left( \left|  G_d(X)- {\widehat}G_d(X)  \right| > \frac{{\varepsilon}}{3}  G_d(X)  \right) \\
& \qquad {\leqslant}\mathbb{P}_f \left( \left| \left\langle {\mathbf{X}}_d-\frac{{\widehat}{\mu}+ {\boldsymbol{\mu}}_d}{2} , {\widehat}{\mu} - {\boldsymbol{\mu}}_d \right\rangle \right| > \frac{{\varepsilon}}{6}\right) \\
& \qquad {\leqslant}\mathbb{P}_f \left( \Big| \big\langle {\mathbf{X}}_d-{\boldsymbol{\theta}}_d, {\widehat}{\mu} - {\boldsymbol{\mu}}_d \big\rangle \Big| > \frac{{\varepsilon}}{6} - \left|\left\langle {\boldsymbol{\theta}}_d - {\boldsymbol{\mu}}_d + \frac{{\boldsymbol{\mu}}_d - {\widehat}{\mu}}{2}, {\widehat}{\mu} - {\boldsymbol{\mu}}_d \right\rangle\right|\right) \\
& \qquad {\leqslant}\mathbb{P}_f \biggl( \Big| \big\langle {\mathbf{X}}_d-{\boldsymbol{\theta}}_d, {\widehat}{\mu} - {\boldsymbol{\mu}}_d \big\rangle \Big| > \frac{{\varepsilon}}{6} - \underbrace{\left(\|{\boldsymbol{\theta}}_d - {\boldsymbol{\mu}}_d\| + \frac{\|{\widehat}{\mu} - {\boldsymbol{\mu}}_d\|}{2}\right) \|{\widehat}{\mu} - {\boldsymbol{\mu}}_d\|}_{{\leqslant}4 \bigl(\Delta_d + 2 \sqrt{\frac{d\log(n)}{n}} \, \bigr) \sqrt{\frac{d\log(n)}{n}} \textrm{ w.p. ${\geqslant}1-2/n$}} \, \biggr) \\
& \qquad {\leqslant}\mathbb{P}_f \left( \Big| \big\langle {\mathbf{X}}_d-{\boldsymbol{\theta}}_d, {\widehat}{\mu} - {\boldsymbol{\mu}}_d \big\rangle \Big| > \frac{{\varepsilon}}{12} \right) + \frac{2}{n} \,,\end{aligned}$$ where we used  and – again, and where the last inequality holds true whenever $$\left(\Delta_d + 2 \sqrt{\frac{d\log(n)}{n}} \, \right) \sqrt{\frac{d\log(n)}{n}} {\leqslant}\frac{{\varepsilon}}{48} \,.
\label{eq:conditionDeltadEpsilon}$$ Mimicking what we did to derive , we then get $$\begin{aligned}
\mathbb{P}_f\!\left( \left|  G_d(X)- {\widehat}G_d(X)  \right| > \frac{{\varepsilon}}{3}  G_d(X)  \right) & {\leqslant}\mathbb{P}\!\left( \left| \sum_{j=1}^d \xi_j \zeta_j \right| {\geqslant}\frac{\sqrt{n} {\varepsilon}}{24} \right) + \frac{1}{n} + \frac{2}{n} {\leqslant}2 \exp \left(  - \frac{n {\varepsilon}^2}{4608 d \log n } \right) + \frac{5}{n} \,.\end{aligned}$$ Putting everything together, we can see that, provided  holds, $$\mathbb{P}(A_2)  {\leqslant}4 \exp \left(  - \frac{n {\varepsilon}^2}{4608 d \log n } \right) + \mathbb{P} \left( \|\zeta\|^2 > \frac{n {\varepsilon}}{24} \right) + \frac{8}{n} \,.$$

 \
**Conclusion** Combining all results above, we get, under condition , $$T_1 = \mathbb{P}(A_1) + \mathbb{P}(A_2) {\leqslant}6 \exp \left(  - \frac{n {\varepsilon}^2}{4608 d \log n } \right) + 2 \, \mathbb{P} \left( \|\zeta\|^2 > \frac{n {\varepsilon}}{24} \right) + \frac{11}{n}$$ so that (the upper bound on $T_2$ is identical by symmetry of the problem): $$\mathbb{P} ( | {\widehat}\eta_d(X) - \eta_d(X) | > {\varepsilon}) {\leqslant}6 \exp \left(  - \frac{n {\varepsilon}^2}{4608 d \log n } \right) + 2 \, \mathbb{P} \left( \|\zeta\|^2 > \frac{n {\varepsilon}}{24} \right) + \frac{11}{n} \,.$$ To conclude the proof, we note that, if  holds true, then $n{\varepsilon}/24 {\geqslant}4 d \log n {\geqslant}d + 2 \sqrt{d \log n} + 2 \log n$ (by ), so that $\mathbb{P}\bigl( \|\zeta\|^2 > n {\varepsilon}/24\bigr) {\leqslant}1/n$ by .

Proof of Theorem \[prop:minmax\] (excess risk of ${\widehat}{\Phi}_{d_n}$) {#s:pminmax}
--------------------------------------------------------------------------

In all the sequel we fix $f,g \in {\mathcal{H}_s}(R)$ and show that $$\mathcal{R}_{f,g}({\widehat}\Phi_{d_n}) - \inf_{\Phi} \mathcal{R}_{f,g}(\Phi)  {\leqslant}\left\{\begin{array}{ll}
    c \, R^{\frac{1}{2s+1}} n^{-\frac{s}{2s+1}} \log(n) & \textrm{if } \Delta < R^{\frac{1}{2s+1}} n^{-\frac{s}{2s+1}} \log(n) \\[0.2em]
    \displaystyle \frac{c}{\Delta} R^{\frac{2}{2s+1}} n^{-\frac{2s}{2s+1}} \log^2(n) & \textrm{if } \Delta {\geqslant}R^{\frac{1}{2s+1}} n^{-\frac{s}{2s+1}} \log(n)
\end{array}\right.
\label{eq:thm1-upperboundfg}$$ where $\Delta := \|f-g\|$. This immediately entails the inequality of the theorem ([i.e.]{}, the one involving the supremum) since the right-hand side of  is non-increasing in $\Delta$.

 \
Recall that $\Phi = \mathds{1}_{\eta {\geqslant}1/2}$ is the Bayes (optimal) classifier and that $\Phi_{d_n}^\star$ is the Bayes classifier in the $d_n$-dimensional truncated space (see Remark \[rmk:truncatedSpace\] in Section \[sec:estimationerror\]). We decompose the excess risk into estimation and approximation errors and use Lemmas \[lem:proj\] and \[prop:CO\]: for some values of ${\varepsilon}_1$ and ${\varepsilon}_2$ to be determined later, $$\begin{aligned}
& \mathcal{R}_{f,g}({\widehat}\Phi_{d_n}) - \inf_{\Phi} \mathcal{R}_{f,g}(\Phi) \nonumber \\
& \qquad = \mathcal{R}_{f,g}({\widehat}\Phi_{d_n}) - \mathcal{R}_{f,g}(\Phi_{d_n}^\star) + \mathcal{R}_{f,g}(\Phi_{d_n}^\star) - \mathcal{R}_{f,g}(\Phi^\star) \nonumber \\
& \qquad {\leqslant}2 {\varepsilon}_1 \left( 1\wedge \frac{10 {\varepsilon}_1}{\Delta_{d_n}}  \right) + 6 \exp \left(  - \frac{n {\varepsilon}_1^2}{4608 \, d_n \log n } \right) + \frac{13}{n} + 12 {\varepsilon}_2^2 + 2 {\varepsilon}_2 \left( 1 \wedge \frac{10{\varepsilon}_2}{\Delta} \right) \nonumber \\
& \qquad {\leqslant}2 {\varepsilon}_1 \left( 1\wedge \frac{10 {\varepsilon}_1}{\Delta_{d_n}}  \right) + \frac{19}{n} + 12 {\varepsilon}_2^2 + 2 {\varepsilon}_2 \left( 1 \wedge \frac{10{\varepsilon}_2}{\Delta} \right) \,, \label{eq:thm1-boundtooptimize}\end{aligned}$$ where $\Delta_{d_n} := \|f_{d_n}-g_{d_n}\|$, and where we assumed that ${\varepsilon}_1^2 {\geqslant}4608 \, d_n \log^2(n) / n$ (to be checked below).

 \
In all the sequel the value of the constant $N_{s,R}$ may change from line to line. Our first constraint on $N_{s,R}$ is that $N_{s,R} {\geqslant}1/R^2$, so that $d_n := \lfloor (R^2 n)^{\frac{1}{2s+1}} \rfloor {\geqslant}1$ for all $n {\geqslant}N_{s,R}$. The choice of $d_n$ also guarantees the bias–variance tradeoff $R d_n^{-s} \approx \sqrt{d_n/n} \approx R^{\frac{1}{2s+1}} n^{-\frac{s}{2s+1}}$. More precisely, provided $N_{s,R}$ is chosen large enough, we get for all $n {\geqslant}N_{s,R}$ that $$\sqrt{\frac{d_n}{n}} {\leqslant}R^{\frac{1}{2s+1}} n^{-\frac{s}{2s+1}} {\leqslant}R d_n^{-s} {\leqslant}2 R^{\frac{1}{2s+1}} n^{-\frac{s}{2s+1}} \,.
\label{eq:biasvariancelink}$$

 \
We now choose ${\varepsilon}_1$ and ${\varepsilon}_2$ so as to minimize , while meeting the assumptions of Lemmas \[lem:proj\] and \[prop:CO\].

-   We choose $${\varepsilon}_1 := 48 \left(\Delta_{d_n} + 2 \sqrt{\frac{d_n\log(n)}{n}} + \sqrt{2 \log(n)} \, \right) \sqrt{\frac{d_n\log(n)}{n}} \;.$$ This entails that $0 < {\varepsilon}_1 {\leqslant}1/8$ for all $n {\geqslant}N_{s,R}$ (provided $N_{s,R}$ is chosen large enough), that Assumption  of Lemma \[lem:proj\] holds true, and that the requirement ${\varepsilon}_1^2 {\geqslant}4608 \, d_n \log^2(n) / n$ above is met.

-   We choose $${\varepsilon}_2 := 32 R d_n^{-s} \sqrt{\log \frac{1}{32 R d_n^{-s}}} \;.$$ Choosing $N_{s,R}$ large enough, we can guarantee for all $n {\geqslant}N_{s,R}$ that $0 < {\varepsilon}_2 {\leqslant}1/8$, as well as $\log\bigl[1/(32 R d_n^{-s})\bigr] {\geqslant}1$ so that ${\varepsilon}_2 {\geqslant}32 R d_n^{-s}$ and therefore ${\varepsilon}_2 {\geqslant}32 R d_n^{-s} \sqrt{\log(1/{\varepsilon}_2)}$, [i.e.]{}, $$R^2 d_n^{-2s} {\leqslant}\frac{{\varepsilon}_2^2}{512 \log\bigl(1/{\varepsilon}_2^2\bigr)} \,.$$ Now, note that $\|f-f_{d_n}\|^2 {\leqslant}R^2 d_n^{-2s}$ for all $f \in {\mathcal{H}_s}(R)$ because $$\|f-f_{d_n}\|^2 = \sum_{k=d_n+1}^{+\infty} c_k(f)^2 {\leqslant}d_n^{-2s} \sum_{k=d_n+1}^{+\infty} c_k(f)^2 k^{2s} {\leqslant}R^2 d_n^{-2s} \,.$$ Combining the above inequalities implies that Assumption  of Lemma \[prop:CO\] is met.

 \
Before plugging the values of ${\varepsilon}_1$ and ${\varepsilon}_2$ into , we compare $\Delta_{d_n}$ with $\Delta$: $$\begin{aligned}
\Delta_{d_n} & := \|f_{d_n}-g_{d_n}\| {\geqslant}\|f-g\| - \|f-f_{d_n}\| - \|g-g_{d_n}\| {\geqslant}\Delta - 2 R d_n^{-s} {\geqslant}\frac{\Delta}{10} \label{eq:Deltan}\end{aligned}$$ whenever $\Delta {\geqslant}(20/9) R d_n^{-s}$. By  a sufficient condition is that $\Delta {\geqslant}(40/9)R^{\frac{1}{2s+1}} n^{-\frac{s}{2s+1}}$ or even that $\Delta {\geqslant}R^{\frac{1}{2s+1}} n^{-\frac{s}{2s+1}} \log(n)$ (provided $N_{s,R} {\geqslant}e^{40/9} \approx 85.2$). This is the threshold value we use below, since it makes the righ-hand side of  continuous in $\Delta$.

 \
**Case 1: $\Delta < R^{\frac{1}{2s+1}} n^{-\frac{s}{2s+1}} \log(n)$**.

 \
We substitute the values of ${\varepsilon}_1$ and ${\varepsilon}_2$ into  and discard the (relatively large) terms $10 \, {\varepsilon}_1/\Delta_{d_n}$ and $10 \, {\varepsilon}_2/\Delta$. We obtain, noting that $12 {\varepsilon}_2^2 {\leqslant}12 {\varepsilon}_2/8 {\leqslant}2 {\varepsilon}_2$: $$\begin{aligned}
& \mathcal{R}_{f,g}({\widehat}\Phi_{d_n}) - \inf_{\Phi} \mathcal{R}_{f,g}(\Phi) {\leqslant}2 {\varepsilon}_1 + \frac{19}{n} + 12 {\varepsilon}_2^2 + 2 {\varepsilon}_2 {\leqslant}2 {\varepsilon}_1 + 4 {\varepsilon}_2 + \frac{19}{n} \nonumber \\
& \qquad {\leqslant}96 \left(\Delta_{d_n} + 2 \sqrt{\frac{d_n\log(n)}{n}} + \sqrt{2 \log(n)} \, \right) \sqrt{\frac{d_n\log(n)}{n}} + 128 R d_n^{-s} \sqrt{\log \frac{1}{32 R d_n^{-s}}} + \frac{19}{n} \nonumber \\
& \qquad {\leqslant}96 \left(2 R + 2 R^{\frac{1}{2s+1}} n^{-\frac{s}{2s+1}} \sqrt{\log(n)} + \sqrt{2 \log(n)} \, \right) R^{\frac{1}{2s+1}} n^{-\frac{s}{2s+1}} \sqrt{\log(n)} \nonumber \\
& \qquad \qquad + 256 R^{\frac{1}{2s+1}} n^{-\frac{s}{2s+1}} \sqrt{\log \frac{n^{\frac{s}{2s+1}}}{32 R^{\frac{1}{2s+1}}}} + \frac{19}{n} \nonumber \\
& \qquad {\leqslant}c_1 R^{\frac{1}{2s+1}} n^{-\frac{s}{2s+1}} \log(n) \,, \label{eq:thm1case1}\end{aligned}$$ where the inequality before last follows from  and from $\Delta_{d_n} {\leqslant}\Delta {\leqslant}\|f\|+\|g\| {\leqslant}2 R$ (since $f,g \in {\mathcal{H}_s}(R)$), and where  holds for all $n {\geqslant}N_{s,R}$ provided the absolute constant $c_1 > 0$ and the constant $N_{s,R}$ are chosen large enough.

 \
**Case 2: $\Delta {\geqslant}R^{\frac{1}{2s+1}} n^{-\frac{s}{2s+1}} \log(n)$**.

 \
Following similar calculations, but using now the (relatively small) terms $10 \, {\varepsilon}_1/\Delta_{d_n}$ and $10 \, {\varepsilon}_2/\Delta$, we can see from  and then  that, for some absolute constants $c_2,c_3 > 0$, $$\begin{aligned}
& \mathcal{R}_{f,g}({\widehat}\Phi_{d_n}) - \inf_{\Phi} \mathcal{R}_{f,g}(\Phi) {\leqslant}\frac{20 {\varepsilon}_1^2}{\Delta_{d_n}}  + \frac{19}{n} + 12 {\varepsilon}_2^2 + \frac{20{\varepsilon}_2^2}{\Delta} {\leqslant}\frac{200 {\varepsilon}_1^2}{\Delta} + \frac{20{\varepsilon}_2^2}{\Delta} + 12 {\varepsilon}_2^2 + \frac{19}{n} \nonumber \\
& \qquad {\leqslant}c_2 R^{\frac{2}{2s+1}} n^{-\frac{2s}{2s+1}} \left(\frac{\log^2(n)}{\Delta} + \frac{\log(n)}{\Delta} + \log(n) \right) + \frac{19}{n} \nonumber \\
& \qquad {\leqslant}\frac{c_3 R^{\frac{2}{2s+1}} n^{-\frac{2s}{2s+1}} \log^2(n)}{\Delta} \,, \label{eq:thm1case2}\end{aligned}$$ where the last two inequalities hold true for all $n {\geqslant}N_{s,R}$ provided $N_{s,R}$ is chosen large enough ([e.g.]{}, $\log^2(n)/\Delta {\geqslant}\log(n)$ when $n {\geqslant}e^{2R} {\geqslant}e^{\Delta}$).

 \
**Conclusion:** We derive by combining  and  and by choosing $c:=\max\{c_1,c_3\}$. This concludes the proof of Theorem \[prop:minmax\].

Proof of the minimax lower bound (Theorem \[thm:minimaxlowerbound\]) {#s:minimaxlowerbound}
====================================================================

This section contains the proof of our minimax lower bound (Theorem \[thm:minimaxlowerbound\]). We will pay a specific attention to the influence of the separation distance $\Delta = \|f-g\|$ on the misclassification rate. We directly start with the proof in Section \[sec:LBproof-main\] below. We will use several key technical ingredients gathered in Section \[sec:proof-lowerbound-packing\].

Proof of Theorem \[thm:minimaxlowerbound\] {#sec:LBproof-main}
------------------------------------------

: $\Delta < R^{1/(2s+1)} \, n^{-s/(2s+1)}$. Note that $$\Bigl\{ (f,g) \in {\mathcal{H}_s}(R) \times {\mathcal{H}_s}(R): \, \|f-g\| {\geqslant}\Delta \Bigr\} \supseteq \Bigl\{ (f,g) \in {\mathcal{H}_s}(R) \times {\mathcal{H}_s}(R): \, \|f-g\| {\geqslant}R^{1/(2s+1)} \, n^{-s/(2s+1)} \Bigr\} \,.$$ Therefore, taking the supremum over all such functions, we directly obtain a lower bound on the minimax excess risk by applying the lower bound $\bigl(c e^{-2 \Delta^2}/\Delta\bigr) R^{2/(2s+1)} n^{-2s/(2s+1)}$ of the second case below with $\Delta = R^{1/(2s+1)} \, n^{-s/(2s+1)}$. This yields the desired lower bound of $c e^{-2 R^{2/(2s+1)}} R^{1/(2s+1)} n^{-s/(2s+1)}$.\
: $\Delta {\geqslant}R^{1/(2s+1)} \, n^{-s/(2s+1)}$. We proceed in three main steps.

[**Step 1: reduction to a finite-dimensional $\mathbb{L}^1$-estimation problem, and some notation.**  ]{}

*Finite-dimensional construction.* Let ${\widehat}{\Phi}$ be any classifier built from the sample $(X_i,Y_i)_{1 {\leqslant}i {\leqslant}n}$. As is usual when deriving nonparametric lower bounds, we restrict the supremum over all $f,g \in {\mathcal{H}}_s(R)$ to a well-chosen finite-dimensional subset. More precisely, in what follows, we restrict our attention to functions $f:[0,1] \to {\mathbb{R}}$ and $g:[0,1] \to {\mathbb{R}}$ of the form: $$\forall  t \in \mathbb{R}, \qquad f(t)=f_{\theta}(t) {:=}\sum_{j=1}^d \theta_j \varphi_j(t) \,, \quad \theta \in \Theta\,, \qquad \textrm{and} \qquad g(t) = 0 \,,$$ for some $d \in {\mathbb{N}}^*$ and some parameter set $\Theta \subseteq \bigl\{\theta \in {\mathbb{R}}^d: \, \theta_1 = \Delta \textrm{ and } \sum_{j=2}^d \theta_j^2 j^{2s} {\leqslant}R^2 - \Delta^2\bigr\}$ to be made more precise in Step 2 below. Note that $\langle f_{\theta},\varphi_j\rangle=\theta_j$, so that the notation $\theta_j$ is consistent with that of Section \[sec:pluginFinitedim\].\
*Some notation.* The notation we choose for this proof differs slightly from that of the rest of the paper. We write ${\mathbb{P}}_{\theta}$ for the joint distribution of the training and test samples $\bigl((X_i,Y_i)_{1 {\leqslant}i {\leqslant}n},(X,Y)\bigr)$ when the true parameter is $\theta$, and denote by ${\mathbb{E}}_{\theta}$ the corresponding expectation. We also denote by $Q_{\theta}$ the distribution of the process $(Z_t)_{0 {\leqslant}t {\leqslant}1}$ defined by $d Z_t = f_{\theta}(t) d t + d W(t)$. We define the $\mathbb{L}^1$-norm of $h$ by $$\|h\|_{L^1(Q_0)} {:=}\int |h(x)| {\textrm{d}}Q_0(x) = {\mathbb{E}}\bigl[|h(W)|\bigr].$$ Finally, for $X=(X(t))_{0 {\leqslant}t {\leqslant}1}$ solution of , we set $${\widetilde}{X}_j {:=}\langle \varphi_j,X \rangle = \int_0^1 \varphi_j(t) d X(t) \;.$$ Note that when $X$ is a standard Brownian motion on $[0,1]$, then $({\widetilde}{X}_j)_{j {\geqslant}1}$, are independent standard Gaussian random variables (since $(\varphi_j)_{j {\geqslant}1}$ is an orthonormal basis).

 \
*Reduction to an $\mathbb{L}^1$-estimation problem.* Note that $g = 0 \in {\mathcal{H}_s}(R)$ and $\{f_{\theta}: \theta \in \Theta\} \subseteq {\mathcal{H}_s}(R)$ (see the definition in ), and that $\|f_{\theta}-0\| = \|\theta\| {\geqslant}\Delta$ for all $\theta \in \Theta$ (we use the notation $\|.\|$ both in $\mathbb{L}^2([0,1])$ and in ${\mathbb{R}}^d$). Therefore, $$\begin{aligned}
\sup_{\substack{f,g \in {\mathcal{H}_s}(R) \\ \|f-g\| {\geqslant}\Delta}} \left\{ \mathcal{R}_{f,g}({\widehat}\Phi) - \inf_{\Phi} \mathcal{R}_{f,g}(\Phi)  \right\} & {\geqslant}\sup_{\theta \in \Theta} \left\{ \mathcal{R}_{f_{\theta},0}({\widehat}\Phi) - \inf_{\Phi} \mathcal{R}_{f_{\theta},0}(\Phi)  \right\}  \nonumber \\
& =  \sup_{\theta \in \Theta} {\mathbb{E}}_{\theta}\!\left[ \big|2 \eta_{\theta} (X) - 1 \big | {\mathds{1}_{{\widehat}{\Phi}(X) \neq \Phi_{\theta}(X)}} \right], \label{eq:minimaxLB-Bayesformula}\end{aligned}$$ where $\eta_{\theta}(x) = {\mathbb{P}}_{\theta}(Y=1|X=x)$ denotes the regression function corresponding to the statistical model  with $f = f_{\theta}$ and $g=0$, and where $\Phi_{\theta}(x) = {\mathds{1}_{\eta_{\theta}(x) {\geqslant}1/2}}$ is the associated Bayes classifier.

But, for all $\theta \in \Theta$ and any $\delta \in (0,1/4)$ (to be chosen later), we have $$\begin{aligned}
{\mathbb{E}}_{\theta}\!\left[ \big|2 \eta_{\theta} (X) - 1 \big | {\mathds{1}_{{\widehat}{\Phi}(X) \neq \Phi_{\theta}(X)}} \right] & {\geqslant}\delta \, {\mathbb{P}}_{\theta}\!\left( \bigl\{|2 \eta_{\theta} (X) - 1| {\geqslant}\delta\bigr\} \cap \bigl\{{\widehat}{\Phi}(X) \neq \Phi_{\theta}(X)\bigr\} \right) \nonumber \\
& {\geqslant}\delta \left( {\mathbb{P}}_{\theta}\bigl({\widehat}{\Phi}(X) \neq \Phi_{\theta}(X) \bigr) - {\mathbb{P}}_{\theta}\bigl(|2 \eta_{\theta} (X) - 1| < \delta\bigr) \right) \nonumber \\
& {\geqslant}\delta \left( {\mathbb{P}}_{\theta}\bigl({\widehat}{\Phi}(X) \neq \Phi_{\theta}(X) \bigr) - \frac{5 \delta}{\Delta} \right), \label{eq:minimaxLB-1}\end{aligned}$$ where the last inequality follows from Proposition \[thm:margin\]. Next, we use a conditional argument to handle the probability above given the training sample $(X_i,Y_i)_{1 {\leqslant}i {\leqslant}n}$: the process $X=(X(t))_{0 {\leqslant}t {\leqslant}1}$ defined in is independent from the training sample and has distribution $(Q_0+Q_{\theta})/2$ under ${\mathbb{P}}_{\theta}$ (recall that $Q_{\theta}$ denotes the distribution of the process $(Z_t)_{0 {\leqslant}t {\leqslant}1}$ defined by $d Z_t = f_{\theta}(t) d t + d W(t)$). Therefore, for all $\theta \in \Theta$, $$\begin{aligned}
{\mathbb{P}}_{\theta}\Bigl( {\widehat}{\Phi}(X) \neq \Phi_{\theta}(X) \Bigr) & = {\mathbb{E}}_{\theta} \biggl\{ {\mathbb{P}}_{\theta}\Bigl( {\widehat}{\Phi}(X) \neq \Phi_{\theta}(X) \, \Big| \, (X_i,Y_i)_{1 {\leqslant}i {\leqslant}n} \Bigr) \biggr\} \nonumber \\
& = {\mathbb{E}}_{\theta} \biggl\{ \int {\mathds{1}_{{\widehat}{\Phi}(x) \neq \Phi_{\theta}(x)}} \frac{{\textrm{d}}Q_0(x) + {\textrm{d}}Q_{\theta}(x)}{2} \biggr\} \nonumber \\
& {\geqslant}\frac{1}{2} \, {\mathbb{E}}_{\theta}\Bigl[ \big\|{\widehat}{\Phi}-\Phi_{\theta}\big\|_{L^1(Q_0)} \Bigr] \,, \label{eq:minimaxLB-2}\end{aligned}$$ where the last inequality follows from the fact that ${\mathds{1}_{{\widehat}{\Phi}(x) \neq \Phi_{\theta}(x)}} = \big| {\widehat}{\Phi}(x) - \Phi_{\theta}(x) \big|$ for all continuous functions $x:[0,1]\to~{\mathbb{R}}$. Putting , , and  together, we finally get $$\sup_{\substack{f,g \in {\mathcal{H}_s}(R) \\ \|f-g\| {\geqslant}\Delta}} \left\{ \mathcal{R}_{f,g}({\widehat}\Phi) - \inf_{\Phi} \mathcal{R}_{f,g}(\Phi)  \right\} {\geqslant}\frac{\delta}{2} \, \left( \sup_{\theta \in \Theta}  {\mathbb{E}}_{\theta}\Bigl[ \big\|{\widehat}{\Phi}-\Phi_{\theta}\big\|_{L^1(Q_0)} \Bigr] - \frac{10 \delta}{\Delta} \right) \,.
\label{eq:minimaxLB-3}$$

[**Step 2: a key combinatorial and geometrical argument**  ]{} In order to further bound from below, we now specialize $\Theta$ to the set given by Lemma \[lem:lowerbound-packing\] in Appendix \[sec:proof-lowerbound-packing\], whose proof combines Varshamov-Gilbert’s lemma with simple but key geometrical arguments in dimension two. More precisely, we use Lemma \[lem:lowerbound-packing\] in Appendix \[sec:proof-lowerbound-packing\] with ${\varepsilon}=c/\sqrt{n}$ and $d = \big\lfloor \bigl((R^2-\Delta^2) \, n\bigr)^{1/(2s+1)} \big\rfloor$, for some absolute constant $c \in (0,1]$ to be determined later. Two remarks are in order:

-   We have $d {\geqslant}\left((R^2-\Delta^2) n \right)^{1/(2s+1)}-1 {\geqslant}32 \log(2) + 1$ by the assumption $n {\geqslant}(32 \log(2) + 2)^{2s+1}/(3 R^2/4) {\geqslant}(32 \log(2)+2)^{2s+1}/(R^2 - \Delta^2)$ since $\Delta {\leqslant}R/2$. In particular the condition $d {\geqslant}7$ in Lemma \[lem:lowerbound-packing\] holds true.

-   The condition $\Delta {\geqslant}\sqrt{d} \, {\varepsilon}$ of Lemma \[lem:lowerbound-packing\] holds since by assumption on $\Delta$, we have $$\Delta {\geqslant}R^{1/(2s+1)}\, n^{-s/(2s+1)} = \sqrt{(R^2 \, n)^{1/(2s+1)}/n} {\geqslant}\sqrt{d/n} {\geqslant}\sqrt{d} \, {\varepsilon}\,,$$ by definition of $d$ and ${\varepsilon}$.

We can thus apply Lemma \[lem:lowerbound-packing\] and find a subset $\Theta \subseteq \{\Delta\} \times \{-{\varepsilon}, \, {\varepsilon}\}^{d-1} \subseteq {\mathbb{R}}^d$ of cardinality $|\Theta| {\geqslant}e^{(d-1)/8} {\geqslant}2$ such that, for all $ \theta \neq \theta' \in \Theta$, $$\label{eq:lowerbound-packingbis}
\big\|\Phi_{\theta}-\Phi_{\theta'}\big\|_{L^1(Q_0)} {\geqslant}\frac{\sqrt{d-1} \, {\varepsilon}}{4 \pi \Delta} \, e^{-\Delta^2}\,.$$

 \
Note that our construction of $\Theta$ meets our earlier requirement: for all $\theta \in \Theta$, we have $\sum_{j=2}^d  \theta_j^2 j^{2s} {\leqslant}(d-1){\varepsilon}^2 \, d^{2s} {\leqslant}d^{2s+1} {\varepsilon}^2 {\leqslant}R^2 -\Delta^2$ by definition of $d {\leqslant}\bigl((R^2-\Delta^2) \, n\bigr)^{1/(2s+1)}$ and ${\varepsilon}{\leqslant}1/\sqrt{n}$. Therefore, $\Theta \subseteq \bigl\{ \theta \in {\mathbb{R}}^d: \,  \theta_1 = \Delta \textrm{ and } \sum_{j=2}^d  \theta_j^2 j^{2s} {\leqslant}R^2 - \Delta^2\bigr\}$ as assumed at the beginning of this proof.

[**Step 3: Reduction to a testing problem with finitely-many hypotheses**  ]{} We now use a classical tool in nonparametric statistics since we reduce the problem to a multiple-hypotheses testing problem. More precisely, using  and setting $${\widehat}{\theta} \in {\operatornamewithlimits{arg\,min}}_{\theta \in \Theta} \big\|{\widehat}{\Phi}-\Phi_{\theta}\big\|_{L^1(Q_0)}\,,$$ we can see that $$\begin{aligned}
\sup_{\substack{f,g \in {\mathcal{H}_s}(R) \\ \|f-g\| {\geqslant}\Delta}} \left\{ \mathcal{R}_{f,g}({\widehat}\Phi) - \inf_{\Phi} \mathcal{R}_{f,g}(\Phi)  \right\} & {\geqslant}\frac{\delta}{2} \left( \sup_{\theta \in \Theta}  {\mathbb{E}}_{\theta}\Bigl[ {\mathds{1}_{\{{\widehat}{\theta} \neq \theta\}}} \big\|{\widehat}{\Phi}-\Phi_{\theta}\big\|_{L^1(Q_{\mu})} \Bigr] - \frac{10 \delta}{\Delta} \right) \nonumber \\
& {\geqslant}\frac{\delta}{2} \left( \frac{\sqrt{d-1} \, {\varepsilon}}{8 \pi \Delta} \, e^{-\Delta^2} \sup_{\theta \in \Theta} {\mathbb{P}}_{\theta}\Bigl( {\widehat}{\theta} \neq \theta \Bigr) - \frac{10 \delta}{\Delta} \right) \,, \label{eq:minimaxLB-4}\end{aligned}$$ where in the last inequality we used the fact that, on the event $\{{\widehat}{\theta} \neq \theta\}$, we necessarily have $$\big\|{\widehat}{\Phi}-\Phi_{\theta}\big\|_{L^1(Q_0)} {\geqslant}\frac{\sqrt{d-1} \, {\varepsilon}}{8 \pi \Delta} \, e^{-\Delta^2}$$ by a combination of Inequality , the definition of ${\widehat}{\theta}$, and the triangle inequality.

 \
We now lower bound the worst-case testing error $\sup_{\theta \in \Theta} {\mathbb{P}}_{\theta}\bigl( {\widehat}{\theta} \neq \theta \bigr)$. Since ${\widehat}{\theta}$ only depends on the training sample $(X_i,Y_i)_{1 {\leqslant}i {\leqslant}n}$, whose distribution we denote by $P_{\theta}$, we can write ${\mathbb{P}}_{\theta}\bigl( {\widehat}{\theta} \neq \theta \bigr) = P_{\theta}\bigl( {\widehat}{\theta} \neq \theta \bigr)$. We can thus use Fano’s inequality (cf. Lemma \[lem:Fano\] in Appendix \[s:C\]) with the events $A_{\theta} = \bigl\{{\widehat}{\theta} = \theta\bigr\}$, the distributions $P_{\theta}$, $\theta \in \Theta$, and the reference distribution ${\mathbb{Q}}=P_{\theta_0}$, where $\theta_0 {:=}(\Delta,0,\ldots,0) \in {\mathbb{R}}^d$. We obtain: $$\inf_{\theta \in \Theta} P_{\theta}\bigl( {\widehat}{\theta} = \theta \bigr) {\leqslant}\frac{1}{|\Theta|} \sum_{\theta \in \Theta} P_{\theta}\bigl( {\widehat}{\theta} = \theta \bigr) {\leqslant}\frac{\displaystyle \frac{1}{|\Theta|} \sum_{\theta \in \Theta} \operatorname{KL}\bigl(P_{\theta},P_{\theta_0}\bigr) + \log 2}{\log |\Theta|} \;.
\label{eq:FanoCsq}$$ Using the chain rule for the Kullback-Leibler divergence, and following similar computations as in Section \[s:model\] (application of Girsanov’s formula), we can see that, for all $\theta \in \Theta$, $$\begin{aligned}
\operatorname{KL}\bigl(P_{\theta},P_{\theta_0}\bigr) & = n \left(\operatorname{KL}\bigl(\operatorname{Ber}(1/2),\operatorname{Ber}(1/2)\bigr) + \frac{\operatorname{KL}(Q_{\theta},Q_{\theta_0}) + \operatorname{KL}(Q_0,Q_0)}{2} \right) = \frac{n \|\theta - \theta_0\|^2}{4} = \frac{n (d-1) {\varepsilon}^2}{4} \,,\end{aligned}$$ where we used the fact that $\theta \in \Theta \subseteq \{\Delta\} \times \{-{\varepsilon}, \, {\varepsilon}\}^{d-1}$ and $\theta_0 {:=}(\Delta,0,\ldots,0)$. Combining with the Kullback-Leibler upper bound above, and recalling that $|\Theta| {\geqslant}e^{(d-1)/8}$, we get $$\inf_{\theta \in \Theta} P_{\theta}\bigl( {\widehat}{\theta} = \theta \bigr) {\leqslant}\frac{n (d-1) {\varepsilon}^2/4 + \log 2}{(d-1)/8}  {\leqslant}2 c^2 + \frac{1}{4} \,,$$ where the last inequality follows from ${\varepsilon}= c/\sqrt{n}$ and $d {\geqslant}32 \log(2) + 1$. As a consequence, choosing $c {:=}1/(2 \sqrt{2})$, $$\sup_{\theta \in \Theta} P_{\theta}\bigl( {\widehat}{\theta} \neq \theta \bigr) {\geqslant}1 - 2 c^2 - \frac{1}{4} = \frac{1}{2} \;.$$ Plugging the last lower bound into , we finally get $$\sup_{\substack{f,g \in {\mathcal{H}_s}(R) \\ \|f-g\| {\geqslant}\Delta}} \left\{ \mathcal{R}_{f,g}({\widehat}\Phi) - \inf_{\Phi} \mathcal{R}_{f,g}(\Phi)  \right\}
{\geqslant}\frac{5 \delta}{\Delta} \left( \frac{\sqrt{d-1} \, {\varepsilon}}{160 \pi} \, e^{-\Delta^2} - \delta \right) = \frac{(d-1) \, {\varepsilon}^2}{20480 \pi^2 \Delta} \, e^{-2\Delta^2}$$ with the particular choice of $\delta = \sqrt{d-1} \, {\varepsilon}\, e^{-\Delta^2} / (320 \pi)$. We conclude the proof by substituting the values of ${\varepsilon}=c/\sqrt{n}$ and $d -1 = \big\lfloor \bigl((R^2-\Delta^2) \, n\bigr)^{1/(2s+1)} \big\rfloor -1 {\geqslant}(6/8)  \bigl((R^2-\Delta^2) \, n\bigr)^{1/(2s+1)}$ (since $\lfloor x \rfloor - 1 {\geqslant}6 x/8$ for all $x {\geqslant}7$) and by using the fact that $R^2-\Delta^2 {\geqslant}3 R^2/4$ (since $\Delta {\leqslant}R/2$). Note also that, by the assumption $n {\geqslant}R^{1/s}$, we have $\delta < 1/4$ as required in the analysis. This concludes the proof of Theorem \[thm:minimaxlowerbound\].

A key combinatorial and geometrical lemma {#sec:proof-lowerbound-packing}
-----------------------------------------

In this section, we provide a key combinatorial and geometrical lemma to derive the minimax lower bound of Theorem \[thm:minimaxlowerbound\]. Indeed, the next result guarantees the existence of a parameter set $\Theta \subset {\mathbb{R}}^d$ such that—when ${\varepsilon}$ is chosen small enough—it is statistically hard to estimate the true value of the parameter $\theta \in \Theta$, while all Bayes classifiers $\Phi_{\theta}$ and $\Phi_{\theta'}$, $\theta \neq \theta' \in \Theta$, are sufficiently far from one another, thus leading to a large classification excess risk.

\[lem:lowerbound-packing\] Let $d {\geqslant}7$, ${\varepsilon}> 0$, and $\Delta {\geqslant}\sqrt{d} \, {\varepsilon}$. There exists a subset $\Theta \subseteq \{\Delta\} \times \{-{\varepsilon}, \, {\varepsilon}\}^{d-1} \subseteq {\mathbb{R}}^d$ of cardinality $|\Theta| {\geqslant}e^{(d-1)/8} {\geqslant}2$ such that, for all $\theta \neq \theta' \in \Theta$, $$\label{eq:lowerbound-packing}
\big\|\Phi_{\theta}-\Phi_{\theta'}\big\|_{L^1(Q_0)} {\geqslant}\frac{\sqrt{d-1} \, {\varepsilon}}{4 \pi \Delta} \, e^{-\Delta^2}\,,$$ where $Q_0$ denotes the distribution of a standard Brownian motion $W=(W(t))_{0 {\leqslant}t {\leqslant}1}$ on $[0,1]$, and where $\|h\|_{L^1(Q_0)} {:=}{\mathbb{E}}\bigl[|h(W)|\bigr]$.

 \
The proof is provided in Section \[sec:proofCombinatorialLemma\] below. We first state three intermediary results.

### Intermediary results

The following lemma shows that, for the $d$-dimensional construction of Section \[sec:LBproof-main\] (Step 1), the Bayes classifier $\Phi_{\theta}$ only depends on the $d$ random variables ${\widetilde}{X}_j {:=}\int_0^1 \varphi_j(t) d X(t)$, $1 {\leqslant}j {\leqslant}d$, and takes the form of a simple linear classifier in ${\mathbb{R}}^d$. We recall that $(\varphi_j)_{j {\geqslant}1}$ is any Hilbert basis of $\mathbb{L}^2([0,1])$ and that $f_{\theta} = \sum_{j=1}^d \theta_j \varphi_j$.

\[lem:BayesClassifierFinite\] Consider the statistical construction of Section \[sec:LBproof-main\] (Step 1). Let $W=(W(t))_{0 {\leqslant}t {\leqslant}1}$ be a standard Brownian motion and define ${\widetilde}{W}_j {:=}\int_0^1 \varphi_j(t) d W(t)$ as well as ${\widetilde}{W} {:=}\bigl({\widetilde}{W}_j\bigr)_{1 {\leqslant}j {\leqslant}d} \in {\mathbb{R}}^d$. Then, the Bayes classifier $\Phi_{\theta} = \mathds{1}_{\eta_{_{\theta}} {\geqslant}1/2}$ satisfies $$\Phi_{\theta}(W) = \left\lbrace
\begin{array}{lcr}
0 & \mathrm{if} &  \| {\widetilde}{W} - \theta \| > \| {\widetilde}{W} \|  \\
1 & \mathrm{if} & \| {\widetilde}{W} - \theta \| {\leqslant}\| {\widetilde}{W} \| 
\end{array}
\right. \quad \textrm{almost surely}.$$

The result follows directly from the calculations of Section \[sec:BayesRule\] (application of Girsanov’s formula). Indeed, using and the fact that $g=0$ and $\|f_{\theta}\|=\|\theta\|$, we obtain $$\begin{aligned}
\eta_{\theta}(W) {\geqslant}1/2 & \iff \int_0^1 f_{\theta}(t) d W(t)  {\geqslant}\frac{\|f_{\theta}\|^2}{2}  \\
& \iff {\widetilde}{\theta} \cdot {\widetilde}{W} {\geqslant}\frac{\|\theta\|^2}{2} \\
& \iff \| {\widetilde}{W} - \theta \|^2 {\leqslant}\| {\widetilde}{W} \|^2 \;,\end{aligned}$$ which concludes the proof.

The above lemma shows that the Bayes classifier $\Phi_{\theta}$ corresponds to a linear classifier in ${\mathbb{R}}^d$ (after projecting onto $(\varphi_j)_{1 {\leqslant}j {\leqslant}d}$). The next lemma provides a lower bound on the angle between the hyperplanes associated with two linear classifiers $\Phi_{\theta}$ and $\Phi_{\theta'}$, for $\theta \neq \theta' \in \Theta$. This result will be crucial in our proof of the lower bound of Lemma \[lem:lowerbound-packing\].

We recall that the (undirected) internal angle between two non-zero vectors $\theta,\theta' \in {\mathbb{R}}^d$ is given by $$\angle(\theta, \, \theta') := \arccos\left(\frac{\langle \theta, \theta' \rangle }{\|\theta\| \, \|\theta'\|}\right)\in [0,\pi] \;;$$ this angle is in particular well defined for all $\theta,\theta' \in \Theta$ (since $0 \notin \Theta$ by construction).

\[lem:BayesAngle\] Let $d {\geqslant}7$, ${\varepsilon}> 0$, and $\Delta {\geqslant}\sqrt{d} \, {\varepsilon}$. Let $\Gamma \subseteq \{-1,1\}^{d-1}$ be a set provided by Varshamov-Gilbert’s lemma in dimension $m=d-1$ (see, [e.g.]{}, Lemma \[lem:VG\] in Appendix \[s:C\]), and define $$\Theta {:=}\bigl\{\Delta\bigr\} \times \bigl({\varepsilon}\Gamma\bigr) = \Bigl\{ (\Delta,{\varepsilon}u_1, {\varepsilon}u_2, \ldots, {\varepsilon}u_{d-1}) : \, (u_1,\ldots,u_{d-1}) \in \Gamma \Bigr\} \subset {\mathbb{R}}^d \,.
\label{eq:def-Theta}$$ Then, for all $\theta \neq \theta' \in \Theta$, the internal angle $\angle(\theta, \, \theta')$ between the vectors $\theta$ and $\theta'$ is bounded by $$\frac{\sqrt{d-1} \, {\varepsilon}}{2\Delta} {\leqslant}\angle(\theta, \, \theta') {\leqslant}\frac{\pi}{2} \;.$$

Let $\theta \neq \theta' \in \Theta$. By  we can write $\theta  = (\Delta,{\varepsilon}u_1, \ldots, {\varepsilon}u_{d-1})$ and $\theta'  = (\Delta,{\varepsilon}u'_1, \ldots, {\varepsilon}u'_{d-1})$ with $u \neq u' \in \Gamma$. We also set $m=d-1$. We have $$\begin{aligned}
\cos \Big(\angle(\theta, \, \theta')\Bigr)  & = \frac{\langle \theta , \theta' \rangle }{\|\theta\| \, \|\theta'\|} = \frac{\Delta^2 + {\varepsilon}^2 \sum_{j=1}^m u_j u'_j}{\sqrt{\Delta^2 + m {\varepsilon}^2} \, \sqrt{\Delta^2 + m {\varepsilon}^2}} = \frac{\Delta^2 + {\varepsilon}^2 \sum_{j=1}^m u_j u'_j}{\Delta^2 + m {\varepsilon}^2} \;. \label{eq:angleLB-1}\end{aligned}$$ Note that $u_j u'_j \in \{-1,1\}$ so that $\Delta^2 + {\varepsilon}^2 \sum_{j=1}^m u_j u'_j {\geqslant}\Delta^2 - m {\varepsilon}^2 {\geqslant}0$ because we assumed that $\Delta {\geqslant}\sqrt{d} \, {\varepsilon}$. Therefore, $\cos\big(\angle(\theta, \, \theta')\bigr) {\geqslant}0$, which in turn entails that $\angle(\theta, \, \theta') {\leqslant}\pi/2$ since $\angle(\theta, \, \theta') \in [0,\pi]$ by definition.

 \
We now prove the lower bound on $\angle(\theta, \, \theta')$. By construction of $\Gamma$ (Lemma \[lem:VG\] in Appendix \[s:C\]), we have $u_j u'_j \in \{-1,1\}$ and $\sum_{j=1}^m {\mathds{1}_{\{u_j \neq u'_j\}}} {\geqslant}m/4$, so that $\sum_{j=1}^m u_j u'_j {\leqslant}-m/4 + 3m/4 = m/2$. Substituting this upper bound in  yields $$\cos \Big(\angle(\theta, \, \theta')\Bigr)  {\leqslant}\frac{\Delta^2 + m {\varepsilon}^2 /2}{\Delta^2 + m {\varepsilon}^2} = 1 - \frac{m {\varepsilon}^2 /2}{\Delta^2 + m {\varepsilon}^2} \;.$$ Using the former result $\cos\big(\angle(\theta, \, \theta')\bigr) {\geqslant}0$ and the last inequality above, we obtain $$\sin^2\!\Big(\angle(\theta, \, \theta')\Bigr)  =  1 - \cos^2\!\Big(\angle(\theta, \, \theta')\Bigr)  {\geqslant}1 - \cos\!\Big(\angle(\theta, \, \theta')\Bigr) {\geqslant}\frac{m {\varepsilon}^2 /2}{\Delta^2 + m {\varepsilon}^2} {\geqslant}\frac{m {\varepsilon}^2}{4 \Delta^2} \,,$$ where we again used $m = d-1 {\leqslant}d$ and our assumption on $\Delta$: $\sqrt{m}\, {\varepsilon}{\leqslant}\sqrt{d}\, {\varepsilon}{\leqslant}\Delta $. We conclude the proof by noting that $\angle(\theta, \, \theta') {\geqslant}\sin \bigl(\angle(\theta, \, \theta')\bigr) = \sqrt{\sin^2\bigl(\angle(\theta, \, \theta')\bigr)}$ since $\angle(\theta, \, \theta') \in [0,\pi]$: $$\angle(\theta, \, \theta') {\geqslant}\frac{\sqrt{m} {\varepsilon}}{2 \Delta} = \frac{\sqrt{d-1} {\varepsilon}}{2 \Delta} \;.$$

Our third and last lemma in this subsection provides a lower bound on the Gaussian measure of a double cone in dimension 2. We say that ${\mathcal{C}}\subset {\mathbb{R}}^2$ is an *open double cone with apex $z \in {\mathbb{R}}^2$* if it is of the form $${\mathcal{C}}= \Bigl\{ z + a u + b v : \, (a,b) \in {\mathbb{R}}^{\star 2}_+ \cup\, {\mathbb{R}}^{\star 2}_- \Bigr\}$$ for some linearly independent vectors $u, v \in {\mathbb{R}}^2$. It is clear that there is not a one-to-one correspondence between $(u,v)$ and ${\mathcal{C}}$ (several pairs $(u,v)$ correspond to the same ${\mathcal{C}}$). However, the value of the internal angle $\angle(u,v) := \arccos\bigl(\langle u , v\rangle/ (\|u\| \, \|v\|)\bigr) \in (0,\pi)$ between $u$ and $v$ is the same for all pairs $(u,v)$ that correspond to ${\mathcal{C}}$. We thus call $\angle(u,v)$ the *angle of the open double cone ${\mathcal{C}}$*.

\[lem:GaussianMassCone\] Let ${\mathcal{C}}\subset {\mathbb{R}}^2$ be an open double cone with apex $z \in {\mathbb{R}}^2$ and angle ${\mathcal{A}}\in (0,\pi)$. Then, the measure of ${\mathcal{C}}$ with respect to the standard Gaussian distribution $\gamma_2 = {\mathcal{N}}(0,{\mathbb{I}}_{2 \times 2})$ on ${\mathbb{R}}^2$ is lower bounded by $$\gamma_2({\mathcal{C}}) {\geqslant}\frac{{\mathcal{A}}}{2 \pi} \, e^{-\| z \|^2} \,.$$

 \
We emphasize that rather intuitively, the above lower bound is proportional to the angle ${\mathcal{A}}$ and decreases exponentially fast with $\|z\|^2$. (The constant of $1$ appearing in the exponential could certainly be optimized, but this one is sufficient for our purposes.)

We carry out a change of variables by a translation around $z$: writing ${\mathcal{C}}- z = \bigl\{x - z: \, x \in {\mathcal{C}}\bigr\}$ and using the inequality $\|z+u\|^2 {\leqslant}2 \|z\|^2 + 2 \|u\|^2$, we get $$\begin{aligned}
\gamma_2({\mathcal{C}}) & = \frac{1}{2 \pi}\int_{{\mathcal{C}}} e^{-\|x\|^2/2} \, {\textrm{d}}x = \frac{1}{2 \pi}\int_{{\mathcal{C}}-z} e^{-\|z+u\|^2 /2} \, {\textrm{d}}u {\geqslant}\frac{e^{-\|z\|^2}}{2 \pi}\int_{{\mathcal{C}}-z} e^{-\|u\|^2} {\textrm{d}}u \\
& = \frac{e^{-\|z\|^2}}{2 \pi} \, 2 \int_0^{{\mathcal{A}}} \left( \int_0^{+\infty} r e^{-r^2} {\textrm{d}}r \right) {\textrm{d}}\alpha = \frac{e^{-\|z\|^2}}{2 \pi} \, {\mathcal{A}}\,,\end{aligned}$$ where the second line is obtained by parameterizing ${\mathcal{C}}-z$ with polar coordinates and by noting that ${\mathcal{C}}-z$ is an open double cone of angle ${\mathcal{A}}$ pointed at the origin. This concludes the proof.

### Proof of Lemma \[lem:lowerbound-packing\] {#sec:proofCombinatorialLemma}

We now prove Lemma \[lem:lowerbound-packing\] using the intermediary results of the previous subsection. We use the same notation as in Section \[sec:LBproof-main\]. Let $\Gamma \subseteq \{-1,1\}^{d-1}$ be a set provided by Varshamov-Gilbert’s lemma in dimension $m=d-1$ (cf. Lemma \[lem:VG\] in Appendix \[s:C\]). Next we show that the set $$\Theta {:=}\bigl\{\Delta\bigr\} \times \bigl({\varepsilon}\Gamma\bigr) = \Bigl\{ (\Delta,{\varepsilon}u_1, {\varepsilon}u_2, \ldots, {\varepsilon}u_{d-1}) : \, (u_1,\ldots,u_{d-1}) \in \Gamma \Bigr\} \subset {\mathbb{R}}^d$$ satisfies the statement of Lemma \[lem:lowerbound-packing\]. We can already see that its cardinality is $|\Theta| = |\Gamma| {\geqslant}e^{m/8} {\geqslant}e^{(d-1)/8}$. It remains to prove that, for all $\theta \neq \theta' \in \Theta$, $$\big\|\Phi_{\theta}-\Phi_{\theta'}\big\|_{L^1(Q_0)} {\geqslant}\frac{\sqrt{d-1} \, {\varepsilon}}{4 \pi \Delta} \, e^{-\Delta^2}\,,
\label{eq:lowerbound-packing2}$$ where $Q_0$ denotes the distribution of a standard Brownian motion $W=(W(t))_{0 {\leqslant}t {\leqslant}1}$ on $[0,1]$, and where $\|h\|_{L^1(Q_0)} {:=}{\mathbb{E}}\bigl[|h(W)|\bigr]$.

Let $\theta \neq \theta' \in \Theta$. Let $W=(W(t))_{0 {\leqslant}t {\leqslant}1}$ be a standard Brownian motion on some probability space $(\Omega,\mathcal{F},{\mathbb{P}})$. Noting that $\big| \Phi_{\theta}(W) - \Phi_{\theta'}(W) \big|={\mathds{1}_{\Phi_{\theta}(W) \neq \Phi_{\theta'}(W)}}$ a.s., we have $$\begin{aligned}
\big\|\Phi_{\theta}-\Phi_{\theta'}\big\|_{L^1(Q_0)}  & = {\mathbb{P}}\bigl(\Phi_{\theta}(W) \neq \Phi_{\theta'}(W) \bigr) \nonumber \\
& = {\mathbb{P}}\Bigl( \bigl\{\| {\widetilde}{W} - \theta \| {\leqslant}\| {\widetilde}{W} \| < \| {\widetilde}{W} - \theta' \| \bigr\} \cup \bigl\{\| {\widetilde}{W} - \theta' \| {\leqslant}\| {\widetilde}{W} \| < \| {\widetilde}{W} - \theta \| \bigr\} \Bigr) \nonumber \\
& {\geqslant}{\mathbb{P}}\Bigl( \, \underbrace{\bigl\{\| {\widetilde}{W} - \theta \| < \| {\widetilde}{W} \| < \| {\widetilde}{W} - \theta' \| \bigr\} \cup \bigl\{\| {\widetilde}{W} - \theta' \| < \| {\widetilde}{W} \| < \| {\widetilde}{W} - \theta \| \bigr\}}_{=:A} \, \Bigr) \,, \nonumber\end{aligned}$$ where the line before last follows from Lemma \[lem:BayesClassifierFinite\], and where we recall that ${\widetilde}{W} {:=}\bigl({\widetilde}{W}_j\bigr)_{1 {\leqslant}j {\leqslant}d} \in {\mathbb{R}}^d$ with ${\widetilde}{W}_j {:=}\int_0^1 \varphi_j(t) d W(t)$. In order to bound ${\mathbb{P}}(A)$ from below, we project (orthogonally) all points in ${\mathbb{R}}^d$ onto the unique plane ${\mathcal{P}}$ that contains $0$ and the non-colinear vectors $\theta$ and $\theta'$ (note from Lemma \[lem:BayesAngle\] that $0 < \angle(\theta,\theta') {\leqslant}\pi/2 < \pi$). As shown in Figure \[fig:2Dprojection\], we define $z \in {\mathcal{P}}$ as the intersection between the perpendicular bisectors ${\mathcal{D}}$ and ${\mathcal{D}}'$ of the segments $[0,\theta]$ and $[0,\theta']$ on the plane ${\mathcal{P}}$. Writing $r_{-\pi/2}$ for the rotation of angle $-\pi/2$ on the plane ${\mathcal{P}}$, we also consider the unit vectors $u = r_{-\pi/2}\bigl(\theta/\|\theta\|\bigr)$ and $v = r_{-\pi/2}\bigl(\theta'/\|\theta'\|\bigr)$ that support the lines ${\mathcal{D}}$ and ${\mathcal{D}}'$ respectively.

(0,0.525)–(-2,-0.55)–(-3,2.2)–cycle; (0,0.525)–(2,-0.55)–(3,2.2)–cycle; (0,-2)–++(0,4) node \[above\] [$y$]{}; (0,-2)–++(-2,4) node \[above\] [$\theta$]{}; (0,-2)–++(2,4) node \[above\] [$\theta'$]{}; (-2,2) – (0,2) node \[midway, above\] [$L$]{}; (2,2) – (0,2) node \[midway, above\] [$L$]{}; at (0,-2) \[below\] [$0$]{}; at (-1,0) \[below \] [$\frac{\theta}{2}$]{}; at (1,0) \[below \] [$\frac{\theta'}{2}$]{}; (-1,0) to (5,3.3); (-1,0) to (-2.5,-0.825); (1,0) to (-5,3.3); (1,0) to (2.5,-0.825); at (0,0.2) \[right\] [$z$]{}; (-0.59,0.18) arc (22:109:0.5); (1.20,0.38) arc (65:145:0.5); at (1.03,0.38) \[above\] [$\pi/2$]{}; at (-1.03,0.38) \[above\] [$\pi/2$]{}; at (2,1) \[below\] [$\mathcal{C}$]{}; at (3.4,2.8) \[below\] [$\mathcal{D}$]{}; at (2.5,-0.8) \[below\] [$\mathcal{D}'$]{}; (0,0.55) –++ (0.7,0.36) node \[above\] [$u$]{}; (0,0.55) –++ (0.7,-0.36) node \[below\] [$v$]{};

Writing ${\widetilde}{W}_{{\mathcal{P}}}$ for the orthogonal projection of ${\widetilde}{W} \in {\mathbb{R}}^d$ onto ${\mathcal{P}}$, we can see that $${\mathbb{P}}(A) = {\mathbb{P}}\Bigl({\widetilde}{W}_{{\mathcal{P}}} \in {\mathcal{C}}\Bigr) \quad \textrm{with} \quad {\mathcal{C}}{:=}\Bigl\{ z + a u + b v : \, (a,b) \in {\mathbb{R}}_+^{*2} \cup\, {\mathbb{R}}_-^{*2} \Bigr\} \,.$$

Let $(e_1,e_2)$ be any orthonormal basis of ${\mathcal{P}}$. Decomposing any $w \in {\mathcal{P}}$ as $w = w^1 e_1 + w^2 e_2$ (and similarly for $u$ and $v$), we can see that $$w \in {\mathcal{C}}\iff (w^1,w^2) \in \underbrace{\Bigl\{ (z^1,z^2) + a (u^1,u^2) + b (v^1,v^2) : \, (a,b) \in {\mathbb{R}}_+^{*2} \cup\, {\mathbb{R}}_-^{*2} \Bigr\}}_{=:{\widetilde}{{\mathcal{C}}}} \,.$$ Therefore, $${\mathbb{P}}(A) =
{\mathbb{P}}\Bigl(\bigl({\widetilde}{W}_{{\mathcal{P}}}^1,{\widetilde}{W}_{{\mathcal{P}}}^2\bigr) \in {\widetilde}{{\mathcal{C}}} \, \Bigr) = \gamma_2\bigl({\widetilde}{{\mathcal{C}}} \,\bigr) \,,$$ where $\gamma_2 = {\mathcal{N}}(0,{\mathbb{I}}_{2 \times 2})$ denotes the standard Gaussian distribution on ${\mathbb{R}}^2$. The last equality holds true because $W=(W(t))_{0 {\leqslant}t {\leqslant}1}$ is a standard Brownian motion so that the ${\widetilde}{W}_j = \int_0^1 \varphi_j(t) dW(t)$, $1 {\leqslant}j {\leqslant}d$, are independent ${\mathcal{N}}(0,1)$ random variables (because the $\varphi_j$ are orthonormal), so that $\bigl({\widetilde}{W}^1,{\widetilde}{W}^2\bigr)$ is a standard two-dimensional Gaussian vector (because $e_1$ and $e_2$ are orthonormal).

Now, we note that the subset ${\widetilde}{{\mathcal{C}}} \subset {\mathbb{R}}^2$ is an open double cone with apex $(z_1,z_2)$. Since $(e_1,e_2)$ is an orthonormal basis of ${\mathcal{P}}$, the angle of ${\widetilde}{{\mathcal{C}}}$ is equal to $\angle(u,v) = \angle\bigl(r_{-\pi/2}\bigl(\theta/\|\theta\|\bigr),r_{-\pi/2}\bigl(\theta'/\|\theta'\|\bigr)\bigr) = \angle(\theta,\theta')$. Therefore, applying Lemma \[lem:GaussianMassCone\] and then Lemma \[lem:BayesAngle\], $$\begin{aligned}
{\mathbb{P}}(A) \
& {\geqslant}\frac{\angle(\theta,\theta')}{2 \pi} \, e^{-(z_1^2+z_2^2)} {\geqslant}\frac{e^{-(z_1^2+z_2^2)} \sqrt{d-1} \, {\varepsilon}}{4 \pi \Delta} \,. \label{eq:lowerbound-packing4}\end{aligned}$$ We conclude the proof by upper bounding $z_1^2 + z_2^2 = \|z\|^2$ as follows. First note from Figure \[fig:2Dprojection\] that $$\cos\left(\frac{\angle(\theta, \, \theta')}{2}\right) = \frac{\|\theta\|/2}{\|z\|} \qquad \textrm{so that} \qquad \|z\| = \frac{\|\theta\|}{2 \cos\left(\frac{\angle(\theta, \, \theta')}{2}\right)} \;.$$ But, from the inequality $0 {\leqslant}\angle(\theta, \, \theta')/2 {\leqslant}\pi/4$ (see Lemma \[lem:BayesAngle\]) we get that $\cos\bigl(\angle(\theta, \, \theta')/2\bigr) {\geqslant}1/\sqrt{2}$, so that $\|z\| {\leqslant}\|\theta\|/\sqrt{2}$, [i.e.]{}, $$z_1^2 + z_2^2 {\leqslant}\frac{\|\theta\|^2}{2} = \frac{\Delta^2+(d-1) {\varepsilon}^2}{2} {\leqslant}\Delta^2$$ by the assumption $\Delta {\geqslant}\sqrt{d} {\varepsilon}$. Combining $\|z\|^2 {\leqslant}\Delta^2$ with Equation concludes the proof.

### Two well-known lemmas {#s:C}

The next combinatorial result is known as Varshamov-Gilbert’s lemma. It provides a lower bound on the packing entropy of the $m$-dimensional hypercube $\{-1,1\}^m$ endowed with the Hamming metric, at scale $m/4$. This result indicates that among the $2^m$ corners of $\{-1,1\}^m$, exponentionally many of them are almost opposite from one another. A proof can be found, [e.g.]{}, in [@Massart03StFlour Lemma 4.7].

\[lem:VG\] Let $m {\geqslant}1$. There exists a subset $\Gamma \subseteq \{-1,1\}^m$ of cardinality $|\Gamma| {\geqslant}e^{m/8}$ such that $$\forall x \neq y \in \Gamma, \quad \sum_{j=1}^m {\mathds{1}_{\{x_j \neq y_j\}}} > \frac{m}{4} \,.$$

The next lemma is a well-known version of Fano’s inequality that follows, [e.g.]{}, from [@IbHa-81-StatisticalEstimation Chapter VII, Lemma 1.1] or [@CoTh06 Theorem 2.11.1] (see also Proposition 1 in the recent survey [@GeMeSt-17-Fano]).

We recall that the Kullback-Leibler divergence $\operatorname{KL}({\mathbb{P}},\mathbb{Q})$ between two probability distributions ${\mathbb{P}}$ and $\mathbb{Q}$ on the same measurable space $(E,\mathcal{B})$ is defined by

[(,) [:=]{}]{} \_E () & if ${\mathbb{P}}$ is absolutely continuous with respect to $\mathbb{Q}$;\
+& otherwise.

\[lem:Fano\] Let $(E,\mathcal{B})$ be any measurable space and $N {\geqslant}2$. Let $(A_1,\ldots,A_N)$ be a measurable partition of $(E,\mathcal{B})$ and $({\mathbb{P}}_1,\ldots,{\mathbb{P}}_N)$ a family of probability distributions on $(E,\mathcal{B})$. Then, $$\frac{1}{N} \sum_{i=1}^N {\mathbb{P}}_i(A_i) {\leqslant}\frac{\displaystyle  \inf_{{\mathbb{Q}}} \frac{1}{N} \sum_{i=1}^N \operatorname{KL}({\mathbb{P}}_i,{\mathbb{Q}}) + \log 2}{\log N} \;,$$ where the infimum is over all probability distributions ${\mathbb{Q}}$ on $(E,\mathcal{B})$.

Truncated nearest neighbor strategy (Theorem \[thm:lwr\_bound\_knn\])
=====================================================================

This appendix section gathers the proof of the lower bound of the nearest neighbor method used with a sample-splitting thresholding strategy, [i.e.]{}, half of the learning sample is used to choose a thresholding dimension ${\widehat}{d}_n$ and then the nearest neighbor classifier is computed on the remaining part of the samples. Therefore, ${\widehat}{d}_n$ is choosen independently from the second part of the samples.

Smoothness of thee Gaussian translation model {#proof:gaussian_alpha}
---------------------------------------------

This paragraph is devoted to the computation of the smoothness index $\beta_d$ involved in the Gaussian translation model in dimension $d \in \mathbb{N}^\star$ (see, [e.g.]{}, Equation \[eq:smooth\]). Below, $\gamma$ will refer to the density of the $d$-dimensional standard Gaussian random variable and we omit the dependency in $d$ to alleviate the notations.

According to the definition of the smoothness parameter given in Equation \[eq:smooth\], we compute the average value of $\eta$ on a ball $B(x,r)$ and compare it to $\eta(x)$: $$\begin{aligned}
\lefteqn{\eta(B(x,r))-\eta(x)}\nonumber \\ 
&= &\frac{1}{\mu(B(x,r)} \int_{B(x,r)} \eta(s) d\mu(s) - \frac{\gamma(x)}{\gamma(x)+\gamma(x-m)},\nonumber\\
& = & \frac{2}{\int_{B(x,r)}  \gamma(s) + \gamma(s-m) ds} \int_{B(x,r)} \frac{\gamma(s)}{\gamma(s)+\gamma(s-m)} \frac{1}{2} [\gamma(s)+\gamma(s-m)] ds  - \frac{\gamma(x)}{\gamma(x)+\gamma(x-m)},\nonumber\\
& = & \frac{\gamma(B(x,r))}{\gamma(B(x,r))+\gamma(B(x-m,r))} - \frac{\gamma(x)}{\gamma(x)+\gamma(x-m)}, \nonumber\\
& = & \frac{[\gamma(x)+\gamma(x-m)] \gamma(B(x,r))-\gamma(x) [\gamma(B(x,r))+\gamma(B(x-m,r))]}{[\gamma(x)+\gamma(x-m)] [\gamma(B(x,r))+\gamma(B(x-m,r))]}, \nonumber\\
& = & \frac{\gamma(x-m) \gamma(B(x,r)) - \gamma(x)\gamma(B(x-m,r))}{[\gamma(x)+\gamma(x-m)] [\gamma(B(x,r))+\gamma(B(x-m,r))]}. 
\label{eq:diff_eta}\end{aligned}$$ It is then necessary to compare $\gamma(B(x,r))$ with $\gamma(x) \lambda(B_r)$ where $\lambda(B_r)$ is the Lebesgue measure of the centered ball of radius $r$ in $\mathbb{R}^d$. For this purpose, we can use the well known convexity inequality on Gaussian measures of shifted balls: $$\label{eq:gaussian_shift}
\exp(-\|x\|^2/2) \gamma(B(0,r)) {\leqslant}\gamma(B(x,r)) {\leqslant}\gamma(B(0,r)).$$ In particular, we have (see [@Kuelbs94]) when $r \longrightarrow 0$ that $$\gamma(B(x,r)) \sim \exp(-\|x\|^2/2) \gamma(B(0,r)),$$ but the r.h.s. of is tight only for $x$ close to $0$. Expanding the denominator of , we obtain that $$\begin{aligned}
\lefteqn{\left| \eta(B(x,r))-\eta(x) \right|} \nonumber \\
& =& \frac{\left| \gamma(x-m) \gamma(B(x,r)) - \gamma(x) \gamma(B(x-m,r))\right|}{\gamma(x) \gamma(B(x,r))+\gamma(x)\gamma(B(x-m,r))+\gamma(x-m)\gamma(B(x,r))+\gamma(x-m)\gamma(B(x-m,r))} \nonumber\\
& {\leqslant}& \frac{\left| \gamma(x-m) \gamma(B(x,r)) - \gamma(x) \gamma(B(x-m,r))\right|}{\gamma(x)\gamma(B(x-m,r))+\gamma(x-m)\gamma(B(x,r))}.
\label{eq:up_KLL}\end{aligned}$$ Concerning the numerator, a simple change of variable leads to $$\begin{aligned}
\lefteqn{\gamma(x-m) \gamma(B(x,r)) - \gamma(x) \gamma(B(x-m,r)) }\\
& = & (2\pi)^{-d}\int_{B(0,r)} \left\lbrace
 e^{-\|x-m\|^2/2} e^{-\|x-s\|^2/2} - e^{-\|x\|^2/2} e^{-\|x-m-s\|^2/2} \right\rbrace ds.\end{aligned}$$ For all $x\in \mathbb{R}^d$ and $s\in B(0,r)$, the term inside the integral above may be written as $$e^{-\|x-m\|^2/2} e^{-\|x-s\|^2/2} - e^{-\|x\|^2/2} e^{-\|x-m-s\|^2/2} = e^{-\|x-m\|^2/2-\|x\|^2/2} e^{-\|s\|^2/2}  \left[ e^{\langle x,s\rangle} - e^{\langle x-m,s\rangle}\right].$$ We can use the following upper bound for any real value $a$: $$|e^a-1-a|{\leqslant}\frac{a^{2}e^{|a|}}{2},$$ with $a=\langle x,s\rangle$ and $a=\langle x-m,s\rangle$ and deduce that $$|e^{\langle x,s\rangle} - e^{\langle x-m,s\rangle}- \langle m,s\rangle| {\leqslant}\frac{s^2}{2} \left( \|x-m\|^2 e^{|\langle x-m,s\rangle|}+\|x\|^2e^{|\langle x,s \rangle|} \right).$$ Therefore, we obtain $$\begin{aligned}
\lefteqn{\left| \gamma(x-m) \gamma(B(x,r)) - \gamma(x) \gamma(B(x-m,r))\right|}\\  
&{\leqslant}& \gamma(x) \gamma(x-m)
  \int_{B(0,r)} e^{-\|s\|^2/2} \langle m,s\rangle ds  \\ 
  & & +\frac{r^2}{2} \gamma(x) \gamma(x-m)\left[ \|x-m\|^2 \int_{B(0,r)} e^{-\frac{\|s\|^2}{2} } e^{|\langle x-m,s\rangle|} ds
  +\|x\|^2 \int_{B(0,r)} e^{-\frac{\|s\|^2}{2} } e^{|\langle x,s\rangle|} ds \right] \\
  & = & 
  \frac{r^2}{2} \gamma(x) \gamma(x-m)\left[ \|x-m\|^2 \int_{B(0,r)} e^{-\frac{\|s\|^2}{2} } e^{|\langle x-m,s\rangle|} ds
  +\|x\|^2 \int_{B(0,r)} e^{-\frac{\|s\|^2}{2} } e^{|\langle x,s\rangle|} ds \right]  \\
  & {\leqslant}& \frac{r^2}{2} \gamma(x)\gamma(x-m)  \|x-m\|^2 \left( \int_{B(0,r)} e^{-\frac{\|s\|^2}{2} } e^{\langle x-m,s\rangle} ds + \int_{B(0,r)} e^{-\frac{\|s\|^2}{2} } e^{-\langle x-m,s\rangle} ds \right) \\
  & & + \frac{r^2}{2} \gamma(x)\gamma(x-m)  \|x\|^2 \left( \int_{B(0,r)} e^{-\frac{\|s\|^2}{2} } e^{\langle x,s\rangle} ds + \int_{B(0,r)} e^{-\frac{\|s\|^2}{2} } e^{-\langle x,s\rangle} ds \right)\\
  & = & \frac{r^2}{2} \left[ \|x-m\|^2 \gamma(x) [\gamma(B(x-m,r))+\gamma(B(m-x,r))]
  +
  \|x\|^2 \gamma(x-m) [\gamma(B(x,r))+\gamma(B(-x,r))]\right] \\
  & = & r^2 \left[ \|x-m\|^2\gamma(x-m) \gamma(B(x,r)) + \|x\|^2 \gamma(x) \gamma(B(x-m,r))\right],
  $$ where the last line comes from the symmetry of the Gaussian distribution. Using this last inequality in Inequality (\[eq:up\_KLL\]) yields: $$\label{eq:tec1}
\left| \eta(B(x,r)) - \eta(x)\right|{\leqslant}r^2 \left[ \|x-m\|^2 +\|x\|^2 \right].$$ Now, we should remark that $$\gamma(B(0,r)) = \int_{B(0,r)} \frac{e^{-|u|^2/2} }{\sqrt{2 \pi}^d} du
{\geqslant}e^{-r^2/2} (2\pi)^{-d/2} \lambda(B(0,r)) {\geqslant}e^{-r^2/2} (2\pi)^{-d/2} r^d  \frac{\pi^{d/2}}{\Gamma(d/2+1)},$$ where we used the direct computation of the Lebesgue volume of the unit ball in ${\mathbb{R}}^d$ $$\lambda(B(0,1)) = \frac{\pi^{d/2}}{\Gamma(d/2+1)}.$$ Therefore, we obtain that $$r^2 {\leqslant}\left( \frac{\gamma(B(0,r)) e^{r^2/2} (2\pi)^{d/2} \Gamma(d/2+1)}{\pi^{d/2}}\right)^{2/d} = 2 e^{r^2/d} \Gamma(d/2+1)^{2/d} \gamma(B(0,r))^{2/d}.$$ Then, Equation on the volume of shifted balls entails $$\begin{aligned}
\forall x \in {\mathbb{R}}^d \quad \forall r >0 \qquad 
r^2 & {\leqslant}& 2 e^{r^2/d} \Gamma(d/2+1)^{2/d} \left( \frac{\gamma(B(x,r)) e^{\|x\|^2/2} + \gamma(B(x-m,r)) e^{\|x-m\|^2/2}}{2}  \right)^{2/d} \\
& {\leqslant}& 2 e^{r^2/d} \Gamma(d/2+1)^{2/d}\left[ \gamma(x)^{-1}+\gamma(x-m)^{-1}\right]^{2/d}  \mu(B(x,r))^{2/d}.\end{aligned}$$ Using the Stirling formula, we have $$\Gamma(d/2+1) {\leqslant}2 \sqrt{2\pi} (d/2+1)^{d/2+1/2} e^{-d/2-1}.$$ We then plug-in this upper bound in the previous inequality and we deduce that: $$\begin{aligned}
r^2 & {\leqslant}& 2 e^{r^2/d} \frac{d}{2} \left( 2 \sqrt{2\pi} (1+2/d)^{d/2+1/2} e^{-d/2-1} \right)^{2/d} \left[ \gamma(x)^{-1}+\gamma(x-m)^{-1}\right]^{2/d}  \mu(B(x,r))^{2/d}\\
&
{\leqslant}& d e^{r^2/d} \left[ \gamma(x)^{-1}+\gamma(x-m)^{-1}\right]^{2/d}  \mu(B(x,r))^{2/d} 
\sup_{d'{\geqslant}1} \left\{ \left( 2 \sqrt{2\pi} (1+2/d')^{d'/2+1/2} e^{-d'/2-1} \right)^{2/d'}\right\}.\end{aligned}$$ Some straightforward algebra yields: $$\sup_{d'{\geqslant}1} \left\{ \left( 2 \sqrt{2\pi} (1+2/d')^{d'/2+1/2} e^{-d'/2-1} \right)^{2/d'}\right\} {\leqslant}72 \pi e^{-3} {\leqslant}12,$$ which entails that: $$\left| \eta(B(x,r)) - \eta(x)\right|{\leqslant}12 d e^{r^2/d} \left[ \|x-m\|^2 +\|x\|^2 \right] \left[ \gamma(x)^{-1}+\gamma(x-m)^{-1}\right]^{2/d}  \mu(B(x,r))^{2/d}.$$

Analysis of the Nearest Neighbor classifier in finite dimension {#proof:knngauss}
---------------------------------------------------------------

Below, $\Phi_{k,n}$ refers to the $k$ nearest neighbor classifier given a $n$ sample $\mathcal{D}_n := (X_1,Y_1),\ldots,(X_n,Y_n)$ in $\mathbb{R}^d$ with a Gaussian translation model.

We begin with a classical decomposition of the excess risk, we have: $$\mathcal{R}_{f,g}(\Phi_{k,n,d})-\mathcal{R}_{f,g}(\Phi_d^{\star})= \mathbb{E} \left[ |2 \eta_d(X)-1| \mathds{1}_{\Phi_{k,n,d}(X) \neq \Phi_d^{\star}(X)} \right].$$ Consider a small ${\varepsilon}$, whose value will be fixed later on. For any $\delta>0$, we use the simple lower bound $$\begin{aligned}
\mathcal{R}_{f,g}(\Phi_{k,n,d})-\mathcal{R}_{f,g}(\Phi_d^{\star})&{\geqslant}&  \mathbb{E} \left[|2 \eta_d(X)-1| 
\mathds{1}_{\delta{\varepsilon}<|\eta(X)-1/2|<{\varepsilon}}
\mathds{1}_{\Phi_{k,n,d}(X) \neq \Phi_d^{\star}(X)} \right], \\
 &{\geqslant}& \delta{\varepsilon}\mathbb{E} \left[
\mathds{1}_{\delta{\varepsilon}<|\eta(X)-1/2|<{\varepsilon}}
\mathds{1}_{\Phi_{k,n,d}(X) \neq \Phi_d^{\star}(X)} \right], \\
& {\geqslant}& \delta{\varepsilon}\mathbb{E}_{X} \left[
\mathds{1}_{\delta{\varepsilon}<|\eta(X)-1/2|<{\varepsilon}}
\mathbb{E}_{\otimes^n} \left[
\mathds{1}_{\Phi_{k,n}(X) \neq \Phi_d^{\star}(X)} \right]\right],\\
& {\geqslant}& \delta{\varepsilon}\mathbb{E}_{X} \left[
\mathds{1}_{\delta{\varepsilon}<|\eta(X)-1/2|<{\varepsilon}}
\mathbb{E}_{\otimes^n} \left[
\mathds{1}_{\Phi_{k,n}(X) \neq \Phi_d^{\star}(X)} \right] \mathds{1}_{\lbrace \| X \| {\leqslant}R_d \rbrace}  \right],\end{aligned}$$ where $R_d := \tau\sqrt{d}$ for some $\tau >0$. Proposition \[prop:gaussian\_alpha\] gives $\beta_d=2/d$ in our situation. From Proposition \[prop:gaussian\_alpha\], the value of $L_R$ given in , and the choice of $R = R_d$, we know that a $\tau >0$ exists such that $L_{R_d} = d$. It is important to notice that $R$ is independent of $n$.

We now use Lemma 5, Lemma 17 and Lemma 18 of [@chaudhuri]: for any $(\beta_d,L_R)$-smooth distribution (see the dependency on $\beta_d$ in Equation \[eq:smooth\]), then a constant $\kappa>0$ exists such that for any $k$ and $n$: $$\mathbb{P}_{\otimes^n}\left[\Phi_{k,n}(X) \neq \Phi_d^{\star}(X) \, \left\vert \, |\eta(X)-1/2| {\leqslant}\frac{1}{\sqrt{k}} - L_{R_d} \left(\frac{k+\sqrt{k}+1}{n}\right)^{\beta_d}\right.\right] {\geqslant}\kappa.$$ According to our choice of $k_n$ and $R_d$, we then have for any $\delta>0$: $$\begin{aligned}
\mathbb{E} \mathcal{R}(\Phi_{k_n,n,d})-\mathcal{R}(\Phi_d^{\star}) & {\geqslant}& \kappa \delta {\varepsilon}\mathbb{E}_{X} \left[
\mathds{1}_{\delta {\varepsilon}<|\eta(X)-1/2|<{\varepsilon}} 
\mathds{1}_{|\eta(X)-1/2|<\frac{1}{\sqrt{k_n}} - L_R \left(\frac{k_n+\sqrt{k_n}+1}{n}\right)^{\beta} }\mathds{1}_{\lbrace \| X \| {\leqslant}R_d \rbrace} \right]\nonumber\\
& {\geqslant}&  \kappa \delta {\varepsilon}\mathbb{E}_{X} \left[
\mathds{1}_{\delta {\varepsilon}<|\eta(X)-1/2|<{\varepsilon}} 
\mathds{1}_{|\eta(X)-1/2|< \left( \frac{k_n}{n}\right)^{2/d} \left[2d - d \left(1+k_n^{-1/2}+k_n^{-1}\right)^{2/d}  \right] }\mathds{1}_{\lbrace \| X \| {\leqslant}R_d \rbrace} \right] \nonumber\\
& {\geqslant}& \kappa \delta {\varepsilon}\mathbb{E}_{X} \left[
\mathds{1}_{\delta {\varepsilon}<|\eta(X)-1/2|<{\varepsilon}} 
\mathds{1}_{|\eta(X)-1/2|< \frac{d}{2} \left( \frac{k_n}{n} \right)^{2/d}}\mathds{1}_{\lbrace \| X \| {\leqslant}R_d \rbrace} \right],
\label{eq:lower_bound}\end{aligned}$$ where we used that $k{\leqslant}K_n$. To obtain the best achievable lower bound in (\[eq:lower\_bound\]), ${\varepsilon}$ has to be chosen as large as possible. We are driven to the choice (${\varepsilon}$ depends on $n$ and $d$): $${\varepsilon}_n  = \frac{1}{2} d\left( \frac{k_n}{n}\right)^{2/d} .$$ Then one has for any value of $\delta$ smaller than $1$: $$\begin{aligned}
\mathcal{R}_{f,g}(\Phi_{k,n})-\mathcal{R}(\Phi_d^{\star}) 
& {\geqslant}& c_{\delta} {\varepsilon}_n \mathbb{E}_{X} \left[ \mathds{1}_{\delta {\varepsilon}_n <|\eta(X)-1/2|<{\varepsilon}_n} \mathds{1}_{\lbrace \| X \| {\leqslant}R_d \rbrace} \right], \\
& {\geqslant}&c_{\delta} {\varepsilon}_n \mathbb{P}_X \left(\lbrace \delta {\varepsilon}_n <|\eta(X)-1/2|<{\varepsilon}_n \rbrace \cap \lbrace \| X \| {\leqslant}R_d \rbrace\right) \end{aligned}$$ Again, we shall use the margin property of the Gaussian translation model: Theorem \[thm:crown\] in Appendix \[s:A\] shows that a $\delta$ exists (independent on $n$) such that $$\mu \left( \delta t {\leqslant}\left| \eta(X) - \frac{1}{2} \right| {\leqslant}t   \right) {\geqslant}\check{c}_\delta \, t,$$ where $\check{c}$ is a small enough positive constant. In the same time, there exists a constant $C_\tau$ such that $$\mathbb{P}(\| X\| {\leqslant}\tau \sqrt{d}) {\geqslant}C_\tau.$$ The last bound of the excess risk above together with the previous inequality lead to a lower bound of the order ${\varepsilon}_n^{2}$: a constant $C_1$ independent on $n$ and $d$ exists such that $$\mathbb{E} \mathcal{R}(\Phi_{k,n,d})-\mathcal{R}(\Phi_d^{\star}) {\geqslant}C_1 d^2 \left( \frac{k}{n}\right)^{4/d} {\geqslant}\frac{C_1}{k}$$ We stress that this lower bound is uniform for any $k {\leqslant}K_n$ which leads to the desired result. The upper bound involved in the statement of Proposition \[theo:knngauss\] is a simple consequence of Theorem 4.3 of [@GKM16].

Proof of Theorem \[thm:lwr\_bound\_knn\] {#proof:lwr_bound_knn}
----------------------------------------

### Technical result

Below, we establish a complementary result with a lower bound on the probability involved in the margin condition. This will make it possible to derive a lower bound of the nearest neighbour classifier.

\[prop:mino\_proba\] Let $X$ distributed according to the model (\[eq:model\]) and for any fixed $\Delta=\|f-g\|_2$, then: $$\forall {\varepsilon}< 1/4 \qquad
\mathbb{P}\left(\left| \eta(X)-\frac{1}{2} \right|{\leqslant}{\varepsilon}\right) {\geqslant}(2\pi)^{-1/2} \left[  \frac{{\varepsilon}}{\Delta}  e^{-(1+\Delta/2)^2/2}  \wedge \frac{e^{-1/2}}{2} \right] .$$

To alleviate the notations, we skip the dependency on $X$ and write $\eta-1/2=\frac{q_f-q_g}{2(q_f+q_g)}$. We then repeat the arguments used above: $$\begin{aligned}
{\mathbb{P}}\left( \left| \eta-\frac{1}{2}\right|{\leqslant}{\varepsilon}\right) & = & 
{\mathbb{P}}\left( \frac{|q_f-q_g|}{2(q_f+q_g)} {\leqslant}{\varepsilon}\right) \\
& = & {\mathbb{P}}\left( \frac{q_f-q_g}{2(q_f+q_g)} {\leqslant}{\varepsilon}\, , \, q_f>q_g \right) + 
{\mathbb{P}}\left( \frac{q_g-q_f}{2(q_f+q_g)} {\leqslant}{\varepsilon}\, , \, q_f<q_g \right)
\\
& {\geqslant}&{\mathbb{P}}\left(\frac{q_f-q_g}{2 q_f} {\leqslant}{\varepsilon}\, , \, q_f>q_g \right) + 
{\mathbb{P}}\left( \frac{q_g-q_f}{2q_g} {\leqslant}{\varepsilon}\, , \, q_f<q_g \right) \\
& = & {\mathbb{P}}\left( 0{\leqslant}1- \frac{q_g}{q_f} {\leqslant}2 {\varepsilon}\right) + 
{\mathbb{P}}\left( 0{\leqslant}1- \frac{q_f}{q_g} {\leqslant}{\varepsilon}\right) \\
& = & {\mathbb{P}}\left( \log(1-2{\varepsilon}) {\leqslant}\log\left(\frac{q_g}{q_f}\right) {\leqslant}0  \right) + 
{\mathbb{P}}\left( \log(1-2{\varepsilon}) {\leqslant}\log\left(\frac{q_f}{q_g}\right) {\leqslant}0  \right)\end{aligned}$$ We compute a lower bound of the first bound (the second term being handled similarly. For ${\varepsilon}<1/4$, it can be checked that $\log(1-2 {\varepsilon}) < - {\varepsilon}$. Therefore, we have $${\mathbb{P}}\left( \log(1-2{\varepsilon}) {\leqslant}\log\left(\frac{q_g}{q_f}\right) {\leqslant}0  \right) {\geqslant}{\mathbb{P}}\left(  - {\varepsilon}{\leqslant}\log\left(\frac{q_g}{q_f}\right) {\leqslant}0  \right)$$ Using again the conditional distribution of $X \vert Y$ and that $Y$ is distributed according to a Bernoulli distribution $\mathcal{B}(1/2)$, we have $${\mathbb{P}}\left(  - {\varepsilon}{\leqslant}\log\left(\frac{q_g}{q_f}\right) {\leqslant}0  \right) 
= \frac{1}{2} {\mathbb{P}}\left( - {\varepsilon}{\leqslant}\frac{\Delta^2}{2} + \Delta \xi {\leqslant}0 \right) + \frac{1}{2}
{\mathbb{P}}\left( - {\varepsilon}{\leqslant}-\frac{\Delta^2}{2} + \Delta \xi {\leqslant}0 \right),$$ where $\Delta = \|f-g\|_2$ and $\xi$ is distributed according to $\mathcal{N}(0,1)$. We can conclude that

$${\mathbb{P}}\left(\left| \eta-\frac{1}{2}\right|{\leqslant}{\varepsilon}\right) {\geqslant}\frac{1}{2} \int_{-\frac{{\varepsilon}}{\Delta}-\frac{\Delta}{2}}^{-\Delta/2} \frac{e^{-t^2/2}}{\sqrt{2\pi}} dt + \frac{1}{2} \int_{-\frac{{\varepsilon}}{\Delta}+\frac{\Delta}{2}}^{\Delta/2} \frac{e^{-t^2/2}}{\sqrt{2\pi}} dt.$$ Then, we split our study into two cases:

-   If ${\varepsilon}{\leqslant}\Delta$, then $\forall t \in [-\frac{{\varepsilon}}{\Delta}-\frac{\Delta}{2},\frac{\Delta}{2}]$ and $\frac{e^{-t^2/2}}{\sqrt{2 \pi}} {\geqslant}\frac{e^{-(1+\Delta/2)^2/2}}{\sqrt{2 \pi}}$ and in this case: $${\mathbb{P}}\left(\left| \eta-\frac{1}{2}\right|{\leqslant}{\varepsilon}\right) {\geqslant}\frac{e^{-(1+\Delta/2)^2/2}}{\sqrt{2 \pi}} \frac{{\varepsilon}}{\Delta}$$

-   If ${\varepsilon}> \Delta$, $$\begin{aligned}
    {\mathbb{P}}\left(\left| \eta-\frac{1}{2}\right|{\leqslant}{\varepsilon}\right)& {\geqslant}& \frac{1}{2}  \int_{-\frac{{\varepsilon}}{\Delta}}^{-\Delta/2} \frac{e^{-t^2/2}}{\sqrt{2\pi}} dt + \frac{1}{2} \int_{-\frac{{\varepsilon}}{\Delta}}^{0} \frac{e^{-t^2/2}}{\sqrt{2\pi}} dt\\
    & {\geqslant}& \int_{-\frac{{\varepsilon}}{\Delta}}^{-\Delta/2} \frac{e^{-t^2/2}}{\sqrt{2\pi}} dt \\
    & {\geqslant}& (2\pi)^{-1/2} \left[ \int_{-1}^0  e^{-t^2/2} dt - \frac{\Delta}{2} \right]\\
    & {\geqslant}& \frac{e^{-1/2}}{2 \sqrt{2 \pi}},\end{aligned}$$ where the last bound comes from the fact that $\int_{-1}^0  e^{-t^2/2} dt {\geqslant}e^{-1/2}$ while $\Delta<{\varepsilon}<1/4<e^{-1/2}$.

This ends the proof of the Proposition.

A key consequence is the lower bound of the area of the crown $ \delta {\varepsilon}{\leqslant}| \eta-1/2|{\leqslant}{\varepsilon}$ for $\delta$ small enough.

\[thm:crown\] Let $X$ given by (\[eq:model\]) and for any fixed $\Delta=\|f-g\|_2$, if we set $\delta =  \frac{e^{-(1+\Delta/2)^2/2}}{2 \sqrt{2\pi}}$, then: $$\forall {\varepsilon}{\leqslant}\frac{1}{4} \wedge \Delta \qquad 
\mathbb{P}\left( \delta {\varepsilon}{\leqslant}\left| \eta(X)-\frac{1}{2} \right|{\leqslant}{\varepsilon}\right) {\geqslant}\delta \frac{{\varepsilon}}{\Delta}.$$

For a given $c>0$, we introduce $\delta =  \frac{e^{-(1+\Delta/2)^2/2}}{c \sqrt{2\pi}}$ and use the decomposition $$\begin{aligned}
\mathbb{P}\left( \delta {\varepsilon}{\leqslant}\left| \eta(X)-\frac{1}{2} \right|{\leqslant}{\varepsilon}\right) &= &
\mathbb{P}\left(\left| \eta(X)-\frac{1}{2} \right|{\leqslant}{\varepsilon}\right) - {\mathbb{P}}\left(\left| \eta(X)-\frac{1}{2} \right|{\leqslant}\delta {\varepsilon}\right)\\
& {\geqslant}& c \delta \frac{{\varepsilon}}{\Delta} -  {\mathbb{P}}\left(\left| \eta(X)-\frac{1}{2} \right|{\leqslant}\delta {\varepsilon}\right), \\\end{aligned}$$ where the last line comes from Proposition \[prop:mino\_proba\]. Now, we use Proposition \[thm:margin\] to conclude that $$\mathbb{P}\left( \delta {\varepsilon}{\leqslant}\left| \eta(X)-\frac{1}{2} \right|{\leqslant}{\varepsilon}\right) {\geqslant}(c-1) \delta \frac{{\varepsilon}}{\Delta}.$$ We now choose $c=2$ and obtain the desired result.

Proposition \[thm:crown\] states that when $\Delta$ is small, the measure of the uncertainty area for the classification ($\eta \simeq 1/2$) has an important mass although this measure decreases linearly with the inverse of $\Delta$. This result is intuitive and translates the fact that for large values of $\Delta$, the classification problem is easy (the two classes are well separated) and there is a steep transition from $\{\eta>1/2\}$ to $\{\eta<1/2\}$.

### Logarithmic rate of Nearest Neighbor rule

This last paragraph is devoted to the proof of Theorem \[thm:lwr\_bound\_knn\], which shows that a sample splitting strategy used with the NN rule is not efficient with a logarithmic decrease of the misclassification rate.

Since the truncation is chosen once for all at the beginning of the classification process with a sample-splitting strategy, our elementary starting point is given by: $$\mathcal{R}_{f,g}({\widehat}{\Phi}_{kNN}^{{\widehat}{d}})-\mathcal{R}_{f,g}(\Phi^{\star})  {\geqslant}\min_{d \in \mathbb{N}}   \mathcal{R}_{f,g}({\widehat}{\Phi}_{kNN}^{d})-\mathcal{R}_{f,g}(\Phi^{\star}).$$ For any frequency threshold $d \in \mathbb{N}$, we decompose the excess risk as: $$\label{eq:bayes_bayesd}
\mathcal{R}_{f,g}(\Phi_{k,n,d})-\mathcal{R}_{f,g}(\Phi^{\star}) = \mathcal{R}_{f,g}(\Phi_{k,n,d})-\mathcal{R}_{f,g}(\Phi^\star_d)+ \mathcal{R}_{f,g}(\Phi_d^\star) - \mathcal{R}_{f,g}(\Phi^{\star}),$$ where $\Phi^{\star}_d$ is the Bayes classification rule with the Gaussian $d$-dimensional model that involves the first $d$ frequencies. Proposition \[theo:knngauss\] shows that if $\Delta^2=\|f-g\|_2^2$, then a constant $c_{\Delta,1}$ exists such that: $$\label{eq:knnbye}
\mathcal{R}_{f,g}(\Phi_{k,n})-\mathcal{R}_{f,g}(\Phi^\star_d) {\geqslant}c_{\Delta,1} n^{-\frac{4}{d+4}}.$$ We now focus on the second term of (\[eq:bayes\_bayesd\]). Since $Y$ is distributed according to a Bernoulli distribution $\mathcal{B}(1/2)$, we have: $$\mathcal{R}_{f,g}(\Phi^\star_d) - \mathcal{R}_{f,g}(\Phi^{\star}) = \frac{1}{2}\left( \mathbb{P}_{f} [\Phi^\star_d=1] - \mathbb{P}_{f} [\Phi^\star=1]\right) +  \frac{1}{2}\left( \mathbb{P}_{g} [\Phi^\star_d=0] - \mathbb{P}_{g} [\Phi^\star=0]\right).$$ We compute the first term (the second term is handled similarly). Let $f,g$ be fixed function belonging to ${\mathcal{H}_s}(R)$ which will be made precise latter on. We define $\Delta_d^2=\|g-f\|_{d,2}^2$ the $L^2$ norm of $g-f$ restricted to the first $d$ coefficients. If $\xi$ is a standard Gaussian random variable, we have: $$\mathbb{P}_{f} [\Phi^\star_d(X)=1] = \mathbb{P}_f \left[ \langle X-f,g-f\rangle_d> \frac{\|g-f\|_{d,2}^2}{2}  \right]= \mathbb{P}\left( \xi \Delta_d > \frac{\Delta_d^2}{2}\right)$$ In the meantime, the second probability can be computed as $$\mathbb{P}_{f} [\Phi^\star(X)=1]=\mathbb{P}_f \left[ \langle X-f,g-f\rangle> \frac{\|g-f\|_{2}^2}{2}  \right]
= \mathbb{P}\left( \xi \Delta > \frac{\Delta^2}{2}\right).$$ Hence, we deduce that $$\mathbb{P}_{f} [\Phi^\star_d(X)=1] - \mathbb{P}_{f} [\Phi^\star(X)=1]  = \int_{\Delta_d/2}^{\Delta} \gamma(s) ds {\geqslant}\gamma(\Delta) \frac{\Delta-\Delta_d}{2} = \gamma(\Delta) \frac{\Delta^2-\Delta_d^2}{2(\Delta+\Delta_d)} {\geqslant}\frac{\Delta^2-\Delta_d^2}{4 \Delta}\gamma(\Delta).$$ We can then find $f$ and $g$ such that $\Delta^2 < 1$ and $\Delta^2-\Delta_d \sim d^{-2s}$ because $f$ and $g$ shall belong to the Sobolev space $\mathcal{H}_s(R)$. Hence, we deduce the following lower bound on the excess risk between the truncated Bayes rule and the non parametric Bayes rule: a constant $c_{\Delta,2}$ exists such that $$\label{eq:bayesbie}
 \mathbb{P}_{f} [\Phi^\star_d=1] - \mathbb{P}_{f} [\Phi^\star=1] {\geqslant}c_{\Delta,2} \, d^{-2s}.$$ Gathering Equations (\[eq:knnbye\]) and (\[eq:bayesbie\]), we deduce that $$\mathcal{R}_{f,g}({\widehat}{\Phi}_{k,n,{\widehat}d})-\mathcal{R}_{f,g}(\Phi^{\star})  {\geqslant}c_{\Delta,3} \min_{d \in \mathbb{N}^\star}
\left[d^{-2s} +n^{-\frac{4}{4+d}}\right].$$ We then optimize our lower bound with respect to $d$ and we obtain the conclusion of the proof.

[^1]: Possible solutions include: slightly improving Proposition \[thm:margin\] via a tighter Gaussian concentration bound (to gain a factor of nearly $e^{-\Delta^2/8}$), and optimizing the constant appearing in the exponential term of Lemma \[lem:GaussianMassCone\] (Appendix \[lem:GaussianMassCone\]).
