Hi,
Even I am getting the same error as Siddharth for Testclassifier.
I have followed the steps given in
https://cwiki.apache.org/MAHOUT/wikipedia-bayes-example.html
I am ruuning Mahout-0.4 on windows m/c using JDK 1.6.
$bin/mahout testclassifier -m
D:/mahout-0.4/examples/bin/work/wikipedia/wikipediaClassification/wikipediao
utput -d D:/mahout-0.4/examp
les/bin/work/wikipedia/wikipediaClassification/wikipediainput
Running on hadoop, using HADOOP_HOME=C:\cygwin\home\Divya\hadoop-0.20.2
HADOOP_CONF_DIR=C:\cygwin\home\Divya\hadoop-0.20.2\conf
10/11/19 09:14:44 INFO bayes.TestClassifier: Loading model from:
{basePath=D/mahout-0.4/examples/bin/work/wikipedia/wikipediaClassifica
tion/wikipediaoutput, classifierType=bayes, alpha_i=1.0, dataSource=hdfs,
gramSize=1, verbose=false, encoding=UTF-8, defaultCat=unknown
,
testDirPath=D:/mahout-0.4/examples/bin/work/wikipedia/wikipediaClassificatio
n/wikipediainput}
10/11/19 09:14:44 INFO bayes.TestClassifier: Testing Bayes Classifier
Exception in thread "main" java.lang.NullPointerException
at
org.apache.mahout.classifier.ConfusionMatrix.getCount(ConfusionMatrix.java:1
02)
at
org.apache.mahout.classifier.ConfusionMatrix.incrementCount(ConfusionMatrix.
java:118)
at
org.apache.mahout.classifier.ConfusionMatrix.incrementCount(ConfusionMatrix.
java:122)
at
org.apache.mahout.classifier.ConfusionMatrix.addInstance(ConfusionMatrix.jav
a:90)
at
org.apache.mahout.classifier.ResultAnalyzer.addInstance(ResultAnalyzer.java:
68)
at
org.apache.mahout.classifier.bayes.TestClassifier.classifySequential(TestCla
ssifier.java:266)
at
org.apache.mahout.classifier.bayes.TestClassifier.main(TestClassifier.java:1
86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver
.java:68)
at
org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:184)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
@Siddharth - Are you able to resolve your error.
I have observed that in wikipediamodel it places file inside
trainer-tfIdf\trainer-tfIdf
Can any one point me why nested folders for trainer-tfIdf.
Thanks
Regards,
Divya
-----Original Message-----
From: siddharth chhabra [mailto:[email protected]]
Sent: Thursday, November 18, 2010 2:24 PM
To: [email protected]
Subject: RE: NPE while running testclassifier
I read through the whole archive discussion but he is not getting the same
error as me.
I am still getting the same NPE as before no matter how many how many
documents i put in the bayes-test-input folder.
Has anybody tested the classifier without hadoop ?
I am on a mac os with jdk 1.6 and have not set hadoop_home variable, but set
mahout_home correctly.
I am in los angeles and dont mind meeting someone in person to resolve the
issue either.
Any pointers will be appreciated.
Thanks
-Sid
> From: [email protected]
> Date: Fri, 12 Nov 2010 23:16:48 +0530
> Subject: Re: NPE while running testclassifier
> To: [email protected]
>
> Read through this archive discussion.
>
>
http://mail-archives.apache.org/mod_mbox/mahout-user/201010.mbox/%3CAANLkTik
[email protected]%3e