srlearn: A Python Library for Gradient-Boosted Statistical Relational Models

Accepted at the Ninth International Workshop on Statistical Relational AI - StarAI 2020.

Paper

Explore further on GitHub.

srlearn overview

srlearn has several aims. At a basic level it wraps the state-of-the-art BoostSRL package for learning the structure and parameters of statistical relational models. At a higher level, it is an ongoing experiment in creating application programming interfaces (APIs) that blend idea from logic programming with what is familiar to the machine learning and data science communities built around the Python programming language.

This example is presented as Figure 1 in the paper, and is presently featured as one of the getting started examples in the srlearn documentation:

>>> from srlearn.rdn import BoostedRDN
>>> from srlearn import Background
>>> from srlearn import example_data
>>> bk = Background(
...     modes=example_data.train.modes,
...     use_std_logic_variables=True,
... )
>>> clf = BoostedRDN(
...     background=bk,
...     target='cancer',
... )
>>> clf.fit(example_data.train)
>>> clf.predict_proba(example_data.test)
array([0.88079619, 0.88079619, 0.88079619, 0.3075821 , 0.3075821 ])
>>> clf.classes_
array([1., 1., 1., 0., 0.])

Software

Results of the paper are based on srlearn==0.5.0

Please consider starring 🌟 the srlearn GitHub Repository repository. It’s an open-source project, so any feedback or recommendations are appreciated.

Experiments

Scripts for reproducing Table 1 are contained in the experiments/ directory on GitHub.

Acknowledgements

ALH is sponsored through Indiana University’s “Precision Health Initiative” (PHI) Grand Challenge. ALH would like to thank Sriraam Natarajan, Travis LaGrone, and members of the StARLinG Lab at the University of Texas at Dallas.