M-ACL
M-ACL is a system that is able to learn multiple
predicates exploiting abduction for maintining the global consistency among
clauses and for completing the training set.
Prerequisites:
The following software must be installed in your system:
Installation instructions:
- download the M-ACL code: m_acl.tar.gz
-
create a directory for your code and data files
-
copy m_acl.tar.gz into it and decompress it
gunzip m_acl.tar.gz
tar xvf m_acl.tar
-
set an environmental variable for the execution of ICL
setenv ICL_APPL_CONF ''
Running the system:
-
prepare your data: you need one input file: (see input
file format)
-
<file_stem>.bg: the input file with the training set,
background knowledge and bias for the first phase of ACL1
-
load Sicstus
sicstus
-
load the m_acl code
| ?-[m_acl].
-
start the induction with the command
the induction writes the output files <file_stem>.rules containing
the rules learned.
Input files format:
Format of <file_stem>.bg :
Consider the example ancestor.bg
(other examples are grandfather.bg
and odd_even.bg as examples)
-
Bias:
each target predicate must have a "bias" clause
bias(rule(<head>,<body>),
<list of variables>,
<list of allowed
literals>).
The <list of allowed literals> is the list of all the possible
literals that
can be added to the rule <head>:-<body>
By specifying <body>, we can specialize the clauses accordingly
to what is already in the body. In the example below is a variable
so that any rule can be refined with the literals in the list.
The <list of variables> must contain the list of all the variables
that may appear in the rule or its refinements and must be the same for
all bias facts relative to the same predicate.
Example:
bias(rule(father(X,Y),_B),
[X,Y],
[male(X),male(Y),ancestor(X,Y),ancestor(Y,X),parent(X,Y),parent(Y,X)]).
-
Abducible predicates:
abducibles(<list of abducible predicates>).
The variables in the abducible predicates must be all different (use _)
Example:
abducibles([ancestor(_,_),father(_,_)]).
-
Integrity constraints:
ic(<list of literals in the body>).
Example:
-
Training set:
eplus(<list of positive examples>).
eminus(<list of negative examples>).
Example:
eplus([ancestor(a,b),ancestor(b,c),ancestor(d,c),father(a,b)]).
eminus([ancestor(b,a),ancestor(a,d),father(b,c),father(a,c)]).
-
Background theory:
:-dynamic <pred1>/<arity1>,...,<predn>/<arityn>.
<definitions for predicates pred1,...,predn>
Example:
:- dynamic parent/2, ancestor/2, father/2, male/1, abducibles/1.
parent(a,b).
parent(b,c).
parent(d,b).
male(a).
female(b).
Parameters setting:
A number of parameters can be set. The M-ACL parameters are defined by
a number of prolog facts and are described below:
-
verbosity(V): specifies the verbosity level. Set by default
to 3
0: nothing is printed apart from the output rules
1: every rule that is added to the theory
2: every rule added to the agenda
3: the agenda at each specializing step
-
beamsize(Beamsize): specifies the size of the beam. Set by default
to 5
-
nmax(Nmax): maximum number of specialization steps. Set
by default to 10
-
der_depth(Depth): depth of derivations. Set by default to
20
-
kt(K): threshold on K+ and K-. Set by default to 0.1
-
min_cov(MC): minimum number of examples that each clause must
cover. Set by default to 1
They can be set either by including a fact for them in the input file,
by changing the m_acl.pl file and reloading it or by retract and
asserts.
For reporting impressions on the use of the system, bugs or new applications,
send an e-mail to Fabrizio Riguzzi friguzzi@deis.unibo.it.
Back to the main ACL page.