solarforecastarbiter.datamodel.ConstantCost

class solarforecastarbiter.datamodel.ConstantCost(cost: float, aggregation: str, net: bool)[source]

A constant cost per unit error of the forecasted variable

Parameters:
  • cost (float) –
  • aggregation (str) – Aggregation method to use after calculating cost for the error series. Currently only ‘sum’ or ‘mean’ are available.
  • net (bool) – If True, compute the ‘net’ aggregate error instead of first calcuating the absolute error before performing the aggregation.
__init__(cost: float, aggregation: str, net: bool) → None

Methods

__init__(cost, aggregation, net)
from_dict(input_dict[, raise_on_extra]) Construct a dataclass from the given dict, matching keys with the class fields.
replace(**kwargs) Convience wrapper for dataclasses.replace() to create a new dataclasses from the old with the given keys replaced.
to_dict() Convert the dataclass into a dictionary suitable for uploading to the API.