kmkurn / pytorch-crf

(Linear-chain) Conditional random field in PyTorch.
https://pytorch-crf.readthedocs.io
MIT License
935 stars 151 forks source link

Feature: return scores from decoding phase #70

Closed plandes closed 2 years ago

plandes commented 3 years ago

Returning the scores as a measure of how well the algorithm works on a validation set (or even training) it would be nice to get the score generated from the Viterbi algorithm and plot. I have added a parameter (score_reduction), documented it and tested it. I have tried to follow your documentation and coding to make it consistent with your package.

Thank you for writing this package. It's well written and up to date with the latest PEP conventions.

coveralls commented 3 years ago

Coverage Status

Coverage decreased (-7.1%) to 92.857% when pulling d5d1fb2daded78d0dcb42e9a17c887bb67182841 on plandes:master into 4cd79bc8af55fb0f34a2a39b2e38f0e71c208fd4 on kmkurn:master.