Posted on 2008-06-25 10:16
qiyadeng 閱讀(3373)
評論(2) 編輯 收藏
ci-bayes實現了兩種貝葉斯分類方法:a Navie implementation 和 a Fisher implementation,是Toby segaran's 的書"Programming Collective Intelligence"的一部分的Java實現版本。
簡單的一個例子如下:
FisherClassifier fc=new FisherClassifierImpl();
fc.train("The quick brown fox jumps over the lazy dog's tail","good");
fc.train("Make money fast!", "bad");
String classification=fc.getClassification("money"); // should be "bad"