I’m using Classifier::Bayes and am trying to figure out how to handle
classifications that don’t fit any of my categories. It seems that it
will guess a category no matter how poor the match. Is there a good way
to use the hash values from #classify() to “figure out” how bad a match
is? I’d like to handle those cases as a “none of the above”. This isn’t
the greatest example but hopefully it’ll work well enough:
Imagine three categories (shopping, health, and technology) and I want
to classify the text “cows dirt barn”. Obviously, those words aren’t a
good fit for any of the three. What I want is a way to determine how bad
an attemped classification is, and react to it. I was thinking maybe a
catch-all, “empty” category could handle this?
I’m new to the world of classifiers in general, so this may be an easy
question. Any and all suggestions are greatly appreciated.