compute.mse: Predictive accuracy estimates (MSE) across trees for linear...

Description Usage Arguments Value Examples

View source: R/compute.mse.R

Description

Predictive accuracy estimates (MSE) across trees for linear or poisson regression model.

Usage

1
compute.mse(response, predictions)

Arguments

response

A vector of actual response of outcome variable.

predictions

A vector of predicted response for the same outcome variable.

Value

MSE estimates

Examples

1
2
3
4
5
6
7
# The MSE should be 2.5. Off by 2 half the time, off by 1 the other half
response <- matrix(c(rep(0,100), rep(10,100)))
predictions <-
    matrix(nrow=20, ncol = 3,
           data = c(rep(1,100), rep(8,100), rep(1,100), rep(8,100),
                    rep(1,100), rep(8,100)))
compute.mse(response, predictions)

mobForest documentation built on Aug. 1, 2019, 1:05 a.m.