apache / apache/lucene

CachingNaiveBayesClassifier doesn't compute log prior. [LUCENE-7672]

Open
#8,723 2 comments 0 reactions 0 assignees View on GitHub
affects-version:6.3 affects-version:6.4 affects-version:6.4.1 affects-version:6.5 affects-version:7.0 legacy-jira-fix-version:7.0 legacy-jira-label:newbie legacy-jira-label:patch legacy-jira-priority:Major module:classification type:bug
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

The CachingNaiveBayesClassifier gives different results than the SimpleNaiveBayesClassifier. This is due to the fact that the CachineNaiveBayesClassifier does not calculate the log prior on the class (category) names, as it should.

This bug has been fixed, and a patch has been attached to this issue.

This affects master, as well as previous releases up to version 6.4.

---
Migrated from [LUCENE-7672](https://issues.apache.org/jira/browse/LUCENE-7672) by Kevin Crosby, updated Jul 19 2020
Attachments: [LUCENE-7672.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-7672/LUCENE-7672.patch)

Contributor guide

Open the contributing guide

Research direction

Start by locating CachingNaiveBayesClassifier and SimpleNaiveBayesClassifier, then compare how they calculate class or category priors. Review the attached LUCENE-7672.patch for the intended fix and verify that both classifiers produce matching results for the affected cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.