$\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 