dgpage_fit: Fit the DGPAGE model (Algorithm 1, Eqs. (12), (18), (23) in...

View source: R/dpage.R

dgpage_fitR Documentation

Fit the DGPAGE model (Algorithm 1, Eqs. (12), (18), (23) in the paper)

Description

This function implements the main training procedure of DGPAGE, which jointly learns the adaptive graph W and the projection matrix P by minimizing Eq. (12) in an alternating fashion.

Usage

dgpage_fit(
  X,
  S,
  D,
  r = 10,
  alpha = 0.001,
  beta = 1e-05,
  maxiter = 20,
  tol = 1e-05,
  verbose = TRUE
)

Arguments

X

A numeric matrix of size n \times d (training data). Note: We internally transpose X to follow the paper's notation.

S

The n x n similarity graph (from compute_similarity_graph).

D

The n x n diversity graph (from compute_diversity_graph).

r

Target dimension (number of embedding directions to learn).

alpha

The hyper-parameter in Eq. (12). Typical range: [1e-6, 1e-1].

beta

The hyper-parameter in Eq. (12). Typical range: [1e-6, 1e-1].

maxiter

Maximum number of iterations for the alternating updates.

tol

Convergence tolerance on the objective value.

verbose

Whether to print progress information.

Details

Steps:

  1. Initialize P randomly (size d \times r).

  2. For each iteration:

    • Update W via Eq. (18) (closed-form).

    • Update P by solving the generalized eigenvalue problem in Eq. (23).

  3. Repeat until convergence or maxiter is reached.

Dimensions (in internal notation):

  • Let Z = t(X) be d x n,

  • P is d x r,

  • Y = P^\top Z is r x n.

  • W is n x n.

  • S, D are n x n.

Value

A list with:

  • P: the d \times r projection matrix,

  • W: the n \times n learned adjacency matrix (adaptive graph),

  • objective: the final objective value,

  • iter: number of iterations taken,

  • Z: stored internally (d x n) = t(X) (just for reference).


bbuchsbaum/discursive documentation built on April 14, 2025, 4:57 p.m.