Commit 6ef432d9 authored by josd's avatar josd

refresh

parent 36fb531c
PREFIX list: <http://www.w3.org/2000/10/swap/list#>
PREFIX math: <http://www.w3.org/2000/10/swap/math#>
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
PREFIX ccd: <http://josd.github.io/eye/reasoning/ccd#>
......@@ -7,28 +8,60 @@ PREFIX ccd: <http://josd.github.io/eye/reasoning/ccd#>
(?A ?B) ccd:transformer (?Y ?Z).
} <= {
?SCOPE e:findall (
(?F ?G ?H)
(?H ?F ?G ?J ?K)
{
?A math:memberCount ?I.
?A list:member (?F ?G ?J ?K).
?SCOPE e:optional {
?J math:equalTo 0.
("-2*log(_I)" ?I) e:calculate ?H.
("-pi*log(_I)" ?I) e:calculate ?H.
}, {
?K math:equalTo 0.
("2*log(_I)" ?I) e:calculate ?H.
("pi*log(_I)" ?I) e:calculate ?H.
}, {
?J math:notEqualTo 0.
?K math:notEqualTo 0.
("log(_J)-log(_K)" ?J ?K) e:calculate ?H.
}.
}
?Y
?YL
).
?SCOPE e:findall (
(?H ?U1 ?U2 ?U3 ?U4)
{
?YL list:member (?H ?U1 ?U2 ?U3 ?U4).
?H math:notLessThan 0.
}
?PL
).
?PL e:sort ?PS.
?PS e:reverse ?PR.
?SCOPE e:optional {
((?P1 ?P2 ?P3 ?P4 ?P5) ?PI) list:append ?PR.
?PT log:equalTo (?P1 ?P2 ?P3 ?P4 ?P5).
}, {
?PT log:equalTo ?PR.
}.
?SCOPE e:findall (
(?H ?U1 ?U2 ?U3 ?U4)
{
?YL list:member (?H ?U1 ?U2 ?U3 ?U4).
?H math:lessThan 0.
}
?NL
).
?NL e:sort ?NS.
?SCOPE e:optional {
((?N1 ?N2 ?N3 ?N4 ?N5) ?NI) list:append ?NS.
?NT log:equalTo (?N1 ?N2 ?N3 ?N4 ?N5).
}, {
?NT log:equalTo ?NS.
}.
(?PT ?NT) list:append ?Y.
?SCOPE e:findall (
?H
{
?Y list:member (?U ?V ?H).
?YL list:member (?H ?U1 ?U2 ?U3 ?U4).
}
?L
).
......
#Processed by EYE v18.1230.1307 josd
#eye --nope --turtle http://josd.github.io/eye/reasoning/ccd/test_data.ttl --turtle http://josd.github.io/eye/reasoning/ccd/train_model.ttl --n3 http://josd.github.io/eye/reasoning/ccd/background_rules.n3 --n3 http://josd.github.io/eye/reasoning/ccd/ccd_rules.n3 --query http://josd.github.io/eye/reasoning/ccd/test_query.n3
#eye --nope --turtle http://josd.github.io/eye/reasoning/ccd/test_data.ttl --turtle http://josd.github.io/eye/reasoning/ccd/train_model.ttl --n3 http://josd.github.io/eye/reasoning/ccd/background_rules.n3 --n3 ccd_rules.n3 --query http://josd.github.io/eye/reasoning/ccd/test_query.n3
PREFIX : <http://josd.github.io/eye/reasoning#>
PREFIX list: <http://www.w3.org/2000/10/swap/list#>
PREFIX ccd: <http://josd.github.io/eye/reasoning/ccd#>
PREFIX math: <http://www.w3.org/2000/10/swap/math#>
PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
_:t_0 :answer (:expected 1 :predicted 1 :belief 0.7040031411428228 :evidence ((:input1 "xyz" 0.6931471805599453) (:input3 (0 1) 0.0) (:input4 :v4 0.0) (:input5 "b" 2.772588722239781))).
_:t_1 :answer (:expected 0 :predicted 0 :belief 0.6217496707387207 :evidence ((:input1 "abc" -0.4054651081081645) (:input2 60 -0.6931471805599453) (:input4 :v3 -0.6931471805599453) (:input5 "a" 0.0) (:input10 ("abc" 60) -0.6931471805599453))).
_:t_2 :answer (:expected 1 :predicted 1 :belief 0.8262932434158183 :evidence ((:input1 "xyz" 0.6931471805599453) (:input2 40 2.772588722239781) (:input5 "a" 0.0) (:input10 ("xyz" 40) 2.772588722239781))).
_:t_3 :answer (:expected 0 :predicted 0 :belief 0.5857864376269049 :evidence ((:input3 (0 1) 0.0) (:input4 :v3 -0.6931471805599453))).
_:t_0 :answer (:expected 1 :predicted 1 :belief 0.7793839329182233 :evidence ((4.355172180607204 :input5 "b" 2 0) (0.6931471805599453 :input1 "xyz" 2 1) (0.0 :input4 :v4 1 1) (0.0 :input3 (0 1) 2 2))).
_:t_1 :answer (:expected 0 :predicted 0 :belief 0.6217496707387207 :evidence ((0.0 :input5 "a" 1 1) (-0.6931471805599453 :input10 ("abc" 60) 1 2) (-0.6931471805599453 :input2 60 2 4) (-0.6931471805599453 :input4 :v3 1 2) (-0.4054651081081645 :input1 "abc" 2 3))).
_:t_2 :answer (:expected 1 :predicted 1 :belief 0.9130035841381883 :evidence ((4.355172180607204 :input2 40 3 0) (4.355172180607204 :input10 ("xyz" 40) 1 0) (0.6931471805599453 :input1 "xyz" 2 1) (0.0 :input5 "a" 1 1))).
_:t_3 :answer (:expected 0 :predicted 0 :belief 0.5857864376269049 :evidence ((0.0 :input3 (0 1) 2 2) (-0.6931471805599453 :input4 :v3 1 2))).
#2019-01-03T11:34:51.504Z in=40 out=4 ent=3 step=6 brake=2 inf=51941 sec=0.037 inf/sec=1403811
#2019-01-13T10:23:25.022Z in=40 out=4 ent=3 step=6 brake=2 inf=67504 sec=0.127 inf/sec=531528
#ENDS
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment