Re: Best way to classify...
David King <[email protected]>
| Newsgroups | gmane.mail.spam.crm114 |
|---|---|
| Message-ID | <[email protected]> |
> Say, for example, that I have this piece of text which might belong to
> one of four classifications.
> Maybe it is spam, normal ham, ham about cats, ham about dogs. Can
> crm114 choose from multiple classifications at once?
> Or is it a binary decision sort of thing where I have to build a
> binary decision tree and consider spam vs ham and of the ham consider
> ham about cats vs ham about dogs?
I wouldn't say that it has to be a binary decision, but the choices
you gave are all binary. So yeah, you'd make a tree, like
ham spam
/ \
about cats about dogs
But you could just as easily have 'ham' have ten categories or twenty.
In pseudocode:
if classify(msg,['ham','spam']) == 'spam':
file('spam')
else:
category = classify(msg,['dogs', 'cats', 'bacon', 'cheese'])
file(category)
Or at least, such a tree works well for my data. You might want to try
it with yours before you take my word as gospel :)
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com