![]() |
mutable
A Database System for Research and Fast Prototyping
|
[[TOC]]
This is a database specific wrapper around sum-product networks (SPNs). An SpnWrapper
can be seen as a relational sum-product network (RSPN) but the terms SPN and RSPN are often used interchangeably. The documentation of SPNs can be found here. Most methods are the same with the difference that some access the attributes (random variables) via attribute name of the table instead of attribute id. This is done via the AttrFilter
typename. The AttrFilter
typename is defined as follows:
The difference to Filter
is that we map from a ThreadSafePooledString
representing the attribute name.
The following method can be used to learn an RSPN directly on a table:
You can specify the leaf_types
or leave them out for automatic detection (DISCRETE
for integer types, CONTINUOUS
for floats).
The following method can be used to learn an RSPN on each table in a database:
You can specify the leaf_types
for each table in a map from table name to leaf_types
vector. If a table is not in the map, the method uses automatic detection (leave map out for automatic detection for all tables). It returns a map from table name to the respective RSPN.