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
but I have also seen
and
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):
quanteda/tests/testthat/test-fcm.R
Lines 51 to 56 in 7c3ae47
Here,
diag(as.matrix(fcmat_toks_win_ord))often agrees with the expected document context diagonalbut I have also seen
and