Skip to content

Instantly share code, notes, and snippets.

@kenwebb
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenwebb/362f506e4b0e5e057ab7 to your computer and use it in GitHub Desktop.
Save kenwebb/362f506e4b0e5e057ab7 to your computer and use it in GitHub Desktop.
Bayesian inference 2
<?xml version="1.0" encoding="UTF-8"?>
<!--Xholon Workbook http://www.primordion.com/Xholon/gwt/ MIT License, Copyright (C) Ken Webb, Tue May 06 2014 11:36:30 GMT-0400 (EDT)-->
<XholonWorkbook>
<Notes><![CDATA[
Xholon
------
Title: Bayesian inference 2
Description:
Url: http://www.primordion.com/Xholon/gwt/
InternalName: 362f506e4b0e5e057ab7
Keywords:
My Notes
--------
This is associated with XholonWorkbook ceb4083319ebfa4a7bd0
The present workbook implements the "Making a prediction" example in:
http://en.wikipedia.org/w/index.php?title=Bayesian_inference&oldid=605608761
`An archaeologist is working at a site thought to be from the medieval period, between the 11th century to the 16th century. However, it is uncertain exactly when in this period the site was inhabited. Fragments of pottery are found, some of which are glazed and some of which are decorated. It is expected that if the site were inhabited during the early medieval period, then 1% of the pottery would be glazed and 50% of its area decorated, whereas if it had been inhabited in the late medieval period then 81% would be glazed and 5% of its area decorated. How confident can the archaeologist be in the date of inhabitation as fragments are unearthed?`
]]></Notes>
<_-.XholonClass>
<BayesianSystem/>
<ArchaeologicalSite/>
<PotteryFragment>
<GlazedFragment/>
<DecoratedFragment/>
</PotteryFragment>
<PotteryFragments/>
<Archaeologist/>
</_-.XholonClass>
<xholonClassDetails>
<Block>
<port name="height" connector="Height"/>
</Block>
</xholonClassDetails>
<BayesianSystem>
<PotteryFragments/>
<Archaeologist/>
</BayesianSystem>
<Heightbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
var myHeight, testing;
var beh = {
postConfigure: function() {
testing = Math.floor(Math.random() * 10);
myHeight = this.cnode.parent();
},
act: function() {
myHeight.println(this.toString());
},
toString: function() {
return "testing:" + testing;
}
}
]]></Heightbehavior>
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml,
<svg width="100" height="50" xmlns="http://www.w3.org/2000/svg">
<g>
<title>Pottery Fragments</title>
<rect id="BayesianSystem/PotteryFragments" fill="#98FB98" height="50" width="50" x="25" y="0"/>
<g>
<title>Archaeologist</title>
<rect id="BayesianSystem/Archaeologist" fill="#6AB06A" height="50" width="10" x="80" y="0"/>
</g>
</g>
</svg>
]]></Attribute_String><Attribute_String roleName="setup">${MODELNAME_DEFAULT},${SVGURI_DEFAULT}</Attribute_String></SvgClient>
</XholonWorkbook>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment