Estimates the shared rank of a multi-view dataset. If permutations are used, it finds the rank that maximizes the signal-to-noise ratio against a permuted null model. If `n_permutations = 0`, it finds the "elbow" of the real data's signal curve.

estimate_rank_by_permutation_rv(
  mat_list,
  n_permutations = 20,
  var_explained_threshold = 0.99,
  return_max = FALSE
)

Arguments

mat_list

A list of numeric matrices [subjects x features].

n_permutations

The number of permutations to create the null model. If set to 0, the function will use the elbow detection method instead.

var_explained_threshold

The variance threshold to determine the upper bound on k.

return_max

boolean just return the max likely rank from an individual matrix

Value

A list containing `optimal_k`, a results tibble, and a plot.