rxLinPredError: Calculates prediction error statistics for linear regression...

Description Usage Arguments Value See Also Examples

Description

Calculates a number of error statistics, including:

MSE

Mean squared error

MAPE

Mean absolute percentage erorr

MPE

Mean percentage error

MSWD

Mean squared weighted deviation

Usage

1
2
rxLinPredError(actualVarName, predVarName, data, sWeights = NULL,
  blocksPerRead = 1, reportProgress = rxGetOption("reportProgress"))

Arguments

actualVarName

String name of the response variable.

predVarName

String name of the predicted variable.

sWeights

String name of error weights.

data

data frame, or character string containing an '.xdf' file name (with path), or RxXdfData object representing an '.xdf' file containing the actual and observed variables.

blocksPerRead

number of blocks to read for each chunk of data read from the data source.

reportProgress

Passed to rxDataStep

Value

returns a list of prediction measures MSE, MAPE, MPE, MSWD

See Also

Other Model summary statistics: rxAIC; rxF1score

Examples

1
2
3
4
5
6
7
8
9
library(RevoScaleR)

## Demonstrates calculation on data frame

fit <- rxLinMod(Sepal.Length ~ Petal.Length + Petal.Width, data = iris)
prd <- rxPredict(fit, iris)$Sepal.Length_Pred
dat <- data.frame(Sepal.Length=iris$Sepal.Length, Sepal.Length_Pred=prd, Weights = rep(1, nrow(iris))/nrow(iris))
rxLinPredError("Sepal.Length", "Sepal.Length_Pred", data=dat, sWeights="Weights")
rxLinPredError("Sepal.Length", "Sepal.Length_Pred", data=dat)

RevoEnhancements/RevoEnhancements documentation built on May 9, 2019, 9:46 a.m.