You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by "Chandra Mohan, Ananda Vel Murugan" <An...@honeywell.com> on 2013/05/30 08:41:15 UTC

running mahout cmdump

Hi,

I am doing text classification using complimentary Naïve bayes in Mahout 0.7 and Hadoop 1.0.2. I want to export the confusion matrix as HTML.

I running the following command

mahout cmdump -i PIPS0-testing/part-m-00000 -o PIPS0-testing -ow -html

I am getting the following exception

Exception in thread "main" java.io.IOException: wrong value class: org.apache.mahout.math.MatrixWritable@17494c8 is not class org.apache.mahout.math.VectorWritable

Am I giving wrong input? Please  help.

Regards,
Anand.C

RE: running mahout cmdump

Posted by "Chandra Mohan, Ananda Vel Murugan" <An...@honeywell.com>.
Hi, 

I got it working. 

I wrote a utility class which takes the classification output (part-m-00000) and creates the confusion matrix. part-m-00000 was a sequence file with vectors and cmdump trying to convert Vectors into Matrix and hence I was getting the error. I don't know whether it is a bug. 

By reusing some of the code from TestNaiveBayesDriver.java, ResultAnalyzer.java and ConfusionMatrixDumper.java, I was able to create HTML confusion matrix. 

Regards,
Anand.C

-----Original Message-----
From: Chandra Mohan, Ananda Vel Murugan 
Sent: Thursday, May 30, 2013 2:33 PM
To: user@mahout.apache.org
Subject: RE: running mahout cmdump

Hi, 

I tried vectordump and it created the CSV file. Is there any easy way to convert this file or vectors into confusion matrix? Please suggest. 

Regards,
Anand.C


-----Original Message-----
From: Chandra Mohan, Ananda Vel Murugan 
Sent: Thursday, May 30, 2013 12:11 PM
To: user@mahout.apache.org
Subject: running mahout cmdump

Hi,

I am doing text classification using complimentary Naïve bayes in Mahout 0.7 and Hadoop 1.0.2. I want to export the confusion matrix as HTML.

I running the following command

mahout cmdump -i PIPS0-testing/part-m-00000 -o PIPS0-testing -ow -html

I am getting the following exception

Exception in thread "main" java.io.IOException: wrong value class: org.apache.mahout.math.MatrixWritable@17494c8 is not class org.apache.mahout.math.VectorWritable

Am I giving wrong input? Please  help.

Regards,
Anand.C

RE: running mahout cmdump

Posted by "Chandra Mohan, Ananda Vel Murugan" <An...@honeywell.com>.
Hi, 

I tried vectordump and it created the CSV file. Is there any easy way to convert this file or vectors into confusion matrix? Please suggest. 

Regards,
Anand.C


-----Original Message-----
From: Chandra Mohan, Ananda Vel Murugan 
Sent: Thursday, May 30, 2013 12:11 PM
To: user@mahout.apache.org
Subject: running mahout cmdump

Hi,

I am doing text classification using complimentary Naïve bayes in Mahout 0.7 and Hadoop 1.0.2. I want to export the confusion matrix as HTML.

I running the following command

mahout cmdump -i PIPS0-testing/part-m-00000 -o PIPS0-testing -ow -html

I am getting the following exception

Exception in thread "main" java.io.IOException: wrong value class: org.apache.mahout.math.MatrixWritable@17494c8 is not class org.apache.mahout.math.VectorWritable

Am I giving wrong input? Please  help.

Regards,
Anand.C