aggregates in PFL: exa,ple
This commit is contained in:
parent
34dc03d43b
commit
309dfaa813
@ -15,9 +15,7 @@ schema.yap: the PFL schema
|
|||||||
|
|
||||||
tables: CPTs
|
tables: CPTs
|
||||||
|
|
||||||
|
=============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
professor_ability(p0,X).
|
professor_ability(p0,X).
|
||||||
|
|
||||||
|
@ -29,9 +29,9 @@ bayes grade(C,S)::[a,b,c,d], int(S), diff(C) ; grade_table ; [registration(_,C,S
|
|||||||
|
|
||||||
bayes satisfaction(C,S)::[h,m,l], abi(P), grade(C,S) ; sat_table ; [reg_satisfaction(C,S,P)].
|
bayes satisfaction(C,S)::[h,m,l], abi(P), grade(C,S) ; sat_table ; [reg_satisfaction(C,S,P)].
|
||||||
|
|
||||||
bayes rat(C) :: [h,m,l], agg(Sats) ; avg ; [course_rat(C, Sats)].
|
bayes rat(C) :: [h,m,l], Sats ; avg ; [course_rat(C, Sats)].
|
||||||
|
|
||||||
bayes rank(S) :: [a,b,c,d], agg(Grades) ; avg ; [student_ranking(S,Grades)].
|
bayes rank(S) :: [a,b,c,d], Grades ; avg ; [student_ranking(S,Grades)].
|
||||||
|
|
||||||
|
|
||||||
grade(Key, Grade) :-
|
grade(Key, Grade) :-
|
||||||
@ -44,8 +44,8 @@ reg_satisfaction(CKey, SKey, PKey) :-
|
|||||||
|
|
||||||
course_rat(CKey, Sats) :-
|
course_rat(CKey, Sats) :-
|
||||||
course(CKey, _),
|
course(CKey, _),
|
||||||
setof(satisfaction(CKey,SKey,PKey),
|
setof(satisfaction(CKey,SKey),
|
||||||
reg_satisfaction(CKey, SKey, PKey),
|
PKey^reg_satisfaction(CKey, SKey, PKey),
|
||||||
Sats).
|
Sats).
|
||||||
|
|
||||||
student_ranking(SKey, Grades) :-
|
student_ranking(SKey, Grades) :-
|
||||||
|
@ -21,6 +21,7 @@ total_students(256).
|
|||||||
%:- clpbn_horus:set_solver(fove).
|
%:- clpbn_horus:set_solver(fove).
|
||||||
%:- clpbn_horus:set_solver(hve).
|
%:- clpbn_horus:set_solver(hve).
|
||||||
:- clpbn_horus:set_solver(bp).
|
:- clpbn_horus:set_solver(bp).
|
||||||
|
%:- clpbn_horus:set_solver(ve).
|
||||||
%:- clpbn_horus:set_solver(cbp).
|
%:- clpbn_horus:set_solver(cbp).
|
||||||
|
|
||||||
:- ensure_loaded(school32_data).
|
:- ensure_loaded(school32_data).
|
||||||
|
Reference in New Issue
Block a user