sd">    rmse : float</span>
<span class="sd">        Root mean squared error</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="ow">not</span> <span class="n">ref</span><span class="p">:</span>
        <span class="n">ref</span> <span class="o">=</span> <span class="n">targets</span><span class="o">.</span><span class="n">mean</span><span class="p">()</span>
    <span class="n">n</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span>