score_weights for individual labels in SpanCategorizer training #10124
-
As far as I understand, the Is it possible to assign weights to theses individual scores through the I want to assign higher weight to a rare class, where otherwise the model produces 0 recall. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
No, you can only assign weights to the top-level (float) entries in the If you have a rare class, you can try other options like augmenting your training data or experimenting with having the rare class in its own |
Beta Was this translation helpful? Give feedback.
No, you can only assign weights to the top-level (float) entries in the
scores
dict. Even if you could do this, it would only affect the eval step (primarily used for early stopping) and wouldn't influence the actual model training at all.If you have a rare class, you can try other options like augmenting your training data or experimenting with having the rare class in its own
spancat
component with a lowerthreshold
(obviously the whole pipeline is slower overall, but if recall is important the tradeoff might be worth it for your task).