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

ASF GitHub Bot commented on MAHOUT-1635:
----------------------------------------

GitHub user andrewpalumbo opened a pull request:

    https://github.com/apache/mahout/pull/103

    MAHOUT-1635: Remove -l option to set a csv file of labels to 
TrainNaiveBayesJob

    This patch removes the unimplemented `--labels` option from the 
TrainNaiveBayesJob.  As well removes   the `--extractLabels` option and now 
runs as default.
    
    Example scripts are modified accordingly.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/andrewpalumbo/mahout MAHOUT-1635c

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/mahout/pull/103.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #103
    
----
commit 2ac06096fc35c1f6fb179f8d1dfc98ff568a773a
Author: Andrew Palumbo <[email protected]>
Date:   2015-04-04T20:39:03Z

    remove all references to -l option in TrainNaiveBayesJob.java, remove -el 
option and let it run as default.  remove usage of -el in examples

commit fd7048b7d206aacd5d6643181bdc35c0836cb356
Author: Andrew Palumbo <[email protected]>
Date:   2015-04-04T20:46:16Z

    remove -el usage in test

----


> Getting an exception when I provide classification labels manually for Naive 
> Bayes
> ----------------------------------------------------------------------------------
>
>                 Key: MAHOUT-1635
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-1635
>             Project: Mahout
>          Issue Type: Bug
>          Components: Classification
>    Affects Versions: 0.9
>            Reporter: Suman Somasundar
>            Assignee: Andrew Palumbo
>              Labels: legacy
>             Fix For: 0.10.0
>
>         Attachments: zip_1
>
>
> If I let the Naive Bayes program itself extract the classification labels, 
> the program runs fine. But, I get the following error when I provide the 
> classification labels for the dataset manually.
> Error: java.lang.IllegalArgumentException: Wrong numLabels: 0. Must be > 0!
>         at 
> com.google.common.base.Preconditions.checkArgument(Preconditions.java:88)
>         at 
> org.apache.mahout.classifier.naivebayes.training.WeightsMapper.setup(WeightsMapper.java:45)
>         at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:142)
>         at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:784)
>         at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
>         at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:169)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.security.auth.Subject.doAs(Subject.java:415)
>         at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1640)
>         at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:164)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to