Skip to content

vca(): higher memory requirements with decreasing p #64

Open

Description

@aloboa

Given

dim(X_dr)
[1] 1778467 8

vca() works with p=8 but finds memory problems with p<8:

> Xvca <- vca(X_dr, p = 8)
> Xvca <- vca(X_dr, p = 7)
Error: cannot allocate vector of size 23565.8 Gb

and
`

Xvca <- vca(X_dr[,1:7], p = 7)`

works

Is this as expected?

Activity

  1. rguliev commented on Jun 16, 2026

    @rguliev
    Collaborator

    The reason is that VCA (not this implementation, but the algorithm itself) expects the dimensionality of the data (ncol(X)) to be the same as p.
    That's why Xvca <- vca(X_dr[,1:7], p = 7) works.

    When ncol(X) > p then dimension reduction is applied. And that what is causing memory error in your case.

    Maybe docs and README should be more explicit on that. Thanks for pointing out.

  2. self-assigned this
    on Jun 16, 2026
  3. added
    Topic: documentation 📘
    on Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Topic: documentation 📘Topic: vca

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions