ClearSky
Clear sky transformer for solar data.
This is a transformation which converts a time series from it’s original domain into a percentage domain. The numerator at each time step in the transformation is the input values, the denominator is a weighted quantile of the time series for that particular time step. In the example of solar power transformations, the denominator is an approximation of the clear sky power, and the output of the transformation is the clearness index.
The clear sky power, i.e. the denominator, is calculated on a grid containing each unique combination of time-of-day and day-of-year. The spacing of the grid depends on the frequency of the input data.
The weights are defined using von-mises kernels with bandwidths chosen by the user.
This transformation can be inaccurate at low values, in the solar example during early morning and late evening. Therefore, clear sky values below a threshold can be fixed to zero in the transformed domain. Denominator values of zero are set to zero in the transformed domain by default.
This transformer is based on the work detailed in [1].
Schnellstart
from sktime.transformations.clear_sky import ClearSky
estimator = ClearSky(quantile_prob=0.95, bw_diurnal=100, bw_annual=10, min_thresh=0, n_jobs=None, backend='loky')Parameter(6)
- quantile_probfloat, default=0.95
- The probability level used to calculate the weighted quantile
- bw_diurnalfloat, default=100
- The bandwidth of the diurnal kernel. This is the kappa value of the von mises kernel for time of day.
- bw_annualfloat, default=10
- The bandwidth of the annual kernel. This is the kappa value of the von mises kernel for day of year.
- min_threshfloat, default=0
- The threshold of the clear sky power below which values are set to zero in the transformed domain.
- n_jobsint or None, default=None
- Number of jobs to run in parallel. None means 1 unless in a joblib.parallel_backend context. -1 means using all processors.
- backendstr, default=”loky”
- Specify the parallelisation backend implementation in joblib, where “loky” is used by default.
Beispiele
>>> from sktime.transformations.clear_sky import ClearSky
>>> from sktime.datasets import load_solar
>>> y = load_solar ()
>>> transformer = ClearSky ()
>>> # takes ~1min
>>> y_trafo = transformer. fit_transform (y)