RE: [Classifier4j-devel] Next Step after Training?
Status: Beta
Brought to you by:
nicklothian
From: Nick L. <nl...@es...> - 2004-07-15 23:19:02
|
> > > Right - your first two for-loops are training your > classifier to learn which messages are your > whitelist messages. Once this is done you can > test any other message against your training > to get a "rating". When you run the classify() > method it will return a value between 0.0 and 1.0. > > 0 meaning that the new message you ran classify > on is definitely a blacklist message... 1.0 meaning > its definitely a whitelist message. > > At least this is the way I'm using Classifier4J.. > not sure if its the absolute correct way :) > > My rules are similar to SpamBayes in that > I mark anything with a 0.9 and above as a definite > match.. anything below that is considered a partial > match (I use C4J as a spam filter against email msgs). > > Nick - correct me if Im wrong? I'm no C4J expert, > but using it this way seems to work pretty well > for me. > Yes, that is exactly correct. You can use the IClassifier.isMatch(String) to do the same thing - each instance of the classifier has a setCutoff() method (I think that's the name) to set the exact point above which anything will be marked as spam. |