101#include <unordered_map>
158 const Atom& query,
double relevance_seed,
159 double epsilon = 1e-6);
An atom is a predicate name applied to a tuple of Terms, e.g. edge(a, b) or ancestor(X,...
Definition datalog_atom.hpp:24
A weighted fact database: a map from ground atom to a semiring value type T (bool for the trivial/boo...
Definition datalog_weighted_fact_database.hpp:49
A Datalog atom: a predicate name plus a tuple of terms, no function symbols. Phase 3 Mission 0 of cam...
A Datalog rule: head :- body1, body2, ..., range-restricted (safe) by construction....
A map from ground Datalog atom to a semiring-typed weight. Phase 3 Mission 1 of campaign_exai_dl_libr...
Definition datalog_atom.hpp:14
std::unordered_map< Atom, double, AtomHash > RelevanceMap
A map from ground atom to its accumulated relevance (real-valued, per the RealSemiring<double> circui...
Definition datalog_lrp.hpp:112
RelevanceResult propagate_relevance_weighted(const std::vector< Rule > &rules, const WeightedFactDatabase< double > &fixpoint, const Atom &query, double relevance_seed, double epsilon=1e-6)
Propagates relevance from query's derived weight back through every derivation path in fixpoint (a st...
The result of one propagate_relevance_weighted call: relevance recorded at every atom the recursion v...
Definition datalog_lrp.hpp:124
RelevanceMap all_atoms
Definition datalog_lrp.hpp:125
RelevanceMap base_facts
Definition datalog_lrp.hpp:126