Returns a set of 3-dimensional points representing the plot of the
density of a sets of 2-dimensional samples.
The samples are in List
as pairs [X,Y]-W where (X,Y) is a point and W its weigth.
Options is a list of options, the following are recognised by density2d/3:
- xmin(+XMin:float)
- the minimum value of the X domain, default value the minimum in List
- xmax(-XMax:float)
- the maximum value of the X domain, default value the maximum in List
- ymin(-YMin:float)
- the minimum value of the Y domain, default value the minimum in List
- ymax(-YMax:float)
- the maximum value of the Y domain, default value the maximum in List
- nbins(+NBins:int)
- the number of bins for dividing the X and Y domains, default value 40
NumberOfHeads is a list of terms, one for each rule. Each term is either
an integer, indicating the number
of head atoms in the rule, or a list [N] where N
is the number of head atoms. In the first case, the parameters of the rule are tunable,
in the latter they are fixed.
Performs EM learning.
Takes as input the Context, information on the rules,
a list of BDDs each representing one example,
the minimum absolute difference EA and relative difference ER between the
log likelihood of examples in two different iterations and the maximum number of iterations
Iterations.
RuleInfo is a list of elements, one for each rule, with are either
- an integer, indicating the number of heads, in which case the parameters of the
corresponding rule should be randomized,
- a list of floats, in which case the parameters should be set to those indicated
in the list and not changed during learning (fixed parameters)
- [a list of floats], in which case the initial values of the parameters should
be set to those indicated
in the list and changed during learning (initial values of the parameters)
Returns the final log likelihood of examples LL, the list of new Parameters
and a list with the final probabilities of each example.
Parameters is a list whose elements are of the form [N,P] where N is the rule
number and P is a list of probabilities, one for each head atom of rule N,
in reverse order.
Draws a line chart of the density of a sets of samples.
The samples are in List
as pairs [V]-W or V-W where V is a value and W its weigth.
Options is a list of options, the following are recognised by density/3:
- min(+Min:float)
- the minimum value of domain, default value the minimum in List
- max(+Max:float)
- the maximum value of domain, default value the maximum in List
- nbins(+NBins:int)
- the number of bins for dividing the domain, default value 40
Draws a histogram of the samples in List. List must be a list of pairs of the form [V]-W or V-W
where V is a sampled value and W is its weight, or a list of values.
Options is a list of options, the following are recognised by histogram/3:
- min(+Min:float)
- the minimum value of domain, default value the minimum in List
- max(+Max:float)
- the maximum value of domain, default value the maximum in List
- nbins(+NBins:int)
- the number of bins for dividing the domain, default value 40