| nmf.ffb | R Documentation |
Fits the NMF-FFB model
Y_1 \approx X \bigl( \Theta_1 Y_1 + \Theta_2 Y_2 \bigr)
under non-negativity constraints with orthogonality and sparsity regularization. The function returns the estimated latent factors, structural coefficient matrices, and the implied equilibrium (input–output) mapping.
At equilibrium, the model can be written as
Y_1 \approx (I - X \Theta_1)^{-1} X \Theta_2 Y_2
\equiv M_{\mathrm{model}} Y_2,
where M_{\mathrm{model}} = (I - X \Theta_1)^{-1} X \Theta_2 is a
Leontief-type cumulative-effect operator in latent space.
Internally, the latent feedback and exogenous loading matrices are stored as
C1 and C2, corresponding to \Theta_1 and \Theta_2,
respectively.
nmf.ffb(
Y1,
Y2,
rank = NULL,
X.init = "nndsvd",
X.L2.ortho = 100,
C1.L1 = 1,
C2.L1 = 0.1,
epsilon = 1e-06,
maxit = 5000,
seed = 123,
...
)
Y1 |
A non-negative numeric matrix of endogenous variables with rows = variables (P1), columns = samples (N). |
Y2 |
A non-negative numeric matrix of exogenous variables with
rows = variables (P2), columns = samples (N).
Must satisfy |
rank |
Integer; number of latent factors |
X.init |
Initialization strategy for the basis matrix
In all cases the result is column-normalized to |
X.L2.ortho |
L2 orthogonality penalty for |
C1.L1 |
L1 sparsity penalty for |
C2.L1 |
L1 sparsity penalty for |
epsilon |
Relative convergence threshold for the objective function.
Iterations stop when the relative change in reconstruction loss falls
below this value. Default: |
maxit |
Maximum number of iterations for the multiplicative updates.
Default: |
seed |
Random seed used to initialize |
... |
Additional hidden arguments controlling the optional
feedforward baseline (used both as an
|
A list with components:
X |
Estimated basis matrix ( |
C1 |
Estimated latent feedback matrix ( |
C2 |
Estimated exogenous loading matrix ( |
XC1 |
Feedback matrix |
XC2 |
Direct-effect matrix |
XC1.radius |
Spectral radius |
XC1.norm1 |
Induced 1-norm |
Leontief.inv |
Leontief-type inverse |
M.model |
Equilibrium mapping
|
amplification |
Latent amplification factor
|
amplification.bound |
Geometric-series upper bound
|
Q |
Effective latent dimension used in the fit. |
SC.cov |
Correlation between sample and model-implied covariance
(flattened) of |
SC.map |
Correlation between the equilibrium operator
|
MAE |
Mean absolute error between |
objfunc |
Vector of reconstruction losses per iteration. |
objfunc.full |
Vector of penalized objective values per iteration. |
iter |
Number of iterations actually performed. |
Satoh, K. (2025). Applying non-negative matrix factorization with covariates to structural equation modeling for blind input-output analysis. arXiv:2512.18250. https://arxiv.org/abs/2512.18250
nmf.ffb.inference, nmf.ffb.cv,
nmf.ffb.split, nmf.ffb.DOT,
summary.nmf.sem
# Simple NMF-FFB with iris data (non-negative)
Y <- t(iris[, -5])
Y1 <- Y[1:2, ] # Sepal
Y2 <- Y[3:4, ] # Petal
result <- nmf.ffb(Y1, Y2, rank = 2, maxit = 500)
result$MAE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.