do3Postprocess | R Documentation |
The estimated model will be renormalized, reflected (change of sign) or the components will be reordered. Functions that provide access to some components of the model: coordinates, weights.
## S3 method for class 'tucker3'
do3Postprocess(x, reflectA, reflectB, reflectC, reorderA, reorderB, reorderC, ...)
## S3 method for class 'parafac'
do3Postprocess(x, reflectA, reflectB, reflectC, reorder, ...)
## S3 method for class 'parafac'
coordinates(x, mode = c("A", "B", "C"), type = c("normalized", "unit", "principal"), ...)
## S3 method for class 'tucker3'
coordinates(x, mode = c("A", "B", "C"), type = c("normalized", "unit", "principal"), ...)
## S3 method for class 'parafac'
weights(object, ...)
## S3 method for class 'tucker3'
weights(object, mode = c("A", "B", "C"), ...)
## S3 method for class 'parafac'
reflect(x, mode = c("A", "B", "C"), rsign = 1, ...)
## S3 method for class 'tucker3'
reflect(x, mode = c("A", "B", "C"), rsign = 1, ...)
x |
Tucker3 or Parafac solution |
object |
Tucker3 or Parafac solution (alternative of |
reflectA |
How to handle the signs of the components of mode A - can be a single number or a vector with length of the number of components of A |
reflectB |
How to handle the signs of the components of mode B - can be a single number or a vector with length of the number of components of B |
reflectC |
How to handle the signs of the components of mode C - can be a single number or a vector with length of the number of components of C |
reorder |
How to reorder the components of a Parafac solution - a vector with length of the number of components |
reorderA |
How to reorder the components of mode A - a vector with length of the number of components of A giving the new order |
reorderB |
How to reorder the components of mode B - a vector with length of the number of components of B giving the new order |
reorderC |
How to reorder the components of mode C - a vector with length of the number of components of C giving the new order |
mode |
For which mode to provide the coordinates or weights. Default is mode A |
type |
Which type of coordinates to provide. Default is "normalized" |
rsign |
How to change the sign of the components of the given mode. Can be a single number or a vector with length of the number of components of the corresponding mode. |
... |
Potential further arguments passed to lower level functions. |
The output value of do3Postproces() is the postprocessed solution, Parafac or Tucker3.
The output of weights()
and coordinates()
are the respective values.
Valentin Todorov valentin.todorov@chello.at and Maria Anna Di Palma madipalma@unior.it and Michele Gallo mgallo@unior.it
Kroonenberg (2008). Applied multiway data analysis. Wiley series in probability and statistics. Hoboken NJ, Wiley.
data(elind)
x1 <- do3Scale(elind, center=TRUE, scale=TRUE)
(cp <- Parafac(x1, ncomp=3, const=c("orth", "none", "none")))
cp$B
cp1 <- do3Postprocess(cp, reflectB=-1) # change the sign of all components of B
cp1$B
weights(cp1)
coordinates(cp1)
coordinates(cp1, type="principal")
## Same as above - the centering and scaling is done inside the Parafac procedure
(cp1 <- Parafac(elind, ncomp=3, const=c("orth", "none", "none"),
center=TRUE, scale=TRUE))
## Robust estimation with robust scaling with median and mad
(cp1 <- Parafac(elind, ncomp=3, const=c("orth", "none", "none"),
center=median, scale=mad, robust=TRUE))
## Robust estimation with robust scaling with median and Qn (Rousseeuw and Croux, 1993)
require(robustbase)
(cp1 <- Parafac(elind, ncomp=3, const=c("orth", "none", "none"),
center=median, scale=Qn, robust=TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.