class solarforecastarbiter.datamodel.ErrorBandCost(bands: Tuple[solarforecastarbiter.datamodel.CostBand, ...])[source]

Cost that varies based on the error value. For each error band, one of the other cost functions is applied to the errors within the band. If an error value does not fall within any band ranges, no cost is calculated for that error.

Parameters:bands (tuple of solarforecastarbiter.datamodel.CostBand) – Specification of the error bands and associated cost functions.


Each error is restricted to a single band/cost function, so the order in bands determines which band is applied in ascending priority. For example, if bands[0].error_range = (0, 2) and bands[1].error_range == (1, 3), the cost function of bands[0] is applied for all errors from [0, 2] and bands[1] is applied for errors from (2, 3].

__init__(bands: Tuple[solarforecastarbiter.datamodel.CostBand, ...]) → None


__init__(bands, …])
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.