preprocess: Preprocessing function for agg methods

View source: R/agg.R

preprocessR Documentation

Preprocessing function for agg methods

Description

This does the preprocessing steps that all the agg methods have in common.

Usage

preprocess(x, q = 0)

Arguments

x

A vector of forecasts

q

The quantile to use for replacing 0s and 1s (between 0 and 1)

Value

A vector of forecasts with 0s are replaced by the qth quantile and 100s are replaced by the (1 - q)th quantile.

Note

Assumes forecasts are in the range 0 to 100, inclusive.


aggutils documentation built on Aug. 23, 2023, 1:09 a.m.