yarn@singletest:~/Mahout/mahout-distribution-0.9/bin$ ./mahout testnb -i /workspace/mahout/week4/data/test-vectors -m /workspace/mahout/week4/nbmodel -l /workspace/mahout/week4/labindex -ow -o /workspace/mahout/week4/20news-test-result -c
注意:测试时的-i跟着的输入路径是第四步拆分出来的测试集。
测试结果:
14/09/05 23:18:09 INFO test.TestNaiveBayesDriver: Complementary Results:
=======================================================
Summary
-------------------------------------------------------
Correctly Classified Instances : 2887 74.9675%
Incorrectly Classified Instances : 964 25.0325%
Total Classified Instances : 3851
=======================================================
Confusion Matrix
-------------------------------------------------------
a b <--Classified as
1131 413 | 1544 a = 20news-bydate-test
551 1756 | 2307 b = 20news-bydate-train
=======================================================
Statistics
-------------------------------------------------------
Kappa 0.486
Accuracy 74.9675%
Reliability 49.7892%
Reliability (standard deviation) 0.4314
14/09/05 23:18:09 INFO driver.MahoutDriver: Program took 17504 ms (Minutes: 0.29173333333333334)
===============================================
Ubuntu 13.04上搭建Hadoop环境
Ubuntu 12.10 +Hadoop 1.2.1版本集群配置
搭建Hadoop环境(在Winodws环境下用虚拟机虚拟两个Ubuntu系统进行搭建)
===============================================