quanteda.classifiers icon indicating copy to clipboard operation
quanteda.classifiers copied to clipboard

Incorrect list index and object name used in crossval() and summarize_results().

Open Mayazure opened this issue 2 years ago • 0 comments

In crossval.R:

In line 41 and 42: the k (number of folds) should be i (index of current fold).

In line 69 and 70: object x should be x_df.

The second typo resulted in wrong values for precision, recall and f1 when aggregate over folds and classes, so that:

  1. F1 value may be greater than both Precision and Recall
  2. Average recall and balanced accuracy will have unequal value (which should be identical).

Mayazure avatar Oct 13 '23 19:10 Mayazure