srlearn.Database¶

class srlearn.Database[source]¶

Database of examples and facts.

__init__()[source]¶

Initialize a Database object

A database (in this respect) contains positive examples, negative examples, facts, and is augmented with background knowledge.

The implementation is done with four attributes: pos, neg, facts, and modes. Each attribute is a list that may be set by mutating, or loaded from files with Database.from_files().

Examples

This initializes a Database object, then sets the pos attribute.

>>> from srlearn import Database
>>> db = Database()
>>> db.pos = ["student(alexander)."]

Examples using srlearn.Database¶

Smokes-Friends-Cancer

Smokes-Friends-Cancer

Smokes-Friends-Cancer
Family Relationships Domain

Family Relationships Domain

Family Relationships Domain