{% include 'metrics_meta_table_text' %}
<details>
  <summary>
    <h4>Table of normalization, deadband, and cost parameters</h4>
  </summary>
  <p>
    The table below shows the normalization, deadband, and cost
    parameters used when calculating metrics.
    <ul>
      <li>
        <b>Normalization.</b> The <em>normalization</em>
        factor is applied when calculating the metrics NMAE, NMBE, and
        NRMSE. The normalization is in the same units as the forecast and
        observation. By default, AC power forecasts are normalized by AC
        capacity and DC power forecasts are normalized by DC
        capacity. Normalization for all other forecasts is undefined, and the
        metric values are set to <code>nan</code>.
      </li>
      <li>
        <b>Deadband.</b> The <em>deadband</em> accounts for observation
        uncertainty by setting the error (forecast - observation) equal to 0
        for any point that is within the deadband. The error is unchanged for
        any point that is outside the deadband. The deadband is specified as a
        percentage of the observation value at each time. A value of
        <code>None</code> indicates that no deadband was applied for that
        observation/forecast pair.  The deadband is accounted for in the following
        metrics: MAE, MBE, RMSE, MAPE, NMAE, NMBE, NRMSE, Skill, Cost.  It is
        ignored for all other metrics.
      </li>
      <li>
        <b>Cost Parameters.</b> The Cost metric is calculated using the set of cost
        models defined by <em>cost parameters</em>. See the
        <a href="https://solarforecastarbiter-core.readthedocs.io/en/latest/cost.html">
        solarforecastarbiter-core documentation</a> for a description of how these cost
        parameters are used to calculate Cost.
      </li>
    </ul>
  </p>
  <div class="report-table-wrapper">
  <table class="table table-striped table-borderless metrics-meta-table" style="width:100%; ">
      <caption style="caption-side: top; text-align: left;">
      </caption>
      <colgroup>
      <col style="width: 40%">
      <col style="width: 20%">
      <col style="width: 20%">
      <col style="width: 20%">
      </colgroup>
      <thead style="text-align: left;">
      <tr class="header" style="text-align: left;">
          <th colspan="1">Name</th>
          <th colspan="1">Normalization</th>
          <th colspan="1">Deadband (%)</th>
          <th colspan="1">Cost Parameters</th>
      </tr>
      </thead>
      <tbody style="text-align: left; overflow-wrap: break-word;">
      {% for pfxobs in report.raw_report.processed_forecasts_observations %}
      <tr>
          <td>{{ pfxobs.name }}</td>
          <td>
          {{ pfxobs.normalization_factor }}
          </td>
          <td>
          {{ pfxobs.uncertainty }}
          </td>
          <td>
          <a href="#cost-{{ pfxobs.cost.name | figure_name_filter }}">{{ pfxobs.cost.name }}</a>
          </td>
      </tr>
      {% endfor %}
      </tbody>
  </table>
  </div>
</details>
