fit.twcfta | R Documentation |
Implements K-means clustering and afterwards factorial reduction in a sequential fashion.
fit.twcfta(model, X_i_jk, full_tensor_shape, reduced_tensor_shape) ## S4 method for signature 'tandem' fit.twcfta(model, X_i_jk, full_tensor_shape, reduced_tensor_shape)
model |
Initialized tandem model. |
X_i_jk |
Matricized tensor along mode-1 (I objects). |
full_tensor_shape |
Dimensions of the tensor in full space. |
reduced_tensor_shape |
Dimensions of tensor in the reduced space. |
The procedure requires sequential clustering and factorial decomposition.
The K-means clustering algorithm is initially applied to the matricized tensor X_i_jk to obtain the centroids matrix X_g_jk and the membership matrix U_i_g.
The Tucker2 decomposition technique is then implemented on the centroids matrix X_g_jk to yield the core centroids matrix Y_g_qr and the component weights matrices B_j_q and C_k_r.
Output attributes accessible via the '@' operator.
U_i_g0 - Initial object membership function matrix.
B_j_q0 - Initial factor/component matrix for the variables.
C_k_r0 - Initial factor/component matrix for the occasions.
U_i_g - Final/updated object membership function matrix.
B_j_q - Final/updated factor/component matrix for the variables.
C_k_r - Final/updated factor/component matrix for the occasions.
Y_g_qr - Derived centroids in the reduced space (data matrix).
X_i_jk_scaled - Standardized dataset matrix.
BestTimeElapsed - Execution time for the best iterate.
BestLoop - Loop that obtained the best iterate.
BestKmIteration - Number of iteration until best iterate for the K-means.
BestFaIteration - Number of iteration until best iterate for the FA.
FaConverged - Flag to check if algorithm converged for the K-means.
KmConverged - Flag to check if algorithm converged for the Factor Decomposition.
nKmConverges - Number of loops that converged for the K-means.
nFaConverges - Number of loops that converged for the Factor decomposition.
TSS_full - Total deviance in the full-space.
BSS_full - Between deviance in the reduced-space.
RSS_full - Residual deviance in the reduced-space.
PF_full - PseudoF in the full-space.
TSS_reduced - Total deviance in the reduced-space.
BSS_reduced - Between deviance in the reduced-space.
RSS_reduced - Residual deviance in the reduced-space.
PF_reduced - PseudoF in the reduced-space.
PF - Actual PseudoF value to obtain best loop.
Labels - Object cluster assignments.
FsKM - Objective function values for the KM best iterate.
FsFA - Objective function values for the FA best iterate.
Enorm - Average l2 norm of the residual norm.
This procedure is useful to further interpret the between clusters variability of the data and to understand the variables and/or occasions that most contribute to discriminate the clusters. However, the application of this technique could lead to the masking of variables that are not informative of the clustering structure.
since the Tucker2 model is applied after the clustering, this cannot help select the most relevant information for the clustering in the dataset.
tandemModelssimuclustfactor \insertReftucker1966simuclustfactor
fit.twfcta
tandem
X_i_jk = generate_dataset()$X_i_jk model = tandem() twcfta = fit.twcfta(model, X_i_jk, c(8,5,4), c(3,3,2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.