Return-Path: X-Original-To: apmail-mahout-dev-archive@www.apache.org Delivered-To: apmail-mahout-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ACDB6B2C3 for ; Tue, 10 Jan 2012 09:21:20 +0000 (UTC) Received: (qmail 95109 invoked by uid 500); 10 Jan 2012 09:21:20 -0000 Delivered-To: apmail-mahout-dev-archive@mahout.apache.org Received: (qmail 94414 invoked by uid 500); 10 Jan 2012 09:21:04 -0000 Mailing-List: contact dev-help@mahout.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mahout.apache.org Delivered-To: mailing list dev@mahout.apache.org Received: (qmail 94360 invoked by uid 99); 10 Jan 2012 09:21:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2012 09:21:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2012 09:20:58 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id AF970140657 for ; Tue, 10 Jan 2012 09:20:38 +0000 (UTC) Date: Tue, 10 Jan 2012 09:20:38 +0000 (UTC) From: "Sean Owen (Commented) (JIRA)" To: dev@mahout.apache.org Message-ID: <1933287634.24964.1326187238720.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <465701432.4051.1317669034205.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (MAHOUT-826) Bayes/CBayes classification on a non-existing feature MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MAHOUT-826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13183163#comment-13183163 ] Sean Owen commented on MAHOUT-826: ---------------------------------- I have no idea, was just trying to pitch in. This is really Robin's to answer. Is Bayes even supported anymore? I haven't heard much of anything on it. > Bayes/CBayes classification on a non-existing feature > ----------------------------------------------------- > > Key: MAHOUT-826 > URL: https://issues.apache.org/jira/browse/MAHOUT-826 > Project: Mahout > Issue Type: Bug > Components: Classification > Affects Versions: 0.5 > Reporter: Andre-Philippe Paquet > Assignee: Robin Anil > Priority: Minor > Fix For: 0.6 > > Attachments: mahout-826.patch, mahout-826.patch > > > (see http://comments.gmane.org/gmane.comp.apache.mahout.user/9597) > Using CBayes or Bayes, when trying to classify a feature/word that doesn't exist in the model, instead of returning the default/unknown label, the algorithm returns all labels with a constant score (ex: 12.386649147018964). After a quick look in CBayesAlgorithm, I found the problem in the featureWeight function that returns the theta normalized weight even if the feature didn't have any match (result=0). > As a fix, I overrided the function in a subclass and return 0 if the weight of the current feature in the current label is 0. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira