Classify data using Apache Mahout Classify data using Apache Mahout hadoop hadoop

Classify data using Apache Mahout


I am having a similar problem.

Running

bin/mahout org.apache.mahout.classifier.Classify --path <PATH TO MODEL> --classify <PATH TO TEXT FILE TO BE CLASSIFIED> --encoding UTF-8 --analyzer org.apache.mahout.vectorizer.DefaultAnalyzer --defaultCat unknown --gramSize 1 --classifierType bayes --dataSource hdfs

will classify a text file based on the model.

This might get you a bit further forward, but I'm guessing that, like me, you want to classify a whole load of documents and you want the output in a useful format.

Might have to program a bit of java to do this. Someone has an example that looks like it will do what I want at https://bitbucket.org/jaganadhg/blog/src/tip/bck9/java/src/org/bc/kl/ClassifierDemo.java


I hate to plug my own work, but we put an entire section into Mahout in Action about classification. Theory, code examples, case study practice, even an entire server farm implementation.

You can get the pre-release version at http://www.manning.com/owen/