Skip to contents

Displays the factor blocks of a nmfae.signed fit as side-by-side heatmaps. Non-negative blocks (\(X_1, C_{+}, C_{-}, X_2\)) use the white-orange-red palette; the signed combined bottleneck \(C = C_{+} - C_{-}\) is rendered with a diverging blue-white-red palette so positive and negative weights are visually distinguishable.

Usage

nmfae.signed.heatmap(
  x,
  Y1.label = NULL,
  X1.label = NULL,
  X2.label = NULL,
  Y2.label = NULL,
  palette.pos = NULL,
  palette.signed = NULL,
  show.C = TRUE,
  ...
)

Arguments

x

An object of class "nmfae.signed".

Y1.label

Character vector for rows of \(X_1\).

X1.label

Decoder basis labels.

X2.label

Encoder basis labels.

Y2.label

Input variable labels.

palette.pos

Palette for non-negative blocks. Default white-orange-red.

palette.signed

Palette for signed \(C\). Default blue-white-red.

show.C

Logical. If TRUE (default), shows the combined signed \(C = C_{+} - C_{-}\) as a separate panel.

...

Not used.

Value

Invisible NULL. Called for its side effect (plot).

Lifecycle

This function is experimental. The interface may change in future versions.

References

Ding, C. H. Q., Li, T., & Jordan, M. I. (2010). Convex and semi-nonnegative matrix factorizations. IEEE Transactions on Pattern Analysis and Machine Intelligence, 32(1), 45–55.

Examples

# \donttest{
set.seed(1)
Y1 <- matrix(abs(rnorm(12)), 3, 4)
Y2 <- matrix(abs(rnorm(20)), 5, 4)
res <- nmfae.signed(Y1, Y2, rank = 2, rank.encoder = 2, maxit = 200)
#> Warning: maximum iterations (200) reached...
nmfae.signed.heatmap(res)

# }