Skip to content

Commit

Permalink
Merge pull request #12 from bbaranow/develop
Browse files Browse the repository at this point in the history
Add documentation (#11)
  • Loading branch information
bbaranow authored Oct 3, 2022
2 parents 290da6b + b9e7254 commit bb3631b
Show file tree
Hide file tree
Showing 7 changed files with 704 additions and 103 deletions.
68 changes: 65 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,67 @@
# README FILE
# LaplacianNB

To install:
<div>

`pip install laplaciannb`
| | |
| --- | --- |
| CI/CD | [![CI - Test](https://github.com/bbaranow/lmnb/actions/workflows/tests.yml/badge.svg)](https://github.com/bbaranow/lmnb/actions/workflows/tests.yml) [![Build - lmnb](https://github.com/bbaranow/lmnb/actions/workflows/build-lmnb.yml/badge.svg)](https://github.com/bbaranow/lmnb/actions/workflows/build-lmnb.yml) |
| Package | [![PyPI - Version](https://img.shields.io/pypi/v/laplaciannb.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/laplaciannbs/) [![PyPI - Downloads](https://img.shields.io/pypi/dm/laplaciannb.svg?color=blue&label=Downloads&logo=pypi&logoColor=gold)](https://pypi.org/project/laplaciannb/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/laplaciannb.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/laplaciannb/) |
| Meta | [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch) [![code style - black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![types - Mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/python/mypy) [![imports - isort](https://img.shields.io/badge/imports-isort-ef8336.svg)](https://github.com/pycqa/isort) [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)

</div>


**LaplacianNB** is a Python module developed at **Novartis AG** for Naive Bayes classifier for laplacian modified models based on scikit-learn Naive Bayes implementation.

This classifier is suitable for binary/boolean data as it uses for prediction only indices of the positive bits. The algorithm was first implemented in Pipeline Pilot and KNIME.

Literature:

```
Nidhi; Glick, M.; Davies, J. W.; Jenkins, J. L. Prediction of biological targets
for compounds using multiple-category Bayesian models trained on chemogenomics
databases. J. Chem. Inf. Model. 2006, 46, 1124– 1133,
https://doi.org/10.1021/ci060003g
Lam PY, Kutchukian P, Anand R, et al. Cyp1 inhibition prevents doxorubicin-induced cardiomyopathy
in a zebrafish heart-failure model. Chem Bio Chem. 2020:cbic.201900741.
https://doi.org/10.1002/cbic.201900741
```

=======


Authors
--------

Huge thanks to **Florian Nigsch** ([email protected]) for the first implementation of the algorithm in python and **Peter Kutchukian** ([email protected]) for scientific guidance and validation.


Author and maintainer: **Bartosz Baranowski** ([email protected])


Installation
------------

Dependencies:

```
- Python (>= 3.8)
- pandas (>=1.4.2)
- numpy (>=1.22.4)
- scikit-learn (>=1.1.1)
- scipy (>=1.8.1)
```

=======


User installation:

```pip install laplaciannb```



Changelog
---------
`v0.5.0` - Initial release
4 changes: 2 additions & 2 deletions bayes/LaplacianNB.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
class LaplacianNB(_BaseDiscreteNB):
"""Naive Bayes classifier for laplacian modified models.
Like BernoulliNB, this classifier is suitable for binary/boolean data. The
difference is that while BernoulliNB takes into account positive and negative bits,
laplacian modified approach is using only 1's.
difference is that while BernoulliNB processes all features, while
laplacian modified approach is using only positive bits.
Parameters
----------
alpha : float, default=1.0
Expand Down
2 changes: 1 addition & 1 deletion bayes/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.4.1'
__version__ = '0.5.0'
Loading

0 comments on commit bb3631b

Please sign in to comment.