rfScenario: Quantile Regression Forests for AC photovoltaic power...

Description Usage Arguments Details Value Author(s) See Also

Description

Apply Random Forest to predict AC power of a photovoltaic plant with different combinations of predictors and training set definition methods.

Usage

1
2
3
4
5
6
7
rfPredict(test, history, nDays)

predictPac(goal, history, id, nDays, method, point,...)

rfScenario(history, id, nDays, method, typeRes, mc.cores=1,...)

scenarioSet(id, vals)

Arguments

test

A zoo object, a time series including the same predictors as in the history time series. The prediction will have the same time index as this object.

goal

A Date or a character that can be coerced to a Date. It defines the day to be predicted. If method = 'previous' it must be included in the time index of the history time series.

history, vals

A zoo object, a time series including historic values of the variable to predict (first column of the object), and past values of predictors.

id

Character that identifies the scenario (combination of predictors to be included in the training set). There are 17 scenarios defined in this version of the package. For example, if you wish to use the scenario 3, you have to use id = 'S03'.

nDays

numeric. The prediction is computed using a train set of N days from history located before the test day. When nDays = 0, prediction is computed using all the days from history, excluding the test day. When nDays='all', prediction is computed using all the days from history including the test day. This argument is used in rfScenario only when method = 'previous'.

method

Character. It defines the method used to select the days included in the training set:

  • 'previous', selects those N days immediately before the day to be predicted. As a consequence, the database must be complete up to the day prior the prediction.

  • 'kt', selects N days according to the absolute difference between the clearness index of the day to be predicted and the clearness index of each day included in the database. Both clearness index are computed with the irradiance forecast retrieved from the NWP model. The N days with the lowest absolute difference are chosen to conform the training set. Therefore, the database does not need to be complete up to the day prior the prediction, and could also be composed by older information.

  • 'ks', selects N days according to the similarity between the empirical distribution function of the irradiance forecast for the day to be predicted and the empirical distribution function of the irradiance forecast for each day included in the database. Here the Kolmogorov-Smirnov statistic is used to compute the distance between the distributions. The N days with the lowest Kolmogorov-Smirnov distance are chosen to conform the training set. As in the method KT, the database does not need to be complete up to the day prior the prediction.

typeRes

Character, if typeRes = 'power' the function rfScenario provides intradaily results, and daily error statistics with typeRes='stats'

point

point represented by a SpatialPoints* object, or a numeric vector of length 2 (longitude, latitude), in degrees.

mc.cores

The number of cores to use, i.e. at most how many child processes will be run simultaneously. Parallelization requires at least two cores. It relies on forking and hence is not available on Windows.

...

Additional arguments for predVarsLocal, which can pass additional arguments to getRasterDays

Details

rfPredict returns a zoo object, a time series, with a column for each quantile prediction, named q1, q5, and q9. The time index is the same as the test object. This function uses Quantile Regression Forests to produce the quantile prediction.

predictPac returns the prediction produced by rfPredict with the selected scenario and method, and for the day defined with goal. It is a zoo object, a time series, with a column for each quantile prediction, named q1, q5, and q9.

rfScenario uses predictPac to construct a time series of forecasts for every day included in the history time series. This function is indicated to asses the performance of the predictions with a certain scenario. If typeRes = 'power' the result is a time series with the same frequency as history. If typeRes = 'stats' the result is a daily time series with error statistics and the clearness index, with a row for each day included in history.

Value

A zoo time series.

Author(s)

Marcelo Pinho Almeida and Oscar Perpiñán Lamigueiro

See Also

quantregForest, predict.quantregForest, zoo, calcSol, local2Solar


iesiee/PVF documentation built on May 9, 2019, 1:09 a.m.