Recent Releases of wnb

wnb - v0.8.0

What's Changed

  • feat: add support for laplace distribution by @msamsami in https://github.com/msamsami/wnb/pull/47
  • feat: add docstring examples, improve error weights and class prior initialization by @msamsami in https://github.com/msamsami/wnb/pull/48
  • feat: add var_smoothing parameter to GaussianWNB by @msamsami in https://github.com/msamsami/wnb/pull/49
  • fix: make distributions param positional-or-keyword in GeneralNB by @msamsami in https://github.com/msamsami/wnb/pull/50

Full Changelog: https://github.com/msamsami/wnb/compare/v0.7.0...v0.8.0


🔧 GeneralNB's distributions parameter is now positional-or-keyword, meaning that both styles below work:

python clf = GeneralNB([D.NORMAL, D.POISSON]) python clf = GeneralNB(distributions=[D.NORMAL, D.POISSON])

- Python
Published by msamsami about 1 year ago

wnb - v0.7.0

What's Changed

  • feat: add parameter constraints and validations, add _fit_context decorator by @msamsami in https://github.com/msamsami/wnb/pull/44
  • feat: add support for specifying distributions as a list of tuples by @msamsami in https://github.com/msamsami/wnb/pull/45
  • doc: minor update in getting started section of RAEDME by @msamsami in https://github.com/msamsami/wnb/pull/46

🎉 Now you specify GeneralNB's distributions as a list of tuples: ```python from wnb import GeneralNB, Distribution as D

gnb = GeneralNB( distributions=[ (D.NORMAL, "col1"), (D.BERNOULLI, "col2"), (D.EXPONENTIAL, ["col3", "col4"]) ] ) ```


Full Changelog: https://github.com/msamsami/wnb/compare/v0.6.0...v0.7.0

- Python
Published by msamsami about 1 year ago

wnb - wnb v0.6.0

What's Changed

  • feat: refactor GeneralNB and GaussianWNB, improve validation, and enhance scikit-learn compatibility by @msamsami in https://github.com/msamsami/wnb/pull/43

Full Changelog: https://github.com/msamsami/wnb/compare/v0.5.1...v0.6.0

- Python
Published by msamsami about 1 year ago

wnb - wnb v0.5.1

What's Changed

  • patch: use uv for package management, refactor github workflows, fix bug in handling complex arrays by @msamsami in https://github.com/msamsami/wnb/pull/42

Full Changelog: https://github.com/msamsami/wnb/compare/v0.5.0...v0.5.1

- Python
Published by msamsami about 1 year ago

wnb - wnb v0.5.0

What's Changed

  • feat: add var_smoothing parameter to GeneralNB, add pre-support for scikit-learn 1.7 by @msamsami in https://github.com/msamsami/wnb/pull/41

Full Changelog: https://github.com/msamsami/wnb/compare/v0.4.0...v0.5.0

- Python
Published by msamsami about 1 year ago

wnb - wnb v0.4.0

What's Changed

  • maint: fix build workflow by @msamsami in https://github.com/msamsami/wnb/pull/38
  • fix: update build badge in README by @msamsami in https://github.com/msamsami/wnb/pull/39
  • maint: add support for python 3.13, numpy 2, and scikit-learn 1.6 by @msamsami in https://github.com/msamsami/wnb/pull/40

Full Changelog: https://github.com/msamsami/wnb/compare/v0.3.1...v0.4.0

- Python
Published by msamsami about 1 year ago

wnb - wnb v0.3.1

What's Changed

  • maint: improve type hints, update GitHub workflows by @msamsami in https://github.com/msamsami/wnb/pull/37

Full Changelog: https://github.com/msamsami/wnb/compare/v0.3.0...v0.3.1

- Python
Published by msamsami over 1 year ago

wnb - wnb v0.3.0

What's Changed

  • patch: add new sub-package wnb.stats to keep distribution-related modules by @msamsami in https://github.com/msamsami/wnb/pull/36

Full Changelog: https://github.com/msamsami/wnb/compare/v0.2.7...v0.3.0

- Python
Published by msamsami over 1 year ago

wnb - wnb v0.2.7

What's Changed

  • maint:pre-commit configs, script names, end of files, black version, README by @msamsami in https://github.com/msamsami/wnb/pull/35

Full Changelog: https://github.com/msamsami/wnb/compare/v0.2.6...v0.2.7

- Python
Published by msamsami over 1 year ago

wnb - wnb v0.2.6

What's Changed

  • maint: fix class attributes, reformat the code by @msamsami in https://github.com/msamsami/weighted-naive-bayes/pull/34

Full Changelog: https://github.com/msamsami/weighted-naive-bayes/compare/v0.2.5...v0.2.6

- Python
Published by msamsami over 1 year ago

wnb - wnb v0.2.5

What's Changed

  • doc: add readme sections for scikit-learn compatibility and benchmarks by @msamsami in https://github.com/msamsami/weighted-naive-bayes/pull/32
  • maint: Add utility functions + minor improvements by @msamsami in https://github.com/msamsami/weighted-naive-bayes/pull/33

Full Changelog: https://github.com/msamsami/weighted-naive-bayes/compare/v0.2.4...v0.2.5

- Python
Published by msamsami over 1 year ago

wnb - wnb v0.2.4

What's Changed

  • Add Student's t and Rayleigh distributions by @msamsami in https://github.com/msamsami/weighted-naive-bayes/pull/31

Full Changelog: https://github.com/msamsami/weighted-naive-bayes/compare/v0.2.3...v0.2.4

- Python
Published by msamsami over 1 year ago

wnb - wnb v0.2.3

What's Changed

  • Package restructure, update dependencies for numpy, add pyproject.toml by @msamsami in https://github.com/msamsami/weighted-naive-bayes/pull/29
  • Update version (v0.2.3) by @msamsami in https://github.com/msamsami/weighted-naive-bayes/pull/30

Full Changelog: https://github.com/msamsami/weighted-naive-bayes/compare/v0.2.2...v0.2.3

- Python
Published by msamsami over 1 year ago

wnb - wnb v0.2.2

What's Changed

Changelog v0.2.2: * Add performance benchmarking scripts by @msamsami in https://github.com/msamsami/weighted-naive-bayes/pull/23 * Add GitHub workflow action to run tests on PR by @msamsami in https://github.com/msamsami/weighted-naive-bayes/pull/25 * Ignore pytest warnings * Add GitHub workflow action to check code format on PR by @msamsami in https://github.com/msamsami/weighted-naive-bayes/pull/26 * Use black v24 to reformat the code * Use an internal method to get the distribution object in GeneralNB by @msamsami in https://github.com/msamsami/weighted-naive-bayes/pull/24 * Update README badges, starting section, and wnb logo by @msamsami in https://github.com/msamsami/weighted-naive-bayes/pull/27 * Update requirements, update supported Python versions (drop 3.7, add support for 3.12) by @msamsami in https://github.com/msamsami/weighted-naive-bayes/pull/28

Full Changelog: https://github.com/msamsami/weighted-naive-bayes/compare/v0.2.1...v0.2.2

- Python
Published by msamsami almost 2 years ago

wnb - wnb v0.2.1

What's Changed

Changelog v0.2.1:

  • Adhere to sklearn's docstring and type hint format
  • Add an internal typing file for type hints
  • Use a case-insensitive enum meta class for enums
  • Add setup.cfg file

- Python
Published by msamsami about 2 years ago

wnb - wnb v0.2.0

What's Changed

Changelog v0.2.0:

  • Add unit tests for discrete distributions
  • Fix bug in the pmf method of categorical and poisson distributions
  • Fix issues in dependencies' versions
  • Add example scripts for using GaussianWNB and GeneralNB

- Python
Published by msamsami over 2 years ago

wnb - wnb v0.1.20

What's Changed

Changelog v0.1.20:

  • Fix bug in estimating LognormalDist parameters from data
  • Fix bug in calculating LognormalDist PDF
  • Add unit tests for the dist module with the following items:
    • Test correctness of name attribute of distributions
    • Test correctness of _support attribute of distributions
    • Test NormalDist.pdf method against scipy.stats.norm.pdf method
    • Test LognormalDist.pdf method against scipy.stats.lognorm.pdf method
    • Test out-of-support warning of LognormalDist.pdf method
    • Test ExponentialDist.pdf method against scipy.stats.expon.pdf method
    • Test out-of-support warning of ExponentialDist.pdf method
    • Test UniformDist.pdf method against scipy.stats.uniform.pdf method
    • Test out-of-support warning of UniformDist.pdf method
    • Test ParetoDist.pdf method against scipy.stats.pareto.pdf method
    • Test out-of-support warning of ParetoDist.pdf method
    • Test GammaDist.pdf method against scipy.stats.gamma.pdf method
    • Test out-of-support warning of GammaDist.pdf method
    • Test BetaDist.pdf method against scipy.stats.beta.pdf method
    • Test out-of-support warning of BetaDist.pdf method
    • Test ChiSquaredDist.pdf method against scipy.stats.chi2.pdf method
    • Test out-of-support warning of ChiSquaredDist.pdf method

- Python
Published by msamsami over 2 years ago

wnb - wnb v0.1.19

What's Changed

Changelog v0.1.19:

  • Add support for Beta distribution
  • Add support for Chi-squared distribution

- Python
Published by msamsami over 2 years ago

wnb - wnb v0.1.18

What's Changed

Changelog v0.1.18:

  • Add new attributes feature_names_in_ and class_count_ to GeneralNB and GaussianWNB
  • Use Scikit-learn's BaseEstimator to check and calculate feature_names_in_ and n_features_in_
  • Add class attribute definitions to GeneralNB and GaussianWNB
  • Minor improvements in internal methods of GeneralNB and GaussianWNB
  • Fix bug in calculating n_iter_ for GaussianWNB
  • Rename the mu_ attribute of GaussianWNB to theta_ to match Scikit-learn API
  • Add new attribute var_ (in addition to existing std_ attribute) to match Scikit-learn API
  • Add more data validators to GeneralNB and GaussianWNB
  • Scikit-learn's compatibility test is enabled and fully passed for GeneralNB

- Python
Published by msamsami over 2 years ago

wnb - wnb v0.1.17

What's Changed

Changelog v0.1.17:

  • Fix bug in the setup.py script
  • Add LICENSE file (for OSD license)
  • Add MANIFEST.in file to include package data

- Python
Published by msamsami over 2 years ago

wnb - wnb v0.1.16

What's Changed

Changelog v0.1.16:

  • Extend Python version compatibility to 3.11
  • Minor code improvements
  • Remove unnecessary traces of Multinomial distribution
  • Fix issues in not installing the tests package
  • Add black to dev requirements
  • Reformat the codes using black
  • Minor change in docstrings

- Python
Published by msamsami over 2 years ago

wnb - wnb v0.1.15

What's Changed

Changelog v0.1.15:

  • New feature: GeneralNB takes a smoothing parameter alpha for estimating distribution parameters (currently, for Bernoulli and Categorical distributions)
  • Reformat the codes using black
  • Minor change in docstrings
  • Minor change in error messages

- Python
Published by msamsami over 2 years ago

wnb - wnb v0.1.14

What's Changed

Changelog v0.1.14:

  • Remove MultinomialDist from the supported distributions
  • Use a constant smoothing parameter (1e-10) in BernoulliDist and CategoricalDist when estimating their PMFs
  • Add support for nun-numerical features for some distributions (e.g., categorical distribution)
  • Add new tests methods to compare GeneralNB with sklearn's BernoulliNB and CategoricalNB
  • Minor bug fixing and improvements
  • Minor update in docstrings

- Python
Published by msamsami over 2 years ago

wnb - wnb v0.1.13

What's Changed

Changelog v0.1.13:

  • Add more unit tests for GaussianWNB
  • Move learning_hist parameter from fit method to __init__ method
  • Now, cost_hist_ attribute will store None if learning_hist=False

- Python
Published by msamsami over 2 years ago

wnb - wnb v0.1.12

What's Changed

Changelog v0.1.12:

  • Add unit tests for GaussianWNB
  • Refactor and minor improvements in GaussianWNB

- Python
Published by msamsami over 2 years ago

wnb - wnb v0.1.11

What's Changed

Changelog v0.1.11:

  • Test whether the GeneralNB estimator adheres to scikit-learn conventions
  • Convert some hidden methods to internal methods
  • Fix classifiers in setup.py
  • Add pypi build badge to README

- Python
Published by msamsami over 2 years ago

wnb - wnb v0.1.10

What's Changed

Changelog v0.1.10:

  • np.mean() is replaced with np.average() to estimate the expected value of normal distribution
  • Finding classes and their count is done first in the fit method
  • Minor change in error messages

- Python
Published by msamsami over 2 years ago

wnb - wnb v0.1.9

What's Changed

Changelog v0.1.9:

  • Rename priors_ to class_prior_ in GeneralNB and GaussianWNB classes
  • Remove ddof=1 while calculating standard deviation for normal distribution
  • Fix a critical bug in calculating log probability in GeneralNB class
  • Add a tests directory with some unit tests for GeneralNB

- Python
Published by msamsami almost 3 years ago

wnb - wnb v0.1.8

What's Changed

Changelog v0.1.8:

  • Add _support attribute and support property to DistMixin to indicate the support of the probability distribution
  • Add _check_support internal method that checks if a given value lies within the support of the distribution, and if not, shows a warning
  • Set _type attribute for ContinuousDistMixin and DiscreteDistMixin to "continuous" and "discrete", respectively
  • Set the support of all the distribution classes in wnb.dist module in their _support_ attribute

- Python
Published by msamsami almost 3 years ago

wnb - wnb v0.1.7

What's Changed

Changelog v0.1.7:

  • Add a parent mixin DistMixin for continuous and discrete distribution mixin
  • Restructure ContinuousDistMixin and DiscreteDistMixin by inherting from DistMixin
  • Add get_params() method to distribution mixins to return the distribution parameters
  • Add a common __repr__ method to distribution mixins

- Python
Published by msamsami almost 3 years ago

wnb - wnb v0.1.6

What's Changed

Changelog v0.1.6:

  • Bug fixing and improvements

- Python
Published by msamsami almost 3 years ago

wnb - wnb v0.1.5

What's Changed

Changelog v0.1.5:

  • Add mixins for probability distribution classes: ContinuousDistMixin and DiscreteDistMixin
  • Restructure distribution classes in wnb.dist module to inherit from mixins
  • Add support for custom-defined distribution classes

- Python
Published by msamsami almost 3 years ago

wnb - wnb v0.1.4

What's Changed

Changelog v0.1.4:

  • Add the BernoulliDist class to wnb.dist module
  • Add the GeometricDist class to wnb.dist module
  • Add BERNOULLI to the Distribution enum class
  • Add GEOMETRIC to the Distribution enum class
  • Fix bug in __repr__ methods of distributions' classes
  • Fix bug in listing distributions in wnb.dist.AllDistributions variable

- Python
Published by msamsami almost 3 years ago

wnb - wnb v0.1.2

What's Changed

Changelog v0.1.2:

  • Add GammaDist class to wnb.dist module
  • Add GAMMA to Distribution enum class

- Python
Published by msamsami almost 3 years ago

wnb - wnb v0.1.1

What's Changed

Changelog v0.1.1:

  • Add ParetoDist class to wnb.dist module
  • Add PARETO to Distribution enum class

- Python
Published by msamsami almost 3 years ago

wnb - wnb v0.1.0

First Release

This is the first official release of the library.

What's Changed

Changelog v0.1.0:

  • Add GeneralNB class for general naive Bayes classifiers
  • Add a new module (wnb.dist) for probability distributions
  • Minor improvements in the GaussaianWNB class
  • Bug fixing

- Python
Published by msamsami almost 3 years ago