mobForest (version 1.3.1)

predictive.acc: Predictive performance across all trees

Description

Predictive performance across all trees

Usage

predictive.acc(object = "mfOutput", newdata = F, prob_cutoff = NULL,
  plot = T)

Arguments

object

An object of class mobforest.output

newdata

A logical value specifying if the performance needs to be summarized on test data supplied as new_test_data argument to mobforest.analysis function.

prob_cutoff

Predicted probabilities converted into classes (Yes/No, 1/0) based on this probability threshold. Only used for producing predicted Vs actual classes table.

plot

A logical value specifying if the use wishes to view performance plots

Value

A list with performance parameters

oob_r2

A vector of predictive accuracy estimates (ranging between 0 and 1) measured on Out-of-bag cases for each tree

oob_mse

A vector of MSE for Out-of-bag data for each tree. Valid only if the outcome is continuous.

oob_overall_r2

Overall predictive accuracy measured by combining Out-of-bag predictions across trees.

oob_overall_mse

Overall MSE measured by combining Out-of-bag predictions across trees.

general_r2

A vector of predictive accuracy (ranging between 0 and 1) measured on complete learning data for each tree

general_mse

A vector of MSE measured on complete learning data for each tree. Valid only if the outcome is continuous.

general_overall_r2

Overall predictive accuracy measured by combining predictions across trees.

general_overall_mse

Overall MSE measured by combining predictions across trees. Valid only if the outcome is continuous.

model_used

The node model and partition variables used for analysis

family

Error distribution assumptions of the model

Examples

Run this code
# NOT RUN {
library(mlbench)
set.seed(1111)
# Random Forest analysis of model based recursive partitioning load data
data("BostonHousing", package = "mlbench")
BostonHousing <- BostonHousing[1:90, c("rad", "tax", "crim", "medv", "lstat")]

# Recursive partitioning based on linear regression model medv ~ lstat with 3
# trees.  1 core/processor used. 
rfout <- mobforest.analysis(as.formula(medv ~ lstat), c("rad", "tax", "crim"),
    mobforest_controls = mobforest.control(ntree = 3, mtry = 2, replace = T,
        alpha = 0.05, bonferroni = T, minsplit = 25), data = BostonHousing,
    processors = 1, model = linearModel, seed = 1111)

# get predictive performance estimates and produce a performance plot
pacc <- predictive.acc(rfout)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab