Skip to content

Get Started

This website contains the documentation for the package bornrule available on PyPI. The package implements the classifier proposed in the paper:

Emanuele Guidotti and Alfio Ferrara. Text Classification with Born’s Rule. Advances in Neural Information Processing Systems, 2022.

[PyPI] - [Paper] - [Poster]

Installation

pip install bornrule

Usage

Scikit-Learn

from bornrule import BornClassifier
  • Use it as any other sklearn classifier
  • Supports both dense and sparse input and GPU-accelerated computing via cupy
  • Documentation available here

PyTorch

from bornrule.torch import Born
  • Use it as any other torch layer
  • Supports real and complex-valued inputs. Outputs probabilities in the range [0, 1]
  • Documentation available here

SQL

from bornrule.sql import BornClassifierSQL
  • Use it for in-database classification
  • Supports inputs represented as json {feature: value, ...}
  • Documentation available here

Cite as

@inproceedings{guidotti2022text,
  title={Text Classification with Born's Rule},
  author={Emanuele Guidotti and Alfio Ferrara},
  booktitle={Advances in Neural Information Processing Systems},
  editor={Alice H. Oh and Alekh Agarwal and Danielle Belgrave and Kyunghyun Cho},
  year={2022},
  url={https://openreview.net/forum?id=sNcn-E3uPHA}
}