plot.sisal {sisal} | R Documentation |
Plotting Sequential Input Selection Results
Description
A plot
method for class "sisal"
. Supports 3 plot
types: error as a function of the number of variables, search graph,
and color key of the search graph.
Usage
## S3 method for class 'sisal'
plot(x, which = 1, standardize = "inherit", ...,
plotArgs = list(list(), list(mai = rep(0.1, 4))),
xlim = c(x[["d"]], 0), ylim = NULL, ask = TRUE,
dev.set = !ask, draw.node.labels = TRUE,
draw.edge.labels = TRUE, draw.selected.labels = TRUE,
rankdir = c("TB", "LR", "BT", "RL"),
fillcolor.normal = "deepskyblue",
fillcolor.pruned = "deeppink",
fillcolor.selected = "chartreuse",
fillcolor.levelbest = "gold",
fillcolor.small = "moccasin", fillcolor.large = "black",
fillcolor.NA = "white",
bordercolor.normal = "black",
bordercolor.special.levelbest = fillcolor.levelbest,
bordercolor.special.selected = fillcolor.selected,
color.by.error = FALSE,
ramp.space = c("Lab", "rgb"), ramp.size = 128,
error.limits = c(NA_real_, NA_real_),
category.labels =
c(normal = gettext("Other", domain="R-sisal"),
pruned = gettext("Pruned", domain="R-sisal"),
levelbest = gettext("Best\nin class", domain="R-sisal"),
selected = gettext("Selected", domain="R-sisal"),
special.levelbest = gettext("Best\n(no branching)",
domain="R-sisal"),
special.selected = gettext("Selected\n(no branching)",
domain="R-sisal"),
shape.normal=gettext("Other", domain="R-sisal"),
shape.highlighted=gettext("Highlighted", domain="R-sisal")),
integrate.colorkey = TRUE, colorkey.gap = 0.1,
colorkey.space = c("right", "bottom", "left", "top"),
colorkey.title.gp = gpar(fontface = "bold"),
nodesep = 0.25, ranksep = 0.5,
graph.attributes = character(0),
node.attributes = character(0),
edge.attributes = character(0))
Arguments
x |
an object of class |
which |
which plots to draw. A
The default is to draw plot number 1. For drawing plot number 2,
Bioconductor packages
Some other arguments of this method only apply to specific plots. |
standardize |
|
... |
arguments passed to |
plotArgs |
arguments passed to graphical functions. A
|
xlim |
the x limits |
ylim |
the y limits |
ask |
a |
dev.set |
a |
draw.node.labels |
a |
draw.edge.labels |
a |
draw.selected.labels |
a |
rankdir |
the drawing direction of plot number 2 (search graph).
A |
fillcolor.normal |
fill color for normal nodes in plot number 2. |
fillcolor.pruned |
fill color for pruned (unevaluated) nodes in
plot 2. If |
fillcolor.selected |
fill color for nodes representing the L.v
and L.f input variable sets of |
fillcolor.levelbest |
fill color for nodes with the smallest
validation error using a given number of input variables in plot 2.
If |
fillcolor.small |
if |
fillcolor.large |
if |
fillcolor.NA |
if |
bordercolor.normal |
border color for normal nodes in plot 2. |
bordercolor.special.levelbest |
border color for special nodes
in plot 2. If branching ( |
bordercolor.special.selected |
border color for another kind of
special nodes in plot 2. The “no branching” L.v or L.f node,
if different from the corresponding node in the solution where
branching is allowed, is marked with this border color. If
|
color.by.error |
a |
ramp.space |
color space to be used in plots number 2 and 3 if
|
ramp.size |
the number of colors to be used in the color
gradient of plot number 3 if |
error.limits |
a |
category.labels |
text labels to be used in plot number 3 if
|
integrate.colorkey |
a |
colorkey.gap |
a |
colorkey.space |
location of the color and shape key (plot 3)
relative to the graph (plot 2). One of |
colorkey.title.gp |
graphical parameters for the titles in plot
3. See |
nodesep |
a Graphviz attribute giving the minimum space in
inches between adjacent nodes representing the same number of input
variables. This |
ranksep |
a Graphviz attribute giving the minimum space in
inches between adjacent rows or columns of nodes, where a row or
column consists of nodes representing the same number of input
variables. This |
graph.attributes |
a named |
node.attributes |
a named |
edge.attributes |
a named |
Details
In argument plotArgs
, plotArgs[[1]]
is passed to
matplot
, plotArgs[[2]]
to the
plot method for class "Ragraph"
,
and plotArgs[[3]]
to draw.colorkey$key
.
For possible color values, see col2rgb
.
Value
When 2 %in% which
, the function invisibly returns
a graph of class "graphNEL"
representing the search graph of a run of sisal
.
Otherwise NULL
.
Author(s)
Mikko Korpela
References
For information about graph, node and edge attributes for plot number 2, see the Graphviz web site: http://www.graphviz.org/.
See Also
Examples
library(graphics)
foo <- testSisal(dataset="toy", Mtimes=10)
## Plotting the search graph requires "Rgraphviz" and "graph"
if (requireNamespace("Rgraphviz", quietly=TRUE) &&
requireNamespace("graph", quietly=TRUE)) {
plot(foo, which=2)
}
## Default output is a mean squared error plot
plot(foo)