Returns the reconstructed matrix \(\hat{Y} = X B\) from a fitted NMF model.
For nmf.sem objects, returns the equilibrium prediction
\(\hat{Y}_1 = M_{model} Y_2\) if available. Supply Y1 and
Y2 to get the direct reconstruction
\(X (C_1 Y_1 + C_2 Y_2)\) instead.
Examples
result <- nmfkc(matrix(runif(50), 5, 10), rank = 2)
#> Y(5,10)~X(5,2)B(2,10)...
#> 0sec
fitted(result)
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7]
#> [1,] 0.4995998 0.24815097 0.6809763 0.4540411 0.21590008 0.3505264 0.5051586
#> [2,] 0.3079812 0.41909540 0.5217952 0.3941276 0.42843160 0.5860222 0.5237823
#> [3,] 0.2993788 0.64094847 0.5967430 0.4833731 0.67566634 0.8943268 0.6955407
#> [4,] 0.1112837 0.55945347 0.3449346 0.3175521 0.60762351 0.7789430 0.5148747
#> [5,] 0.7443564 0.09709801 0.9100946 0.5594559 0.01911593 0.1432742 0.5350751
#> [,8] [,9] [,10]
#> [1,] 0.536385387 0.3843668 0.4460027
#> [2,] 0.272193824 0.2841969 0.4069651
#> [3,] 0.213280548 0.3177290 0.5114678
#> [4,] 0.008714655 0.1751367 0.3494710
#> [5,] 0.859055948 0.5242638 0.5292518