Metadata-Version: 2.4
Name: bayes-classifier
Version: 0.1.0
Summary: A lightweight collection of Bayes classifiers: Multivariate Gaussian, Gaussian naive Bayes, multinomial, Bernoulli, categorical, and Poisson.
Author: Affan Pathan
License: MIT License
        
        Copyright (c) 2026 Cobaltboy
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/ItzCobaltboy/bayes_classifier
Project-URL: Issues, https://github.com/ItzCobaltboy/bayes_classifier/issues
Keywords: bayes,classification,machine-learning,gaussian
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.24
Requires-Dist: scipy>=1.10
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: twine>=5.0; extra == "dev"
Provides-Extra: lint
Requires-Dist: ruff; extra == "lint"
Dynamic: license-file

# bayes-classifier

A lightweight collection of Bayes classifiers for tabular data.

Included classifiers:

- `MultivariateGaussianBayesClassifier`
- `GaussianNaiveBayesClassifier`
- `MultinomialBayesClassifier`
- `BernoulliBayesClassifier`
- `CategoricalBayesClassifier`
- `PoissonBayesClassifier`

`BayesClassifier` is provided as an alias of `MultivariateGaussianBayesClassifier`.

## Install

```bash
pip install bayes-classifier
```

## Quickstart

```python
import numpy as np
from bayes_classifier import GaussianNaiveBayesClassifier

X = np.array([
    [1.0, 2.0],
    [1.2, 1.8],
    [3.0, 3.2],
    [2.8, 3.1],
])
y = np.array([0, 0, 1, 1])

clf = GaussianNaiveBayesClassifier().fit(X, y)
preds = clf.predict(X)
```

## Classifier Guide

Use the classifier that matches your feature distribution:

- `MultivariateGaussianBayesClassifier`: continuous features with full covariance.
- `GaussianNaiveBayesClassifier`: continuous features with conditional independence assumption.
- `MultinomialBayesClassifier`: non-negative count-like features.
- `BernoulliBayesClassifier`: binary/presence features (inputs are thresholded to 0/1).
- `CategoricalBayesClassifier`: discrete category-valued features.
- `PoissonBayesClassifier`: non-negative count features modeled with Poisson rates.

## API

Each classifier follows the same simple interface:

```python
model = SomeBayesClassifier(...)
model.fit(X_train, y_train)
y_pred = model.predict(X_test)
```
