[Spambayes] Training on data using timcv.py

Jonas jonas at rcpt.at
Sat Jan 19 13:02:56 CET 2013


Hi,
some more information about my installation (installed it both on  
linux and windows 7 64bit).

1. Downloaded and unzipped  
http://sourceforge.net/projects/spambayes/files/spambayes/1.1a6/spambayes-1.1a6.zip/download

2. Installed it with python setup.py install

3. started server in scripts/sb_server.py

4. Splitted mboxes with splitndirs.py

5. python timcv.py -n 5

I also installed the  1.14  of Spambayes, but I still receive the same error.


Any  suggestions? :)

Jonas
Zitat von Jonas <jonas at rcpt.at>:

> Hi,
> for my research project, I need to train spambayes using one of the
> training tools.
> I have two mboxes (ham/spam). I splitted them up using splitndirs.py,
> which results in
> Data/Ham/Set.. and Data/Spam/Set.. .
> When I execute "timcv.py -n 5" I receive the following errors:
>
> ....
> Traceback (most recent call last):
>   File "C:\spambayes-src\spambayes\timcv.py", line
>  175, in <module>
>     main()
>   File "C:\spambayes-src\spambayes\timcv.py", line
>  172, in main
>     drive(nsets)
>   File "C:\spambayes-src\spambayes\timcv.py", line
>  82, in drive
>     d = TestDriver.Driver()
>   File
> "C:\Python\64Bit\lib\site-packages\spambayes-1.1b1-py2.7.egg\spambayes\Te
> stDriver.py", line 135, in __init__
>     self.new_classifier()
>   File
> "C:\Python\64Bit\lib\site-packages\spambayes-1.1b1-py2.7.egg\spambayes\Te
> stDriver.py", line 141, in new_classifier
>     self.set_classifier(classifier.Bayes())
>   File
> "C:\Python\64Bit\lib\site-packages\spambayes-1.1b1-py2.7.egg\spambayes\Te
> stDriver.py", line 146, in set_classifier
>     self.tester = Tester.Test(classifier)
> TypeError: __init__() takes exactly 1 argument (2 given)
>
> I could not figure out the error by checking the source code of timcv.py and
> Testdriver.py.
> I receive the same error, when I execute timtest.py
>
> Any ideas how to solve the problem? I downloaded spambayes from the
> following source (
> https://spambayes.svn.sourceforge.net/svnroot/spambayes/trunk/spambayes/ )   
> and
> installed
> it with "setup.py install".
>
> Jonas
> _______________________________________________
> SpamBayes at python.org
> http://mail.python.org/mailman/listinfo/spambayes
> Info/Unsubscribe: http://mail.python.org/mailman/listinfo/spambayes
> Check the FAQ before asking: http://spambayes.sf.net/faq.html




More information about the SpamBayes mailing list