activetext / activeText

R package for using active learning to classify text documents.
6 stars 3 forks source link

Fix issue with multi-class classification #6

Closed esallenback closed 6 months ago

esallenback commented 6 months ago

There are two main changes in this PR to fix an issue a user found with multi-class classification:

  1. Removal of "n_class" as a parameter. The number of classes can be calculated by the number of items in "labels." Having "n_class" as an additional parameter makes it possible to have a contradiction between the two.
  2. Checks on "n_cluster" added. The default of n_cluster is now NULL instead of 2. For binary classification (2 classes), n_cluster must be greater than or equal to 2. For multi-class classification (number of classes greater than 2), n_cluster must be equal to n_class.