W3C home > Mailing lists > Public > public-cwm-talk@w3.org > January to March 2010

question about updating models

From: Will Ware <wware@alum.mit.edu>
Date: Wed, 27 Jan 2010 20:01:03 -0500
Message-ID: <d2f491ca1001271701n292adf55mbd22a1cb4ff7af42@mail.gmail.com>
To: public-cwm-talk@w3.org
I am trying to do some bayesian inference with CWM. I've got two random
boolean variables which are causally linked by a couple of probabilities,
which I am representing thus:

@prefix  rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix  bayes:  <> .
@prefix  :       <#> .

:L rdf:type bayes:link1 .
:L bayes:p11 0.456 .
:L bayes:p01 0.123 .
:L bayes:cause :A .
:L bayes:effect :B .
:A rdf:name "A" .
:A rdf:type bayes:boolean .
:A bayes:probability 0.7 .
:B rdf:name "B" .
:B rdf:type bayes:boolean .
:B bayes:probability 0.3 .

When I observe the value of B, I'll want to update the probability of A. So
I was tinkering with the mechanics of updating the probability and did this

@prefix log: <http://www.w3.org/2000/10/swap/log#> .
@forAll :who, :what.
{ :who bayes:probability :what } log:implies { :who bayes:probability
0.12345 }.

Running this gives each variable two probabilities:

    bay:A     a :boolean;
         :probability 0.12345,
         rdf:name "A" .

    bay:B     a :boolean;
         :probability 0.12345,
         rdf:name "B" .

I realized that what's happening here is that I am adding new triples to the
model but I don't know a way to delete old triples. Does such a way exist?
Received on Thursday, 28 January 2010 21:35:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 28 January 2010 21:36:00 GMT