srlearn.base
.BaseBoostedRelationalModel¶
- class srlearn.base.BaseBoostedRelationalModel(*, background=None, target='None', n_estimators=10, node_size=2, max_tree_depth=3, neg_pos_ratio=2, solver=None)[source]¶
Base class for deriving boosted relational models
This class extends
sklearn.base.BaseEstimator
andsklearn.base.ClassifierMixin
while providing several utilities for instantiating a model and performing learning/inference with the BoostSRL jar files.Note
This is not a complete treatment of how to derive estimators. Contributions would be appreciated.
Examples
The actual
srlearn.rdn.BoostedRDNClassifier
is derived from this class, so this example is similar to the implementation (but the actual implementation passes model parameters instead of leaving them with the defaults). This example derives a new classBoostedRDNClassifier
, which inherits the default values of the superclass while also setting a ‘special_parameter’ which may be unique to this model.All that remains is to implement the specific cases of
fit()
,predict()
, andpredict_proba()
.