Quantcast
Channel: Machine Learning
Viewing all articles
Browse latest Browse all 63398

Progol ILP relational learning

$
0
0

I am trying to understand how to use relational and ilp tools for machine learning. So I have constructed an example problem:

I have two tables and I want progol to learn a rule along the lines of "class(A,big_spender) if salary(A,high)" or "class(A, big_spender) if married(A,B), salary(B,high) Table1

Name Profession Salary Education Class: Big Spender Bob Doctor High Private Yes Jeff Unemployed Low Private No Donald Artist Low State Yes Jenny Unemployed Low State Yes Ann Lawyer High Private Yes Emily TA Low State No Soph Unemployed Low State No 

Table 2

Married Bob Jenny Donald Ann Sophie Jeff 

The input file I have made follows, but progol is unable to learn the correct rule. I am confused about how to set out my modeb declarations and the other settings that progols uses to guide the search. Anyone able to help me understand what I need to put in these settings and why?

The input file I have made:

%%%%%%%%%%%%%% %This data is a made up big spender by spouse examples

%I need to set inflation etc %:-set(inflate,500)? %:-set(r, 100000)? %:-set(h, 60)? 

%Then I need my mode declarations

:-modeh(*, class(+person, #spender))? :-modeb(*, profession(+person, #job))? :-modeb(*, salary(+person,#amount))? :-modeb(*, education(+person, #schooling))? :-modeb(*, married(+person, -person))? -modeb(*, married(-person, +person))? 

%Then I need my Integrity constraints. This states that A can not be a big and not big spender at the same time

:- class(A, B), class(A, C), B\=C. 

%Now my examples

class(bob, big_spender). class(jeff, not_big_spender). class(donald, big_spender). class(jenny, big_spender). class(ann, big_spender). class(emily, not_big_spender). class(sophie, not_big_spender). 

%My background knowledge

person(bob). person(jeff). person(donald). person(jenny). person(ann). person(emily). person(sophie). spender(big_spender). spender(not_big_spender). schooling(state). schooling(private). job(doctor). job(lawyer). job(unemployed). job(artist). job(ta). amount(high). amount(low). married(bob, jenny). married(donald, ann). married(jeff, sophie). %example1 profession(bob, doctor). salary(bob, high). education(bob, private). 

%example2

profession(jeff, unemployed). salary(jeff, low). education(jeff, private). 

%example3

profession(donald, artist). salary(donald, low). education(donald, state). 

%example4

profession(jenny, unemployed). salary(jenny, low). education(jenny, state). 

%example5

profession(ann, lawyer). salary(ann, high). education(ann, private). 

%example6

profession(emily, ta). salary(emily, low). education(emily, state). 

%example7

profession(sophie, unemployed). salary(sophie, low). education(sophie, state). 
submitted by walrusesarecool
[link][2 comments]

Viewing all articles
Browse latest Browse all 63398