This module performs reasoning over Logic Programs with Annotated
Disjunctions and CP-Logic programs.
It reads probabilistic program andcomputes the probability of queries.
- author
- - Fabrizio Riguzzi
- copyright
- - Fabrizio Riguzzi
- license
- - Artistic License 2.0
- orc_ind(++A:float, ++B:float, --AorB:float) is det
- Returns A + B - A*B in AorB (or in case of independence)
- orc_exc(++A:float, ++B:float, --AorB:float) is det
- Returns A + B in AorB (or in case of exclusion)
- onec(--One:float) is det
- Returns 1.0
- zeroc(--Zero:float) is det
- Returns 0.0
- andc(++A:float, ++B:float, --AandB:float) is det
- Returns A*B in AandB (and in case of idependence). Fails if either A or B is 0.0
- andcnf(++A:float, ++B:float, --AandB:float) is det
- Returns A*B in AandB (and in case of idependence).
- notc(++A:float, --NotA:float) is det
- Returns 1-A in NotA (negation)
- equalityc(++Variable:int, ++Value:int, --P:float) is det
- Returns in P the probability that Variable takes Value.
- prob_ind(:Query:conjunction_of_literals, -Probability:float) is nondet
- The predicate computes the probability of Query
If Query is not ground, it returns in backtracking all ground
instantiations of
Query together with their probabilities
- prob_bar(:Query:conjunction_of_literals, -Probability:dict) is nondet
- The predicate computes the probability of Query
and returns it as a dict for rendering with c3 as a bar chart with
a bar for the probability of Query true and a bar for the probability of
Query false.
If Query is not ground, it returns in backtracking all ground
instantiations of
Query together with their probabilities
- prob_ind(:Query:conjunction_of_literals, :Evidence:conjunction_of_literals, -Probability:float) is nondet
- The predicate computes the probability of Query given
Evidence
If Query/Evidence are not ground, it returns in backtracking all
ground instantiations of
Query/Evidence together with their probabilities
- prob_bar(:Query:conjunction_of_literals, :Evidence:conjunction_of_literals, -Probability:dict) is nondet
- The predicate computes the probability of the Query given Evidence
and returns it as a dict for rendering with c3 as a bar chart with
a bar for the probability of Query true and a bar for the probability of
Query false given Evidence.
If Query /Evidence are not ground, it returns in backtracking all
ground instantiations of
Query/Evidence together with their probabilities
- get_var_n(++M:atomic, ++Rule:int, ++Substitution:term, ++Probabilities:list, -Variable:int) is det
- Returns the index Variable of the random variable associated to rule with
index Rule, grouding substitution Substitution and head distribution
Probabilities in environment Environment.
- or_list_pitaind(++ListOfProbs:list, ++Module:module, --P:float) is det
- Returns in P the probability of the disjunction of the random variables
whose probabilities are in ListOfProbs. Module is used to check the
setting for disjunction, either independent or exclusive.
- or_list_ind(++ListOfProbs:list, --P:float) is det
- Returns in P the probability of the disjunction of the random variables
whose probabilities are in ListOfProbs assuming independence.
- or_list_exc(++ListOfProbs:list, --P:float) is det
- Returns in P the probability of the disjunction of the random variables
whose probabilities are in ListOfProbs assuming exclusiveness.
- set_pitaind(:Parameter:atom, +Value:term) is det
- The predicate sets the value of a parameter
For a list of parameters see
https://friguzzi.github.io/cplint/
- setting_pitaind(:Parameter:atom, ?Value:term) is det
- The predicate returns the value of a parameter
For a list of parameters see
https://friguzzi.github.io/cplint/