Metric Utils#
- darts.metrics.utils.classification_support(func)[source]#
This decorator adds support for classification metrics including sanity checks and handling of class probabilities and categorical samples.
- Return type:
Callable[...,Union[float,list[float],ndarray,list[ndarray]]]
- darts.metrics.utils.interval_support(func)[source]#
This decorator adds support for quantile interval metrics with sanity checks, processing, and extraction of quantiles from the intervals.
- Return type:
Callable[...,Union[float,list[float],ndarray,list[ndarray]]]
- darts.metrics.utils.multi_ts_support(func)[source]#
This decorator further adapts the metrics that took as input two (or three for scaled metrics with insample) univariate/multivariate
TimeSeriesinstances, adding support for equally-sized sequences ofTimeSeriesinstances. The decorator computes the pairwise metric forTimeSerieswith the same indices, and returns a float value that is computed as a function of all the pairwise metrics using a series_reduction subroutine passed as argument to the metric function.If a ‘Sequence[TimeSeries]’ is passed as input, this decorator provides also parallelisation of the metric evaluation regarding different
TimeSeries(if the n_jobs parameter is not set 1).- Return type:
Callable[...,Union[float,list[float],ndarray,list[ndarray]]]
- darts.metrics.utils.multivariate_support(func)[source]#
This decorator transforms a metric function that takes as input two univariate TimeSeries instances into a function that takes two equally-sized multivariate TimeSeries instances, computes the pairwise univariate metrics for components with the same indices, and returns a float value that is computed as a function of all the univariate metrics using a component_reduction subroutine passed as argument to the metric function.
- Return type:
Callable[...,Union[float,list[float],ndarray,list[ndarray]]]