jbrukh / bayesian

Naive Bayesian Classification for Golang.
Other
799 stars 128 forks source link

Changed SafeProbScores to return an error instead of a panic #3

Closed mish15 closed 10 years ago

mish15 commented 10 years ago

I know this is not a backwards compatible change, but this is a mathematical error and not really a runtime error, so: a) a panic causes functions to unwind outside of this package, which is not good for long running applications and b) there's little need to fill the log with stack traces given this is a known and reasonably common outcome.

PS. Great package, really useful, thanks!

c4milo commented 10 years ago

+1

jbrukh commented 10 years ago

Thanks for the patch.