plot.tweaked.suggestion: Plot statistics for suggestion of tweaked instances...

Description Usage Arguments Value Examples

View source: R/plot_functions.R

Description

Plot statistics for suggestion of tweaked instances (population)

Usage

1
2
3
## S3 method for class 'tweaked.suggestion'
plot(x, ..., type = c("absoluteSum", "direction",
  "frequency"), .invisible = FALSE)

Arguments

x

an object returned by tweak().

...

Other arguments passed on to methods. Not currently used.

type

what type of plot should be drawn. Possible types are

  • "absoluteSum" draw baplot for absolute sum of suggestions.

  • "direction" draw boxplot for suggestions among instances.

  • "frequency" draw baplot for total number of tweaked among instances.

"absoluteSum" is defult.

.invisible

a logical. If .invisible = TRUE, plot won't be shown.

Value

a list of

Default is "absoluteSum".

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
X <- iris[, 1:(ncol(iris)-1)]
scaled.X <- scale(X)
true.y <- iris[, ncol(iris)]

rf.iris <- randomForest(scaled.X, true.y, ntree=30)
es.rf <- set.eSatisfactory(forest.rf, ntree = 30, epsiron = 0.3, resample = TRUE)
tweaked <- tweak(es.rf, newdata= scaled.X, label.from = "spam", label.to = "nonspam",
                 .dopar = TRUE)
plot(tweaked)
plot(tweaked, type="a")
plot(tweaked, type="d")
plot(tweaked, type="f")

## End(Not run)

katokohaku/featureTweakR documentation built on May 17, 2019, 11:17 p.m.