[
https://issues.apache.org/jira/browse/MAHOUT-826?focusedWorklogId=1000219&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1000219
]
ASF GitHub Bot logged work on MAHOUT-826:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 15/Jan/26 09:48
Start Date: 15/Jan/26 09:48
Worklog Time Spent: 10m
Work Description: ryankert01 opened a new pull request, #832:
URL: https://github.com/apache/mahout/pull/832
### Purpose of PR
- Introduced conftest.py for root pytest configuration.
- Added custom markers for GPU and slow tests.
- Implemented auto-skip logic for tests requiring the QDP extension.
### How to test
Test with a @pytest.mark.gpu decorated test
```bash
echo '
import pytest
@pytest.mark.gpu
def test_gpu_skipped():
from _qdp import QdpEngine
assert QdpEngine(0)
def test_normal():
assert True
' > testing/test_gpu_demo.py
```
```bash
uv run pytest testing/test_gpu_demo.py -v
```
### Related Issues or PRs
Closes #826
Related to #825
### Changes Made
<!
Issue Time Tracking
-------------------
Worklog Id: (was: 1000219)
Remaining Estimate: 0h
Time Spent: 10m
> 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
> Affects Versions: 0.5
> Reporter: Andre-Philippe Paquet
> Assignee: Robin Anil
> Priority: Minor
> Fix For: 0.7
>
> Attachments: mahout-826.patch, mahout-826.patch
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> (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 was sent by Atlassian Jira
(v8.20.10#820010)