n>

<span class="sd">    Returns</span>
<span class="sd">    -------</span>
<span class="sd">    med : float</span>
<span class="sd">        Median error</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">trim</span> <span class="o">=</span> <span class="p">(</span><span class="n">predictions</span> <span class="o">-</span> <span class="n">targets</span><span class="p">)</span><span class="o">.</span><span class="n">mean</span><span class="p">()</span>
    <span class="k">return</span