qrnn.predict: Evaluate quantiles from trained QRNN model

Description Usage Arguments Value References See Also Examples

View source: R/qrnn.predict.R

Description

Evaluate a fitted QRNN model or ensemble of models, resulting in a list containing the predicted quantiles.

Usage

1
qrnn.predict(x, parms)

Arguments

x

covariate matrix with number of rows equal to the number of samples and number of columns equal to the number of variables.

parms

list containing QRNN input-hidden and hidden-output layer weight matrices and other parameters from qrnn.fit.

Value

a list with number of elements equal to that of parms, each containing a column matrix of predicted quantiles.

References

Cannon, A.J., 2011. Quantile regression neural networks: implementation in R and application to precipitation downscaling. Computers & Geosciences, 37: 1277-1284. doi:10.1016/j.cageo.2010.07.005

See Also

qrnn.fit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
x <- as.matrix(iris[,"Petal.Length",drop=FALSE])
y <- as.matrix(iris[,"Petal.Width",drop=FALSE])

cases <- order(x)
x <- x[cases,,drop=FALSE]
y <- y[cases,,drop=FALSE]
y[y < 0.5] <- 0.5

set.seed(1)
parms <- qrnn.fit(x=x, y=y, n.hidden=3, tau=0.5, lower=0.5,
                  iter.max=500, n.trials=1)
p <- qrnn.predict(x=x, parms=parms)

matplot(x, cbind(y, p), type=c("p", "l"), pch=1, lwd=1)

qrnn documentation built on Dec. 6, 2017, 1:07 a.m.