Skip to content

Commit

Permalink
update gwnb classifier benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
msamsami committed Feb 13, 2025
1 parent 91fdd79 commit 4eb242a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ We conducted benchmarks on four datasets, [Wine](https://scikit-learn.org/stable
| Wine | GaussianNB | 0.9749 | GeneralNB | **0.9812** |
| Iris | GaussianNB | 0.9556 | GeneralNB | **0.9602** |
| Digits | GaussianNB | 0.8372 | GeneralNB | **0.8905** |
| Breast Cancer | GaussianNB | 0.9389 | GaussianWNB | **0.9512** |
| Breast Cancer | GaussianNB | 0.9389 | GaussianWNB | **0.9519** |

These benchmarks highlight the potential of WNB classifiers to provide better performance in certain scenarios by allowing more flexibility in the choice of distributions and incorporating weighting strategies.

Expand Down
2 changes: 1 addition & 1 deletion tests/benchmarks/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def benchmark_digits() -> None:
def benchmark_breast_cancer() -> None:
X, y = load_breast_cancer(return_X_y=True)

clf_wnb = GaussianWNB(max_iter=20, step_size=0.01, C=1.5)
clf_wnb = GaussianWNB(max_iter=30, step_size=0.01, C=1.5, var_smoothing=1e-12)
clf_sklearn = GaussianNB()
score_wnb, score_sklearn = benchmark(X, y, clf_wnb, clf_sklearn, MAX_ITER)

Expand Down

0 comments on commit 4eb242a

Please sign in to comment.