tSIR {tensorBSS} | R Documentation |
SIR for Tensor-Valued Observations
Description
Computes the tensorial SIR.
Usage
tSIR(x, y, h = 10, ...)
Arguments
x |
Numeric array of an order at least three. It is assumed that the last dimension corresponds to the sampling units. |
y |
A numeric or factor response vector. |
h |
The number of slices. If |
... |
Arguments passed on to |
Details
Computes the mode-wise sliced inverse regression (SIR) estimators for a tensor-valued data set and a univariate response variable.
Value
A list with class 'tbss', inheriting from class 'bss', containing the following components:
S |
Array of the same size as x containing the predictors. |
W |
List containing all the unmixing matrices. |
Xmu |
The data location. |
datatype |
Character string with value "iid". Relevant for |
Author(s)
Joni Virta, Klaus Nordhausen
Examples
data(zip.train)
x <- zip.train
rows <- which(x[, 1] == 0 | x[, 1] == 3)
x0 <- x[rows, 2:257]
y0 <- as.factor(x[rows, 1])
x0 <- t(x0)
dim(x0) <- c(16, 16, length(y0))
res <- tSIR(x0, y0)
plot(res$S[1, 1, ], res$S[1, 2, ], col = y0)