Covariance Matrices for hyperSpec Objects

# S4 method for hyperSpec,missing
cov(
  x,
  y = NULL,
  use = "everything",
  method = c("pearson", "kendall", "spearman")
)

pooled.cov(x, groups, ..., regularize = 1e-05 * max(abs(COV)))

Arguments

x

hyperSpec object

y

not supported

use, method

handed to stats::cov()

groups

factor indicating the groups

...

ignored

regularize

regularization of the covariance matrix. Set 0 to switch off

pooled.cov calculates pooled covariance like e.g. in LDA.

Value

covariance matrix of size nwl (x) x nwl (x)

See also

Author

C. Beleites

Examples

image(cov(faux_cell))
pcov <- pooled.cov(faux_cell, faux_cell$region) plot(pcov$means)
image(pcov$COV)