condtour {condvis} | R Documentation |
Conditional tour; a tour through sections in data space
Description
Whereas ceplot
allows the user to interactively
choose sections to visualise, condtour
allows the user to pre-select
all sections to visualise, order them, and cycle through them one by one.
']' key advances the tour, and '[' key goes back. Can adjust
threshold
for the current section visualisation with ',' and '.'
keys.
Usage
condtour(data, model, path, response = NULL, sectionvars = NULL,
conditionvars = NULL, threshold = NULL, lambda = NULL,
distance = c("euclidean", "maxnorm"), view3d = FALSE,
Corder = "default", conf = FALSE, col = "black", pch = NULL,
xsplotpar = NULL, modelpar = NULL, xcplotpar = NULL)
Arguments
data |
A dataframe. |
model |
A fitted model object, or a list of such objects. |
path |
A dataframe, describing the sections to take. Basically a
dataframe with its |
response |
Character name of response variable in |
sectionvars |
Character name(s) of variables in |
conditionvars |
Character name(s) of variables in |
threshold |
Threshold distance. Observed data which are a distance
greater than |
lambda |
A constant to multiply by number of factor mismatches in
constructing a general dissimilarity measure. If left |
distance |
The type of distance measure to use, either
|
view3d |
Logical; if |
Corder |
Character name for method of ordering conditioning variables.
See |
conf |
Logical; if |
col |
Colour for observed data points. |
pch |
Plot symbols for observed data points. |
xsplotpar |
Plotting parameters for section visualisation as a list,
passed to |
modelpar |
Plotting parameters for models as a list, passed to
|
xcplotpar |
Plotting parameters for condition selector plots as a list,
passed to |
Value
Produces a set of interactive plots. One device displays the current
section. A second device shows the the current section in the space of the
conditioning predictors given by conditionvars
. A third device shows
some simple diagnostic plots; one to show approximately how much data are
visible on each section, and another to show what proportion of data are
visited by the tour.
See Also
Examples
## Not run:
data(powerplant)
library(e1071)
model <- svm(PE ~ ., data = powerplant)
path <- makepath(powerplant[-5], 25)
condtour(data = powerplant, model = model, path = path$path,
sectionvars = "AT")
data(wine)
wine$Class <- as.factor(wine$Class)
library(e1071)
model5 <- list(svm(Class ~ ., data = wine))
conditionvars1 <- setdiff(colnames(wine), c("Class", "Hue", "Flavanoids"))
path <- makepath(wine[, conditionvars1], 50)
condtour(data = wine, model = model5, path = path$path, sectionvars = c("Hue"
, "Flavanoids"), threshold = 3)
## End(Not run)