Skip to content

vector space exhausted with topicmodels::get_terms(): use apply #16

@ablaette

Description

@ablaette

With a large topic model, I get a vector space exhausted error when trying to use get_terms(). Internally, there is some unnecessary copying of the data.

This snippet does the job - maybe turn it into a function.

foo <- apply(lda@beta, 1, function(row) lda@terms[tail(order(row), 10)])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions