Skip to content

Commit

Permalink
fix scikit-learn FutureWarning about LinearSVC dual parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
osma committed Aug 16, 2023
1 parent cc0bcd8 commit e037b78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion annif/backend/svc.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _corpus_to_texts_and_classes(

def _train_classifier(self, veccorpus: csr_matrix, classes: list[int]) -> None:
self.info("creating classifier")
self._model = LinearSVC()
self._model = LinearSVC(dual="auto")
self._model.fit(veccorpus, classes)
annif.util.atomic_save(
self._model, self.datadir, self.MODEL_FILE, method=joblib.dump
Expand Down

0 comments on commit e037b78

Please sign in to comment.