| UPGRADE YOUR BROWSER! If you see this message, it means your browser, which is CCBot/1.0 (+http://www.commoncrawl.org/bot.html), does not support current webstandards. Please, see the webstandards project. |
This web page contains the solution to the first part of thge assignment of the fourth part (inductive logic programming) of the course on machine learning taught at the graduate school of language technology, fall 2003. Authors of this page are Fredrik Olsson and Magnus Sahlgren.
Essentially, the task was to adapt and add to an already given background knowledge in order for Aleph to induce a single-clause theory that covered a small subset of English. The data and some of the background knowledge is given in the task definition available here.
We added mode and determination declarations illustrated by the following listing:
:- mode(*, s(+vertex, -vertex)). :- mode(*, np(+vertex, -vertex)). :- mode(*, pp(+vertex, -vertex)). :- mode(*, ap(+vertex, -vertex)). :- mode(*, vp(+vertex, -vertex)). :- mode(*, tvp(+vertex, -vertex)). :- mode(*, ivp(+vertex, -vertex)). :- mode(*, det(#det)). :- mode(*, noun(#noun)). :- mode(*, tverb(#tverb)). :- mode(*, iverb(#iverb)). :- mode(*, prep(#prep)). :- mode(*, adj(#adj)). :- determination(s/2, np/2). :- determination(s/2, pp/2). :- determination(s/2, ap/2). :- determination(s/2, vp/2). :- determination(s/2, tvp/2). :- determination(s/2, ivp/2). :- determination(s/2, det/1). :- determination(s/2, noun/1). :- determination(s/2, tverb/1). :- determination(s/2, iverb/1). :- determination(s/2, prep/1). :- determination(s/2, adj/1).
Then we added background predicates on the form of DCG rules (a file containing the lot is available here):
np --> det, np. np --> noun. np --> np, pp. np --> pp. pp --> prep, np. np --> ap. ap --> adj, np. vp --> tvp, np. tvp --> tverb. vp --> ivp. ivp --> iverb.
Finally, we ran Aleph and obtained the following result:
?- induce.
[select example] [1]
[sat] [1]
[s([a,man,hits,the,ball,at,the,dog],[])]
[bottom clause]
s(A,B) :-
np(A,C), vp(C,B).
[literals] [3]
[saturation time] [0.0]
[reduce]
[best label so far] [[1,0,2,1]/0]
s(A,B).
[22/0]
s(A,B) :-
np(A,C).
[22/0]
s(A,B) :-
np(A,C), vp(C,B).
[22/0]
[-------------------------------------]
[found clause]
s(A,B) :-
np(A,C), vp(C,B).
[pos-neg] [22]
[clause label] [[22,0,3,22]]
[clauses constructed] [3]
[-------------------------------------]
[clauses constructed] [3]
[search time] [0.0]
[best clause]
s(A,B) :-
np(A,C), vp(C,B).
[pos-neg] [22]
[atoms left] [0]
[theory]
[Rule 1] [Pos cover = 22 Neg cover = 0]
s(A,B) :-
np(A,C), vp(C,B).
[Training set performance]
Actual
+ -
+ 22 0 22
Pred
- 0 0 0
22 0 22
Accuracy = 1.0
[Training set summary] [[22,0,0,0]]
[time taken] [0.01]
[total clauses constructed] [3]
yes
?-
As can be seen from the experiment output, a single clause that covered all positive examples was learned.