Skip to content

"randomly" failing test-fcm #2375

Description

@bastistician

The following expectation from testing that "fcm works with dfm and tokens in the same way" fails unpredictably (at least on Alpine Linux, using the brand-new quanteda 4.0.1):

# same as document context diagonal
fcmat_toks_win_ord <- fcm(toks, context = "window", window = 1000, ordered = TRUE)
print(diag(as.matrix(fcmat_toks_doc)))
print(diag(as.matrix(fcmat_toks_win_ord)))
expect_equivalent(diag(as.matrix(fcmat_toks_doc)),
diag(as.matrix(fcmat_toks_win_ord)))

Here, diag(as.matrix(fcmat_toks_win_ord)) often agrees with the expected document context diagonal

b a c e f g 
1 1 0 0 0 0 

but I have also seen

a c b e f g 
1 0 1 0 0 0 

and

a c e f g b 
1 0 0 0 0 1 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions