solarforecastarbiter.datamodel.DatetimeCost¶
-
class
solarforecastarbiter.datamodel.
DatetimeCost
(datetimes: Tuple[pandas._libs.tslibs.timestamps.Timestamp, ...], cost: Tuple[float, ...], aggregation: str, net: bool, fill: str, timezone: str = None)[source]¶ Cost values based on datetimes.
Parameters: - datetimes (tuple/iterable of datetime-like objects) – The datetimes to associate with each cost value
- cost (tuple of float) – The cost per unit error of the forecasted variable for each datetime. Must have the same length as datetimes.
- 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.
- fill (str) – Fill method to apply for datetimes between those specified in datetimes. Options are ‘forward’ or ‘backward’.
- timezone (str, default None) – IANA timezone string to use when constructing datetimes. If None, the timezone of the observations is used, which is the report timezone when calculated in a report.
-
__init__
(datetimes: Tuple[pandas._libs.tslibs.timestamps.Timestamp, ...], cost: Tuple[float, ...], aggregation: str, net: bool, fill: str, timezone: str = None) → None¶
Methods
__init__
(datetimes, …], cost, …], …)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. Attributes
timezone