plot.embedding
Plot factor scores on x and y axis from a SPEARobject for a particular dataset data
.
Plot factor scores on x and y axis from a SPEARobject for a particular dataset data
.
list(list("plot"), list("embedding"))(
data = "train",
cv = FALSE,
group = "response",
x = 1,
y = 2,
show.ellipse = TRUE,
show.legend = FALSE
)
Argument |Description
------------- |----------------
data
| Which dataset to use? Can be any dataset listed under $data$____
. Defaults to "train"
.
cv
| If data = "train"
, get factor scores generated from $run.cv.spear
? If $run.spear
was used or if data != "train"
this parameter is ignored. Defaults to FALSE
. NOTE: There is an element of randomness if the factor scores are not correlated with the response, so it is recomended to view the factor scores with cv = FALSE
group
| How to color points? Defaults to "response" (indicated by $options$current.response.idx), but can be any feature name found in colnames(SPEARobj$data$train$X)
x
| Which factor to show on the x axis? Defaults to 1
.
y
| Which factor to show on the y axis? Defaults to 2
.
show.ellipse
| Include ellipses (only if group
is categorical)? Defaults to TRUE
show.legend
| Show the legend of the plot (for group
)? Defaults to FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.