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]


pip install bornrule



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


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


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

Cite as

  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},