Get Started
This website contains the documentation for the package bornrule
available on PyPI. The package implements the classifier proposed in the paper Text Classification with Born's Rule. All code is available at the GitHub repository.
Installation
Install via pip
with:
Usage
The package implements three versions of the classifier. The classification algorithm is compatible with the scikit-learn ecosystem. The neural version is compatible with pytorch. The SQL version supports in-database classification.
Scikit-Learn
- Use it as any other
sklearn
classifier - Supports both dense and sparse input and GPU-accelerated computing via
cupy
PyTorch
- Use it as any other
torch
layer - Supports real and complex-valued inputs. Outputs probabilities in the range [0, 1]
SQL
- Equivalent to the class
BornClassifier
but for in-database classification - Supports inputs represented as json
{feature: value, ...}
Cite as
Emanuele Guidotti and Alfio Ferrara. Text Classification with Born's Rule. In Advances in Neural Information Processing Systems, volume 35, pages 30990–31001, 2022.
A BibTeX entry for LaTeX users is: