docs/functions/plot.embedding.md

plot.embedding

Plot factor scores on x and y axis from a SPEARobject for a particular dataset data.

Description

Plot factor scores on x and y axis from a SPEARobject for a particular dataset data.

Usage

list(list("plot"), list("embedding"))(
  data = "train",
  cv = FALSE,
  group = "response",
  x = 1,
  y = 2,
  show.ellipse = TRUE,
  show.legend = FALSE
)

Arguments

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



jgygi/SPEAR documentation built on July 5, 2023, 5:35 p.m.