plot.optiPlusModel: Plot for optiPlusModel class

Description Usage Arguments Examples

Description

plot creates plots for optiPlusModel class according to the specified type

Usage

1
plot.optiPlusModel(x, type, digits = 2, color = "#4d88ff")

Arguments

x

optiPlusModel. An object of class optiPlusModel.

type

character. To choose the type of plot :

  • "obsPred" : plot Predicted vs Observed

  • "importance" : plot of Variable Importance

digits

numeric. integer indicating the number of decimal places (round) or significant digits (signif) to be used.

color

character. Choose color in hexadecimal.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
data(mtcars)

#Creation of cross-validation column :
cv <- createCv(mtcars, columName = "cyl")

#Data
y <- "mpg"
ycolumnindex <- names(mtcars) == "mpg"
x <- mtcars[, !ycolumnindex]
y <- mtcars[, ycolumnindex]

mod <- rfMod(x = x, y = y, cvcol = cv,
 ntree= c(50, 100), mtry = c(3,4),
  nodesize = c(3, 4, 5),  criterion = "RMSE")

plot(mod, type = "obsPred", digits = 3, color = "#00b300")
plot(mod, type = "importance", color = "#00b300")
plot(mod, type = "decileProb")

anaislaot/optiPlus documentation built on May 23, 2019, 6:03 a.m.