You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2013/01/18 10:16:15 UTC

[jira] [Commented] (MAHOUT-1062) alphaI is not correctly saved in NaiveBayesModel

    [ https://issues.apache.org/jira/browse/MAHOUT-1062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13557068#comment-13557068 ] 

Hudson commented on MAHOUT-1062:
--------------------------------

Integrated in Mahout-Quality #1828 (See [https://builds.apache.org/job/Mahout-Quality/1828/])
    MAHOUT-1062 alphaI is not correctly saved in NaiveBayesModel (Revision 1435047)

     Result = SUCCESS
ssc : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1435047
Files : 
* /mahout/trunk/core/src/main/java/org/apache/mahout/classifier/naivebayes/training/TrainNaiveBayesJob.java

                
> alphaI is not correctly saved in NaiveBayesModel
> ------------------------------------------------
>
>                 Key: MAHOUT-1062
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-1062
>             Project: Mahout
>          Issue Type: Bug
>          Components: Classification
>    Affects Versions: 0.7
>            Reporter: David Engel
>            Assignee: Sebastian Schelter
>             Fix For: 0.8
>
>
> alphaI is passed in for training via the thetaSummer job configuration.  When the model is saved, however, the wrong configuration is used causing the saved alphaI to always be 1.0.  The following patch fixes the problem for me.
> diff -ur mahout-distribution-0.7.orig/core/src/main/java/org/apache/mahout/classifier/naivebayes/training/TrainNaiveBayesJob.java mahout-distribution-0.7/core/src/main/java/org/apache/mahout/classifier/naivebayes/training/TrainNaiveBayesJob.java
> --- mahout-distribution-0.7.orig/core/src/main/java/org/apache/mahout/classifier/naivebayes/training/TrainNaiveBayesJob.java	2012-06-12 03:32:17.000000000 -0500
> +++ mahout-distribution-0.7/core/src/main/java/org/apache/mahout/classifier/naivebayes/training/TrainNaiveBayesJob.java	2012-08-28 13:06:11.000000000 -0500
> @@ -134,7 +134,7 @@
>      }*/
>      
>      //validate our model and then write it out to the official output
> -    NaiveBayesModel naiveBayesModel = BayesUtils.readModelFromDir(getTempPath(), getConf());
> +    NaiveBayesModel naiveBayesModel = BayesUtils.readModelFromDir(getTempPath(), thetaSummer.getConfiguration());
>      naiveBayesModel.validate();
>      naiveBayesModel.serialize(getOutputPath(), getConf());
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira