check_Bmatrix function

Function which checks B matrix of Archetypal Analysis Y ~ A B Y in order to find the used rows for creating each archetype and the relevant used weights.

Function which checks B matrix of Archetypal Analysis Y ~ A B Y in order to find the used rows for creating each archetype and the relevant used weights.

check_Bmatrix(B, chvertices = NULL, verbose = TRUE)

Arguments

  • B: The kappas×nkappas \times n matrix such that Y ~ ABY or Frobenius norm ||Y-ABY|| is minimum
  • chvertices: The vector of rows which represent the Convex Hull of data frame
  • verbose: If set to TRUE, then results are printed out.

Returns

A list with members:

  1. used_rows, a list with used rows for creating each archetype
  2. used_weights, a list with the relevant weights that have been used
  3. leading_rows, the rows for each archetype with greatest weight
  4. leading_weights, the weights of leading rows
  5. used_on_convexhull, the portion of used rows which lie on Convex Hull (if given)

Examples

{ # Load data "wd2" data("wd2") df = wd2 # Run AA: aa = archetypal(df = df, kappas = 3, verbose = FALSE) # Check B matrix: B = aa$B yy = check_Bmatrix(B, verbose = TRUE) yy$used_rows yy$used_weights yy$leading_rows yy$leading_weights # Check if used rows lie on ConvexHull ch = chull(df) yy = check_Bmatrix(B, chvertices = ch, verbose = FALSE) yy$used_on_convexhull # }

See Also

archetypal, check_Bmatrix, find_closer_points

& study_AAconvergence

  • Maintainer: Demetris Christopoulos
  • License: GPL (>= 2)
  • Last published: 2024-05-23

Useful links