 ;; **
 
 ;; @@
-(def num-particles 100)
+(def num-particles 10000)
 (def is-states (take num-particles (infer :importance dirichlet-process-mixture-stick-breaking [test-observations])))
 (plot/histogram (repeatedly 1000 #(sample* (categorical (vec (empirical-distribution (collect-results is-states)))))) :normalize :probability-density :bins 100)
 ;; @@
 ;; =>
-;;; {"type":"vega","content":{"width":400,"height":247.2187957763672,"padding":{"top":10,"left":55,"bottom":40,"right":10},"data":[{"name":"c57ddb88-30b1-4616-9f5f-8fb2c4de139f","values":[{"x":-6.243251570872203,"y":0},{"x":-6.0927491641161104,"y":0.3388650128542585},{"x":-5.942246757360018,"y":0.0},{"x":-5.791744350603926,"y":0.0},{"x":-5.641241943847834,"y":0.0},{"x":-5.490739537091741,"y":0.0},{"x":-5.340237130335649,"y":0.0},{"x":-5.189734723579557,"y":0.0},{"x":-5.0392323168234645,"y":0.0},{"x":-4.888729910067372,"y":0.0},{"x":-4.73822750331128,"y":0.0},{"x":-4.587725096555188,"y":0.0},{"x":-4.437222689799095,"y":0.0},{"x":-4.286720283043003,"y":0.0},{"x":-4.136217876286911,"y":0.0},{"x":-3.9857154695308186,"y":0.0},{"x":-3.8352130627747263,"y":0.0},{"x":-3.684710656018634,"y":0.0},{"x":-3.5342082492625417,"y":0.0},{"x":-3.3837058425064495,"y":0.0},{"x":-3.233203435750357,"y":0.0},{"x":-3.082701028994265,"y":0.0},{"x":-2.9321986222381726,"y":0.0},{"x":-2.7816962154820803,"y":0.0},{"x":-2.631193808725988,"y":0.0},{"x":-2.480691401969896,"y":0.0},{"x":-2.3301889952138035,"y":0.0},{"x":-2.1796865884577112,"y":0.0},{"x":-2.029184181701619,"y":0.0},{"x":-1.878681774945527,"y":0.0},{"x":-1.7281793681894349,"y":0.0},{"x":-1.5776769614333428,"y":0.0},{"x":-1.4271745546772507,"y":0.0},{"x":-1.2766721479211587,"y":0.0},{"x":-1.1261697411650666,"y":0.0},{"x":-0.9756673344089746,"y":0.0},{"x":-0.8251649276528825,"y":0.006644412016750167},{"x":-0.6746625208967905,"y":0.0},{"x":-0.5241601141406984,"y":0.0},{"x":-0.3736577073846063,"y":0.0},{"x":-0.22315530062851419,"y":0.0},{"x":-0.07265289387242208,"y":0.0},{"x":0.07784951288367004,"y":0.0},{"x":0.22835191963976215,"y":0.0},{"x":0.37885432639585426,"y":0.0},{"x":0.5293567331519464,"y":0.0},{"x":0.6798591399080385,"y":0.0},{"x":0.8303615466641305,"y":0.0},{"x":0.9808639534202226,"y":0.0},{"x":1.1313663601763146,"y":0.0},{"x":1.2818687669324067,"y":0.0},{"x":1.4323711736884988,"y":0.0},{"x":1.5828735804445908,"y":0.0},{"x":1.7333759872006829,"y":0.0},{"x":1.883878393956775,"y":0.0},{"x":2.034380800712867,"y":0.0},{"x":2.1848832074689595,"y":0.0},{"x":2.3353856142250518,"y":0.0},{"x":2.485888020981144,"y":0.0},{"x":2.6363904277372363,"y":0.0},{"x":2.7868928344933286,"y":0.0},{"x":2.937395241249421,"y":0.0},{"x":3.087897648005513,"y":0.0},{"x":3.2384000547616054,"y":0.0},{"x":3.3889024615176977,"y":0.0},{"x":3.53940486827379,"y":0.0},{"x":3.6899072750298822,"y":0.0},{"x":3.8404096817859745,"y":0.0},{"x":3.990912088542067,"y":0.0},{"x":4.141414495298159,"y":0.0199332360502505},{"x":4.291916902054251,"y":0.0},{"x":4.442419308810344,"y":0.0},{"x":4.592921715566436,"y":0.039866472100501},{"x":4.743424122322528,"y":0.0},{"x":4.8939265290786205,"y":0.0},{"x":5.044428935834713,"y":0.0},{"x":5.194931342590805,"y":0.0},{"x":5.345433749346897,"y":0.0},{"x":5.49593615610299,"y":0.0},{"x":5.646438562859082,"y":0.006644412016750167},{"x":5.796940969615174,"y":0.0},{"x":5.947443376371266,"y":0.0},{"x":6.097945783127359,"y":0.0},{"x":6.248448189883451,"y":0.0},{"x":6.398950596639543,"y":0.0},{"x":6.5494530033956355,"y":0.0},{"x":6.699955410151728,"y":0.6312191415912659},{"x":6.85045781690782,"y":0.0},{"x":7.000960223663912,"y":0.0},{"x":7.151462630420005,"y":0.0},{"x":7.301965037176097,"y":0.0},{"x":7.452467443932189,"y":0.0},{"x":7.6029698506882815,"y":0.0},{"x":7.753472257444374,"y":0.0},{"x":7.903974664200466,"y":0.0},{"x":8.054477070956558,"y":0.0},{"x":8.20497947771265,"y":0.0},{"x":8.355481884468741,"y":0.0},{"x":8.505984291224832,"y":2.305610969812308},{"x":8.656486697980924,"y":0.0},{"x":8.806989104737015,"y":3.295628360308083},{"x":8.957491511493107,"y":0}]}],"marks":[{"type":"line","from":{"data":"c57ddb88-30b1-4616-9f5f-8fb2c4de139f"},"properties":{"enter":{"x":{"scale":"x","field":"data.x"},"y":{"scale":"y","field":"data.y"},"interpolate":{"value":"step-before"},"fill":{"value":"steelblue"},"fillOpacity":{"value":0.4},"stroke":{"value":"steelblue"},"strokeWidth":{"value":2},"strokeOpacity":{"value":1}}}}],"scales":[{"name":"x","type":"linear","range":"width","zero":false,"domain":{"data":"c57ddb88-30b1-4616-9f5f-8fb2c4de139f","field":"data.x"}},{"name":"y","type":"linear","range":"height","nice":true,"zero":false,"domain":{"data":"c57ddb88-30b1-4616-9f5f-8fb2c4de139f","field":"data.y"}}],"axes":[{"type":"x","scale":"x"},{"type":"y","scale":"y"}]},"value":"#gorilla_repl.vega.VegaView{:content {:width 400, :height 247.2188, :padding {:top 10, :left 55, :bottom 40, :right 10}, :data [{:name \"c57ddb88-30b1-4616-9f5f-8fb2c4de139f\", :values ({:x -6.243251570872203, :y 0} {:x -6.0927491641161104, :y 0.3388650128542585} {:x -5.942246757360018, :y 0.0} {:x -5.791744350603926, :y 0.0} {:x -5.641241943847834, :y 0.0} {:x -5.490739537091741, :y 0.0} {:x -5.340237130335649, :y 0.0} {:x -5.189734723579557, :y 0.0} {:x -5.0392323168234645, :y 0.0} {:x -4.888729910067372, :y 0.0} {:x -4.73822750331128, :y 0.0} {:x -4.587725096555188, :y 0.0} {:x -4.437222689799095, :y 0.0} {:x -4.286720283043003, :y 0.0} {:x -4.136217876286911, :y 0.0} {:x -3.9857154695308186, :y 0.0} {:x -3.8352130627747263, :y 0.0} {:x -3.684710656018634, :y 0.0} {:x -3.5342082492625417, :y 0.0} {:x -3.3837058425064495, :y 0.0} {:x -3.233203435750357, :y 0.0} {:x -3.082701028994265, :y 0.0} {:x -2.9321986222381726, :y 0.0} {:x -2.7816962154820803, :y 0.0} {:x -2.631193808725988, :y 0.0} {:x -2.480691401969896, :y 0.0} {:x -2.3301889952138035, :y 0.0} {:x -2.1796865884577112, :y 0.0} {:x -2.029184181701619, :y 0.0} {:x -1.878681774945527, :y 0.0} {:x -1.7281793681894349, :y 0.0} {:x -1.5776769614333428, :y 0.0} {:x -1.4271745546772507, :y 0.0} {:x -1.2766721479211587, :y 0.0} {:x -1.1261697411650666, :y 0.0} {:x -0.9756673344089746, :y 0.0} {:x -0.8251649276528825, :y 0.006644412016750167} {:x -0.6746625208967905, :y 0.0} {:x -0.5241601141406984, :y 0.0} {:x -0.3736577073846063, :y 0.0} {:x -0.22315530062851419, :y 0.0} {:x -0.07265289387242208, :y 0.0} {:x 0.07784951288367004, :y 0.0} {:x 0.22835191963976215, :y 0.0} {:x 0.37885432639585426, :y 0.0} {:x 0.5293567331519464, :y 0.0} {:x 0.6798591399080385, :y 0.0} {:x 0.8303615466641305, :y 0.0} {:x 0.9808639534202226, :y 0.0} {:x 1.1313663601763146, :y 0.0} {:x 1.2818687669324067, :y 0.0} {:x 1.4323711736884988, :y 0.0} {:x 1.5828735804445908, :y 0.0} {:x 1.7333759872006829, :y 0.0} {:x 1.883878393956775, :y 0.0} {:x 2.034380800712867, :y 0.0} {:x 2.1848832074689595, :y 0.0} {:x 2.3353856142250518, :y 0.0} {:x 2.485888020981144, :y 0.0} {:x 2.6363904277372363, :y 0.0} {:x 2.7868928344933286, :y 0.0} {:x 2.937395241249421, :y 0.0} {:x 3.087897648005513, :y 0.0} {:x 3.2384000547616054, :y 0.0} {:x 3.3889024615176977, :y 0.0} {:x 3.53940486827379, :y 0.0} {:x 3.6899072750298822, :y 0.0} {:x 3.8404096817859745, :y 0.0} {:x 3.990912088542067, :y 0.0} {:x 4.141414495298159, :y 0.0199332360502505} {:x 4.291916902054251, :y 0.0} {:x 4.442419308810344, :y 0.0} {:x 4.592921715566436, :y 0.039866472100501} {:x 4.743424122322528, :y 0.0} {:x 4.8939265290786205, :y 0.0} {:x 5.044428935834713, :y 0.0} {:x 5.194931342590805, :y 0.0} {:x 5.345433749346897, :y 0.0} {:x 5.49593615610299, :y 0.0} {:x 5.646438562859082, :y 0.006644412016750167} {:x 5.796940969615174, :y 0.0} {:x 5.947443376371266, :y 0.0} {:x 6.097945783127359, :y 0.0} {:x 6.248448189883451, :y 0.0} {:x 6.398950596639543, :y 0.0} {:x 6.5494530033956355, :y 0.0} {:x 6.699955410151728, :y 0.6312191415912659} {:x 6.85045781690782, :y 0.0} {:x 7.000960223663912, :y 0.0} {:x 7.151462630420005, :y 0.0} {:x 7.301965037176097, :y 0.0} {:x 7.452467443932189, :y 0.0} {:x 7.6029698506882815, :y 0.0} {:x 7.753472257444374, :y 0.0} {:x 7.903974664200466, :y 0.0} {:x 8.054477070956558, :y 0.0} {:x 8.20497947771265, :y 0.0} {:x 8.355481884468741, :y 0.0} {:x 8.505984291224832, :y 2.305610969812308} {:x 8.656486697980924, :y 0.0} {:x 8.806989104737015, :y 3.295628360308083} {:x 8.957491511493107, :y 0})}], :marks [{:type \"line\", :from {:data \"c57ddb88-30b1-4616-9f5f-8fb2c4de139f\"}, :properties {:enter {:x {:scale \"x\", :field \"data.x\"}, :y {:scale \"y\", :field \"data.y\"}, :interpolate {:value \"step-before\"}, :fill {:value \"steelblue\"}, :fillOpacity {:value 0.4}, :stroke {:value \"steelblue\"}, :strokeWidth {:value 2}, :strokeOpacity {:value 1}}}}], :scales [{:name \"x\", :type \"linear\", :range \"width\", :zero false, :domain {:data \"c57ddb88-30b1-4616-9f5f-8fb2c4de139f\", :field \"data.x\"}} {:name \"y\", :type \"linear\", :range \"height\", :nice true, :zero false, :domain {:data \"c57ddb88-30b1-4616-9f5f-8fb2c4de139f\", :field \"data.y\"}}], :axes [{:type \"x\", :scale \"x\"} {:type \"y\", :scale \"y\"}]}}"}
+;;; {"type":"vega","content":{"width":400,"height":247.2187957763672,"padding":{"top":10,"left":55,"bottom":40,"right":10},"data":[{"name":"de1b25c3-74b4-4e25-ba18-bea77bedda1a","values":[{"x":-29.080964191558536,"y":0},{"x":-28.18373997179151,"y":0.45696492690139534},{"x":-27.286515752024485,"y":0.0},{"x":-26.38929153225746,"y":0.0},{"x":-25.492067312490434,"y":0.0},{"x":-24.59484309272341,"y":0.0},{"x":-23.697618872956383,"y":0.0011145486021985251},{"x":-22.800394653189358,"y":0.0033436458065955756},{"x":-21.903170433422332,"y":0.0},{"x":-21.005946213655307,"y":0.0},{"x":-20.10872199388828,"y":0.0},{"x":-19.211497774121256,"y":0.0022290972043970503},{"x":-18.31427355435423,"y":0.0},{"x":-17.417049334587205,"y":0.0},{"x":-16.51982511482018,"y":0.0},{"x":-15.622600895053154,"y":0.0},{"x":-14.725376675286128,"y":0.0},{"x":-13.828152455519103,"y":0.0033436458065955756},{"x":-12.930928235752077,"y":0.0011145486021985251},{"x":-12.033704015985052,"y":0.0},{"x":-11.136479796218026,"y":0.0},{"x":-10.239255576451,"y":0.005572743010992626},{"x":-9.342031356683975,"y":0.0033436458065955756},{"x":-8.44480713691695,"y":0.02786371505496313},{"x":-7.547582917149925,"y":0.0011145486021985251},{"x":-6.6503586973829005,"y":0.0},{"x":-5.753134477615876,"y":0.0033436458065955756},{"x":-4.855910257848851,"y":0.020061874839573453},{"x":-3.9586860380818263,"y":0.0011145486021985251},{"x":-3.0614618183148012,"y":0.0044581944087941005},{"x":-2.164237598547776,"y":0.0033436458065955756},{"x":-1.2670133787807512,"y":0.0},{"x":-0.3697891590137262,"y":0.020061874839573453},{"x":0.5274350607532987,"y":0.022290972043970503},{"x":1.4246592805203235,"y":0.013374583226382302},{"x":2.3218835002873486,"y":0.010030937419786726},{"x":3.2191077200543736,"y":0.024520069248367554},{"x":4.116331939821398,"y":0.024520069248367554},{"x":5.013556159588423,"y":0.03343645806595576},{"x":5.910780379355447,"y":0.04346739548574248},{"x":6.808004599122472,"y":0.04235284688354396},{"x":7.705228818889497,"y":0.15715135290999205},{"x":8.602453038656522,"y":0.035665555270352804},{"x":9.499677258423548,"y":0.031207360861558706},{"x":10.396901478190573,"y":0.031207360861558706},{"x":11.294125697957599,"y":0.050154687098933635},{"x":12.191349917724624,"y":0.012260034624183777},{"x":13.08857413749165,"y":0.011145486021985252},{"x":13.985798357258675,"y":0.0022290972043970503},{"x":14.8830225770257,"y":0.0},{"x":15.780246796792726,"y":0.005572743010992626},{"x":16.67747101655975,"y":0.0},{"x":17.574695236326775,"y":0.0},{"x":18.4719194560938,"y":0.0},{"x":19.369143675860826,"y":0.0},{"x":20.26636789562785,"y":0.0011145486021985251},{"x":21.163592115394877,"y":0.0},{"x":22.060816335161903,"y":0.0},{"x":22.958040554928928,"y":0.0},{"x":23.855264774695954,"y":0.0},{"x":24.75248899446298,"y":0.0022290972043970503},{"x":25.649713214230005,"y":0.0},{"x":26.54693743399703,"y":0.0},{"x":27.444161653764056,"y":0.0},{"x":28.34138587353108,"y":0.0},{"x":29.238610093298107,"y":0.0},{"x":30.135834313065132,"y":0.0},{"x":31.033058532832158,"y":0.0},{"x":31.930282752599183,"y":0.0},{"x":32.82750697236621,"y":0.0},{"x":33.724731192133234,"y":0.0},{"x":34.62195541190026,"y":0.0},{"x":35.519179631667285,"y":0.0},{"x":36.41640385143431,"y":0.0},{"x":37.313628071201336,"y":0.0},{"x":38.21085229096836,"y":0.0},{"x":39.10807651073539,"y":0.0},{"x":40.00530073050241,"y":0.0},{"x":40.90252495026944,"y":0.0},{"x":41.79974917003646,"y":0.0},{"x":42.69697338980349,"y":0.0},{"x":43.594197609570514,"y":0.0},{"x":44.49142182933754,"y":0.0},{"x":45.388646049104565,"y":0.0},{"x":46.28587026887159,"y":0.0},{"x":47.183094488638616,"y":0.0},{"x":48.08031870840564,"y":0.0},{"x":48.97754292817267,"y":0.0},{"x":49.87476714793969,"y":0.0},{"x":50.77199136770672,"y":0.0},{"x":51.669215587473744,"y":0.0},{"x":52.56643980724077,"y":0.0},{"x":53.463664027007795,"y":0.0},{"x":54.36088824677482,"y":0.0},{"x":55.258112466541846,"y":0.0},{"x":56.15533668630887,"y":0.0},{"x":57.0525609060759,"y":0.0},{"x":57.94978512584292,"y":0.0},{"x":58.84700934560995,"y":0.0},{"x":59.74423356537697,"y":0.0},{"x":60.641457785144,"y":0.0022290972043970503},{"x":61.538682004911024,"y":0}]}],"marks":[{"type":"line","from":{"data":"de1b25c3-74b4-4e25-ba18-bea77bedda1a"},"properties":{"enter":{"x":{"scale":"x","field":"data.x"},"y":{"scale":"y","field":"data.y"},"interpolate":{"value":"step-before"},"fill":{"value":"steelblue"},"fillOpacity":{"value":0.4},"stroke":{"value":"steelblue"},"strokeWidth":{"value":2},"strokeOpacity":{"value":1}}}}],"scales":[{"name":"x","type":"linear","range":"width","zero":false,"domain":{"data":"de1b25c3-74b4-4e25-ba18-bea77bedda1a","field":"data.x"}},{"name":"y","type":"linear","range":"height","nice":true,"zero":false,"domain":{"data":"de1b25c3-74b4-4e25-ba18-bea77bedda1a","field":"data.y"}}],"axes":[{"type":"x","scale":"x"},{"type":"y","scale":"y"}]},"value":"#gorilla_repl.vega.VegaView{:content {:width 400, :height 247.2188, :padding {:top 10, :left 55, :bottom 40, :right 10}, :data [{:name \"de1b25c3-74b4-4e25-ba18-bea77bedda1a\", :values ({:x -29.080964191558536, :y 0} {:x -28.18373997179151, :y 0.45696492690139534} {:x -27.286515752024485, :y 0.0} {:x -26.38929153225746, :y 0.0} {:x -25.492067312490434, :y 0.0} {:x -24.59484309272341, :y 0.0} {:x -23.697618872956383, :y 0.0011145486021985251} {:x -22.800394653189358, :y 0.0033436458065955756} {:x -21.903170433422332, :y 0.0} {:x -21.005946213655307, :y 0.0} {:x -20.10872199388828, :y 0.0} {:x -19.211497774121256, :y 0.0022290972043970503} {:x -18.31427355435423, :y 0.0} {:x -17.417049334587205, :y 0.0} {:x -16.51982511482018, :y 0.0} {:x -15.622600895053154, :y 0.0} {:x -14.725376675286128, :y 0.0} {:x -13.828152455519103, :y 0.0033436458065955756} {:x -12.930928235752077, :y 0.0011145486021985251} {:x -12.033704015985052, :y 0.0} {:x -11.136479796218026, :y 0.0} {:x -10.239255576451, :y 0.005572743010992626} {:x -9.342031356683975, :y 0.0033436458065955756} {:x -8.44480713691695, :y 0.02786371505496313} {:x -7.547582917149925, :y 0.0011145486021985251} {:x -6.6503586973829005, :y 0.0} {:x -5.753134477615876, :y 0.0033436458065955756} {:x -4.855910257848851, :y 0.020061874839573453} {:x -3.9586860380818263, :y 0.0011145486021985251} {:x -3.0614618183148012, :y 0.0044581944087941005} {:x -2.164237598547776, :y 0.0033436458065955756} {:x -1.2670133787807512, :y 0.0} {:x -0.3697891590137262, :y 0.020061874839573453} {:x 0.5274350607532987, :y 0.022290972043970503} {:x 1.4246592805203235, :y 0.013374583226382302} {:x 2.3218835002873486, :y 0.010030937419786726} {:x 3.2191077200543736, :y 0.024520069248367554} {:x 4.116331939821398, :y 0.024520069248367554} {:x 5.013556159588423, :y 0.03343645806595576} {:x 5.910780379355447, :y 0.04346739548574248} {:x 6.808004599122472, :y 0.04235284688354396} {:x 7.705228818889497, :y 0.15715135290999205} {:x 8.602453038656522, :y 0.035665555270352804} {:x 9.499677258423548, :y 0.031207360861558706} {:x 10.396901478190573, :y 0.031207360861558706} {:x 11.294125697957599, :y 0.050154687098933635} {:x 12.191349917724624, :y 0.012260034624183777} {:x 13.08857413749165, :y 0.011145486021985252} {:x 13.985798357258675, :y 0.0022290972043970503} {:x 14.8830225770257, :y 0.0} {:x 15.780246796792726, :y 0.005572743010992626} {:x 16.67747101655975, :y 0.0} {:x 17.574695236326775, :y 0.0} {:x 18.4719194560938, :y 0.0} {:x 19.369143675860826, :y 0.0} {:x 20.26636789562785, :y 0.0011145486021985251} {:x 21.163592115394877, :y 0.0} {:x 22.060816335161903, :y 0.0} {:x 22.958040554928928, :y 0.0} {:x 23.855264774695954, :y 0.0} {:x 24.75248899446298, :y 0.0022290972043970503} {:x 25.649713214230005, :y 0.0} {:x 26.54693743399703, :y 0.0} {:x 27.444161653764056, :y 0.0} {:x 28.34138587353108, :y 0.0} {:x 29.238610093298107, :y 0.0} {:x 30.135834313065132, :y 0.0} {:x 31.033058532832158, :y 0.0} {:x 31.930282752599183, :y 0.0} {:x 32.82750697236621, :y 0.0} {:x 33.724731192133234, :y 0.0} {:x 34.62195541190026, :y 0.0} {:x 35.519179631667285, :y 0.0} {:x 36.41640385143431, :y 0.0} {:x 37.313628071201336, :y 0.0} {:x 38.21085229096836, :y 0.0} {:x 39.10807651073539, :y 0.0} {:x 40.00530073050241, :y 0.0} {:x 40.90252495026944, :y 0.0} {:x 41.79974917003646, :y 0.0} {:x 42.69697338980349, :y 0.0} {:x 43.594197609570514, :y 0.0} {:x 44.49142182933754, :y 0.0} {:x 45.388646049104565, :y 0.0} {:x 46.28587026887159, :y 0.0} {:x 47.183094488638616, :y 0.0} {:x 48.08031870840564, :y 0.0} {:x 48.97754292817267, :y 0.0} {:x 49.87476714793969, :y 0.0} {:x 50.77199136770672, :y 0.0} {:x 51.669215587473744, :y 0.0} {:x 52.56643980724077, :y 0.0} {:x 53.463664027007795, :y 0.0} {:x 54.36088824677482, :y 0.0} {:x 55.258112466541846, :y 0.0} {:x 56.15533668630887, :y 0.0} {:x 57.0525609060759, :y 0.0} {:x 57.94978512584292, :y 0.0} {:x 58.84700934560995, :y 0.0} {:x 59.74423356537697, :y 0.0} {:x 60.641457785144, :y 0.0022290972043970503} {:x 61.538682004911024, :y 0})}], :marks [{:type \"line\", :from {:data \"de1b25c3-74b4-4e25-ba18-bea77bedda1a\"}, :properties {:enter {:x {:scale \"x\", :field \"data.x\"}, :y {:scale \"y\", :field \"data.y\"}, :interpolate {:value \"step-before\"}, :fill {:value \"steelblue\"}, :fillOpacity {:value 0.4}, :stroke {:value \"steelblue\"}, :strokeWidth {:value 2}, :strokeOpacity {:value 1}}}}], :scales [{:name \"x\", :type \"linear\", :range \"width\", :zero false, :domain {:data \"de1b25c3-74b4-4e25-ba18-bea77bedda1a\", :field \"data.x\"}} {:name \"y\", :type \"linear\", :range \"height\", :nice true, :zero false, :domain {:data \"de1b25c3-74b4-4e25-ba18-bea77bedda1a\", :field \"data.y\"}}], :axes [{:type \"x\", :scale \"x\"} {:type \"y\", :scale \"y\"}]}}"}
 ;; <=
 
 ;; **

(sample-samples-from-prior dirichlet-process-mixture-stick-breaking [(repeat 8 nil)])
;; @@
;; =>
;;; {"type":"list-like","open":"<span class='clj-vector'>[</span>","close":"<span class='clj-vector'>]</span>","separator":" ","items":[{"type":"list-like","open":"<span class='clj-map'>{</span>","close":"<span class='clj-map'>}</span>","separator":", ","items":[{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:time-index</span>","value":":time-index"},{"type":"html","content":"<span class='clj-unkown'>0</span>","value":"0"}],"value":"[:time-index 0]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-address</span>","value":":sample-address"},{"type":"html","content":"<span class='clj-string'>&quot;S65&quot;</span>","value":"\"S65\""}],"value":"[:sample-address \"S65\"]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-instance</span>","value":":sample-instance"},{"type":"html","content":"<span class='clj-unkown'>0</span>","value":"0"}],"value":"[:sample-instance 0]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:distribution</span>","value":":distribution"},{"type":"html","content":"<span class='clj-unkown'>#object[anglican.infcomp.flatbuffers.gamma.GammaClj 0xdb12dd2 &quot;anglican.infcomp.flatbuffers.gamma.GammaClj@db12dd2&quot;]</span>","value":"#object[anglican.infcomp.flatbuffers.gamma.GammaClj 0xdb12dd2 \"anglican.infcomp.flatbuffers.gamma.GammaClj@db12dd2\"]"}],"value":"[:distribution #object[anglican.infcomp.flatbuffers.gamma.GammaClj 0xdb12dd2 \"anglican.infcomp.flatbuffers.gamma.GammaClj@db12dd2\"]]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:value</span>","value":":value"},{"type":"html","content":"<span class='clj-double'>0.8476691787003959</span>","value":"0.8476691787003959"}],"value":"[:value 0.8476691787003959]"}],"value":"{:time-index 0, :sample-address \"S65\", :sample-instance 0, :distribution #object[anglican.infcomp.flatbuffers.gamma.GammaClj 0xdb12dd2 \"anglican.infcomp.flatbuffers.gamma.GammaClj@db12dd2\"], :value 0.8476691787003959}"},{"type":"list-like","open":"<span class='clj-map'>{</span>","close":"<span class='clj-map'>}</span>","separator":", ","items":[{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:time-index</span>","value":":time-index"},{"type":"html","content":"<span class='clj-unkown'>1</span>","value":"1"}],"value":"[:time-index 1]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-address</span>","value":":sample-address"},{"type":"html","content":"<span class='clj-string'>&quot;S61&quot;</span>","value":"\"S61\""}],"value":"[:sample-address \"S61\"]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-instance</span>","value":":sample-instance"},{"type":"html","content":"<span class='clj-unkown'>0</span>","value":"0"}],"value":"[:sample-instance 0]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:distribution</span>","value":":distribution"},{"type":"html","content":"<span class='clj-unkown'>#object[anglican.infcomp.flatbuffers.normal.NormalClj 0x1ad94224 &quot;anglican.infcomp.flatbuffers.normal.NormalClj@1ad94224&quot;]</span>","value":"#object[anglican.infcomp.flatbuffers.normal.NormalClj 0x1ad94224 \"anglican.infcomp.flatbuffers.normal.NormalClj@1ad94224\"]"}],"value":"[:distribution #object[anglican.infcomp.flatbuffers.normal.NormalClj 0x1ad94224 \"anglican.infcomp.flatbuffers.normal.NormalClj@1ad94224\"]]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:value</span>","value":":value"},{"type":"html","content":"<span class='clj-double'>-2.1580974054483963</span>","value":"-2.1580974054483963"}],"value":"[:value -2.1580974054483963]"}],"value":"{:time-index 1, :sample-address \"S61\", :sample-instance 0, :distribution #object[anglican.infcomp.flatbuffers.normal.NormalClj 0x1ad94224 \"anglican.infcomp.flatbuffers.normal.NormalClj@1ad94224\"], :value -2.1580974054483963}"},{"type":"list-like","open":"<span class='clj-map'>{</span>","close":"<span class='clj-map'>}</span>","separator":", ","items":[{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:time-index</span>","value":":time-index"},{"type":"html","content":"<span class='clj-unkown'>2</span>","value":"2"}],"value":"[:time-index 2]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-address</span>","value":":sample-address"},{"type":"html","content":"<span class='clj-string'>&quot;S65&quot;</span>","value":"\"S65\""}],"value":"[:sample-address \"S65\"]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-instance</span>","value":":sample-instance"},{"type":"html","content":"<span class='clj-unkown'>1</span>","value":"1"}],"value":"[:sample-instance 1]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:distribution</span>","value":":distribution"},{"type":"html","content":"<span class='clj-unkown'>#object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x58bc6089 &quot;anglican.infcomp.flatbuffers.gamma.GammaClj@58bc6089&quot;]</span>","value":"#object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x58bc6089 \"anglican.infcomp.flatbuffers.gamma.GammaClj@58bc6089\"]"}],"value":"[:distribution #object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x58bc6089 \"anglican.infcomp.flatbuffers.gamma.GammaClj@58bc6089\"]]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:value</span>","value":":value"},{"type":"html","content":"<span class='clj-double'>9.707467147495931</span>","value":"9.707467147495931"}],"value":"[:value 9.707467147495931]"}],"value":"{:time-index 2, :sample-address \"S65\", :sample-instance 1, :distribution #object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x58bc6089 \"anglican.infcomp.flatbuffers.gamma.GammaClj@58bc6089\"], :value 9.707467147495931}"},{"type":"list-like","open":"<span class='clj-map'>{</span>","close":"<span class='clj-map'>}</span>","separator":", ","items":[{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:time-index</span>","value":":time-index"},{"type":"html","content":"<span class='clj-unkown'>3</span>","value":"3"}],"value":"[:time-index 3]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-address</span>","value":":sample-address"},{"type":"html","content":"<span class='clj-string'>&quot;S61&quot;</span>","value":"\"S61\""}],"value":"[:sample-address \"S61\"]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-instance</span>","value":":sample-instance"},{"type":"html","content":"<span class='clj-unkown'>1</span>","value":"1"}],"value":"[:sample-instance 1]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:distribution</span>","value":":distribution"},{"type":"html","content":"<span class='clj-unkown'>#object[anglican.infcomp.flatbuffers.normal.NormalClj 0x1f4655bf &quot;anglican.infcomp.flatbuffers.normal.NormalClj@1f4655bf&quot;]</span>","value":"#object[anglican.infcomp.flatbuffers.normal.NormalClj 0x1f4655bf \"anglican.infcomp.flatbuffers.normal.NormalClj@1f4655bf\"]"}],"value":"[:distribution #object[anglican.infcomp.flatbuffers.normal.NormalClj 0x1f4655bf \"anglican.infcomp.flatbuffers.normal.NormalClj@1f4655bf\"]]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:value</span>","value":":value"},{"type":"html","content":"<span class='clj-double'>3.1349892904629906</span>","value":"3.1349892904629906"}],"value":"[:value 3.1349892904629906]"}],"value":"{:time-index 3, :sample-address \"S61\", :sample-instance 1, :distribution #object[anglican.infcomp.flatbuffers.normal.NormalClj 0x1f4655bf \"anglican.infcomp.flatbuffers.normal.NormalClj@1f4655bf\"], :value 3.1349892904629906}"},{"type":"list-like","open":"<span class='clj-map'>{</span>","close":"<span class='clj-map'>}</span>","separator":", ","items":[{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:time-index</span>","value":":time-index"},{"type":"html","content":"<span class='clj-unkown'>4</span>","value":"4"}],"value":"[:time-index 4]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-address</span>","value":":sample-address"},{"type":"html","content":"<span class='clj-string'>&quot;S65&quot;</span>","value":"\"S65\""}],"value":"[:sample-address \"S65\"]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-instance</span>","value":":sample-instance"},{"type":"html","content":"<span class='clj-unkown'>2</span>","value":"2"}],"value":"[:sample-instance 2]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:distribution</span>","value":":distribution"},{"type":"html","content":"<span class='clj-unkown'>#object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x1b9d3438 &quot;anglican.infcomp.flatbuffers.gamma.GammaClj@1b9d3438&quot;]</span>","value":"#object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x1b9d3438 \"anglican.infcomp.flatbuffers.gamma.GammaClj@1b9d3438\"]"}],"value":"[:distribution #object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x1b9d3438 \"anglican.infcomp.flatbuffers.gamma.GammaClj@1b9d3438\"]]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:value</span>","value":":value"},{"type":"html","content":"<span class='clj-double'>0.4043576392769158</span>","value":"0.4043576392769158"}],"value":"[:value 0.4043576392769158]"}],"value":"{:time-index 4, :sample-address \"S65\", :sample-instance 2, :distribution #object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x1b9d3438 \"anglican.infcomp.flatbuffers.gamma.GammaClj@1b9d3438\"], :value 0.4043576392769158}"},{"type":"list-like","open":"<span class='clj-map'>{</span>","close":"<span class='clj-map'>}</span>","separator":", ","items":[{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:time-index</span>","value":":time-index"},{"type":"html","content":"<span class='clj-unkown'>5</span>","value":"5"}],"value":"[:time-index 5]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-address</span>","value":":sample-address"},{"type":"html","content":"<span class='clj-string'>&quot;S61&quot;</span>","value":"\"S61\""}],"value":"[:sample-address \"S61\"]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-instance</span>","value":":sample-instance"},{"type":"html","content":"<span class='clj-unkown'>2</span>","value":"2"}],"value":"[:sample-instance 2]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:distribution</span>","value":":distribution"},{"type":"html","content":"<span class='clj-unkown'>#object[anglican.infcomp.flatbuffers.normal.NormalClj 0x4b859d0d &quot;anglican.infcomp.flatbuffers.normal.NormalClj@4b859d0d&quot;]</span>","value":"#object[anglican.infcomp.flatbuffers.normal.NormalClj 0x4b859d0d \"anglican.infcomp.flatbuffers.normal.NormalClj@4b859d0d\"]"}],"value":"[:distribution #object[anglican.infcomp.flatbuffers.normal.NormalClj 0x4b859d0d \"anglican.infcomp.flatbuffers.normal.NormalClj@4b859d0d\"]]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:value</span>","value":":value"},{"type":"html","content":"<span class='clj-double'>10.084456609898497</span>","value":"10.084456609898497"}],"value":"[:value 10.084456609898497]"}],"value":"{:time-index 5, :sample-address \"S61\", :sample-instance 2, :distribution #object[anglican.infcomp.flatbuffers.normal.NormalClj 0x4b859d0d \"anglican.infcomp.flatbuffers.normal.NormalClj@4b859d0d\"], :value 10.084456609898497}"},{"type":"list-like","open":"<span class='clj-map'>{</span>","close":"<span class='clj-map'>}</span>","separator":", ","items":[{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:time-index</span>","value":":time-index"},{"type":"html","content":"<span class='clj-unkown'>6</span>","value":"6"}],"value":"[:time-index 6]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-address</span>","value":":sample-address"},{"type":"html","content":"<span class='clj-string'>&quot;S65&quot;</span>","value":"\"S65\""}],"value":"[:sample-address \"S65\"]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-instance</span>","value":":sample-instance"},{"type":"html","content":"<span class='clj-unkown'>3</span>","value":"3"}],"value":"[:sample-instance 3]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:distribution</span>","value":":distribution"},{"type":"html","content":"<span class='clj-unkown'>#object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x700614dc &quot;anglican.infcomp.flatbuffers.gamma.GammaClj@700614dc&quot;]</span>","value":"#object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x700614dc \"anglican.infcomp.flatbuffers.gamma.GammaClj@700614dc\"]"}],"value":"[:distribution #object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x700614dc \"anglican.infcomp.flatbuffers.gamma.GammaClj@700614dc\"]]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:value</span>","value":":value"},{"type":"html","content":"<span class='clj-double'>5.509213129856523</span>","value":"5.509213129856523"}],"value":"[:value 5.509213129856523]"}],"value":"{:time-index 6, :sample-address \"S65\", :sample-instance 3, :distribution #object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x700614dc \"anglican.infcomp.flatbuffers.gamma.GammaClj@700614dc\"], :value 5.509213129856523}"},{"type":"list-like","open":"<span class='clj-map'>{</span>","close":"<span class='clj-map'>}</span>","separator":", ","items":[{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:time-index</span>","value":":time-index"},{"type":"html","content":"<span class='clj-unkown'>7</span>","value":"7"}],"value":"[:time-index 7]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-address</span>","value":":sample-address"},{"type":"html","content":"<span class='clj-string'>&quot;S61&quot;</span>","value":"\"S61\""}],"value":"[:sample-address \"S61\"]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-instance</span>","value":":sample-instance"},{"type":"html","content":"<span class='clj-unkown'>3</span>","value":"3"}],"value":"[:sample-instance 3]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:distribution</span>","value":":distribution"},{"type":"html","content":"<span class='clj-unkown'>#object[anglican.infcomp.flatbuffers.normal.NormalClj 0x5dc04cce &quot;anglican.infcomp.flatbuffers.normal.NormalClj@5dc04cce&quot;]</span>","value":"#object[anglican.infcomp.flatbuffers.normal.NormalClj 0x5dc04cce \"anglican.infcomp.flatbuffers.normal.NormalClj@5dc04cce\"]"}],"value":"[:distribution #object[anglican.infcomp.flatbuffers.normal.NormalClj 0x5dc04cce \"anglican.infcomp.flatbuffers.normal.NormalClj@5dc04cce\"]]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:value</span>","value":":value"},{"type":"html","content":"<span class='clj-double'>-0.04207217735247731</span>","value":"-0.04207217735247731"}],"value":"[:value -0.04207217735247731]"}],"value":"{:time-index 7, :sample-address \"S61\", :sample-instance 3, :distribution #object[anglican.infcomp.flatbuffers.normal.NormalClj 0x5dc04cce \"anglican.infcomp.flatbuffers.normal.NormalClj@5dc04cce\"], :value -0.04207217735247731}"},{"type":"list-like","open":"<span class='clj-map'>{</span>","close":"<span class='clj-map'>}</span>","separator":", ","items":[{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:time-index</span>","value":":time-index"},{"type":"html","content":"<span class='clj-unkown'>8</span>","value":"8"}],"value":"[:time-index 8]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-address</span>","value":":sample-address"},{"type":"html","content":"<span class='clj-string'>&quot;S65&quot;</span>","value":"\"S65\""}],"value":"[:sample-address \"S65\"]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-instance</span>","value":":sample-instance"},{"type":"html","content":"<span class='clj-unkown'>4</span>","value":"4"}],"value":"[:sample-instance 4]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:distribution</span>","value":":distribution"},{"type":"html","content":"<span class='clj-unkown'>#object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x2f0e9fba &quot;anglican.infcomp.flatbuffers.gamma.GammaClj@2f0e9fba&quot;]</span>","value":"#object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x2f0e9fba \"anglican.infcomp.flatbuffers.gamma.GammaClj@2f0e9fba\"]"}],"value":"[:distribution #object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x2f0e9fba \"anglican.infcomp.flatbuffers.gamma.GammaClj@2f0e9fba\"]]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:value</span>","value":":value"},{"type":"html","content":"<span class='clj-double'>8.633091890679685</span>","value":"8.633091890679685"}],"value":"[:value 8.633091890679685]"}],"value":"{:time-index 8, :sample-address \"S65\", :sample-instance 4, :distribution #object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x2f0e9fba \"anglican.infcomp.flatbuffers.gamma.GammaClj@2f0e9fba\"], :value 8.633091890679685}"},{"type":"list-like","open":"<span class='clj-map'>{</span>","close":"<span class='clj-map'>}</span>","separator":", ","items":[{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:time-index</span>","value":":time-index"},{"type":"html","content":"<span class='clj-unkown'>9</span>","value":"9"}],"value":"[:time-index 9]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-address</span>","value":":sample-address"},{"type":"html","content":"<span class='clj-string'>&quot;S61&quot;</span>","value":"\"S61\""}],"value":"[:sample-address \"S61\"]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-instance</span>","value":":sample-instance"},{"type":"html","content":"<span class='clj-unkown'>4</span>","value":"4"}],"value":"[:sample-instance 4]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:distribution</span>","value":":distribution"},{"type":"html","content":"<span class='clj-unkown'>#object[anglican.infcomp.flatbuffers.normal.NormalClj 0x488402a3 &quot;anglican.infcomp.flatbuffers.normal.NormalClj@488402a3&quot;]</span>","value":"#object[anglican.infcomp.flatbuffers.normal.NormalClj 0x488402a3 \"anglican.infcomp.flatbuffers.normal.NormalClj@488402a3\"]"}],"value":"[:distribution #object[anglican.infcomp.flatbuffers.normal.NormalClj 0x488402a3 \"anglican.infcomp.flatbuffers.normal.NormalClj@488402a3\"]]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:value</span>","value":":value"},{"type":"html","content":"<span class='clj-double'>0.9645215115130794</span>","value":"0.9645215115130794"}],"value":"[:value 0.9645215115130794]"}],"value":"{:time-index 9, :sample-address \"S61\", :sample-instance 4, :distribution #object[anglican.infcomp.flatbuffers.normal.NormalClj 0x488402a3 \"anglican.infcomp.flatbuffers.normal.NormalClj@488402a3\"], :value 0.9645215115130794}"},{"type":"list-like","open":"<span class='clj-map'>{</span>","close":"<span class='clj-map'>}</span>","separator":", ","items":[{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:time-index</span>","value":":time-index"},{"type":"html","content":"<span class='clj-unkown'>10</span>","value":"10"}],"value":"[:time-index 10]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-address</span>","value":":sample-address"},{"type":"html","content":"<span class='clj-string'>&quot;S65&quot;</span>","value":"\"S65\""}],"value":"[:sample-address \"S65\"]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-instance</span>","value":":sample-instance"},{"type":"html","content":"<span class='clj-unkown'>5</span>","value":"5"}],"value":"[:sample-instance 5]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:distribution</span>","value":":distribution"},{"type":"html","content":"<span class='clj-unkown'>#object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x8e44f9b &quot;anglican.infcomp.flatbuffers.gamma.GammaClj@8e44f9b&quot;]</span>","value":"#object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x8e44f9b \"anglican.infcomp.flatbuffers.gamma.GammaClj@8e44f9b\"]"}],"value":"[:distribution #object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x8e44f9b \"anglican.infcomp.flatbuffers.gamma.GammaClj@8e44f9b\"]]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:value</span>","value":":value"},{"type":"html","content":"<span class='clj-double'>24.19496878216539</span>","value":"24.19496878216539"}],"value":"[:value 24.19496878216539]"}],"value":"{:time-index 10, :sample-address \"S65\", :sample-instance 5, :distribution #object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x8e44f9b \"anglican.infcomp.flatbuffers.gamma.GammaClj@8e44f9b\"], :value 24.19496878216539}"},{"type":"list-like","open":"<span class='clj-map'>{</span>","close":"<span class='clj-map'>}</span>","separator":", ","items":[{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:time-index</span>","value":":time-index"},{"type":"html","content":"<span class='clj-unkown'>11</span>","value":"11"}],"value":"[:time-index 11]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-address</span>","value":":sample-address"},{"type":"html","content":"<span class='clj-string'>&quot;S61&quot;</span>","value":"\"S61\""}],"value":"[:sample-address \"S61\"]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-instance</span>","value":":sample-instance"},{"type":"html","content":"<span class='clj-unkown'>5</span>","value":"5"}],"value":"[:sample-instance 5]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:distribution</span>","value":":distribution"},{"type":"html","content":"<span class='clj-unkown'>#object[anglican.infcomp.flatbuffers.normal.NormalClj 0x579dd475 &quot;anglican.infcomp.flatbuffers.normal.NormalClj@579dd475&quot;]</span>","value":"#object[anglican.infcomp.flatbuffers.normal.NormalClj 0x579dd475 \"anglican.infcomp.flatbuffers.normal.NormalClj@579dd475\"]"}],"value":"[:distribution #object[anglican.infcomp.flatbuffers.normal.NormalClj 0x579dd475 \"anglican.infcomp.flatbuffers.normal.NormalClj@579dd475\"]]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:value</span>","value":":value"},{"type":"html","content":"<span class='clj-double'>1.3423959685903382</span>","value":"1.3423959685903382"}],"value":"[:value 1.3423959685903382]"}],"value":"{:time-index 11, :sample-address \"S61\", :sample-instance 5, :distribution #object[anglican.infcomp.flatbuffers.normal.NormalClj 0x579dd475 \"anglican.infcomp.flatbuffers.normal.NormalClj@579dd475\"], :value 1.3423959685903382}"},{"type":"list-like","open":"<span class='clj-map'>{</span>","close":"<span class='clj-map'>}</span>","separator":", ","items":[{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:time-index</span>","value":":time-index"},{"type":"html","content":"<span class='clj-unkown'>12</span>","value":"12"}],"value":"[:time-index 12]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-address</span>","value":":sample-address"},{"type":"html","content":"<span class='clj-string'>&quot;S46&quot;</span>","value":"\"S46\""}],"value":"[:sample-address \"S46\"]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:sample-instance</span>","value":":sample-instance"},{"type":"html","content":"<span class='clj-unkown'>0</span>","value":"0"}],"value":"[:sample-instance 0]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:distribution</span>","value":":distribution"},{"type":"html","content":"<span class='clj-unkown'>#object[anglican.infcomp.flatbuffers.normal.NormalClj 0xc357273 &quot;anglican.infcomp.flatbuffers.normal.NormalClj@c357273&quot;]</span>","value":"#object[anglican.infcomp.flatbuffers.normal.NormalClj 0xc357273 \"anglican.infcomp.flatbuffers.normal.NormalClj@c357273\"]"}],"value":"[:distribution #object[anglican.infcomp.flatbuffers.normal.NormalClj 0xc357273 \"anglican.infcomp.flatbuffers.normal.NormalClj@c357273\"]]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:value</span>","value":":value"},{"type":"html","content":"<span class='clj-double'>1.4112123648126922</span>","value":"1.4112123648126922"}],"value":"[:value 1.4112123648126922]"}],"value":"{:time-index 12, :sample-address \"S46\", :sample-instance 0, :distribution #object[anglican.infcomp.flatbuffers.normal.NormalClj 0xc357273 \"anglican.infcomp.flatbuffers.normal.NormalClj@c357273\"], :value 1.4112123648126922}"}],"value":"[{:time-index 0, :sample-address \"S65\", :sample-instance 0, :distribution #object[anglican.infcomp.flatbuffers.gamma.GammaClj 0xdb12dd2 \"anglican.infcomp.flatbuffers.gamma.GammaClj@db12dd2\"], :value 0.8476691787003959} {:time-index 1, :sample-address \"S61\", :sample-instance 0, :distribution #object[anglican.infcomp.flatbuffers.normal.NormalClj 0x1ad94224 \"anglican.infcomp.flatbuffers.normal.NormalClj@1ad94224\"], :value -2.1580974054483963} {:time-index 2, :sample-address \"S65\", :sample-instance 1, :distribution #object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x58bc6089 \"anglican.infcomp.flatbuffers.gamma.GammaClj@58bc6089\"], :value 9.707467147495931} {:time-index 3, :sample-address \"S61\", :sample-instance 1, :distribution #object[anglican.infcomp.flatbuffers.normal.NormalClj 0x1f4655bf \"anglican.infcomp.flatbuffers.normal.NormalClj@1f4655bf\"], :value 3.1349892904629906} {:time-index 4, :sample-address \"S65\", :sample-instance 2, :distribution #object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x1b9d3438 \"anglican.infcomp.flatbuffers.gamma.GammaClj@1b9d3438\"], :value 0.4043576392769158} {:time-index 5, :sample-address \"S61\", :sample-instance 2, :distribution #object[anglican.infcomp.flatbuffers.normal.NormalClj 0x4b859d0d \"anglican.infcomp.flatbuffers.normal.NormalClj@4b859d0d\"], :value 10.084456609898497} {:time-index 6, :sample-address \"S65\", :sample-instance 3, :distribution #object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x700614dc \"anglican.infcomp.flatbuffers.gamma.GammaClj@700614dc\"], :value 5.509213129856523} {:time-index 7, :sample-address \"S61\", :sample-instance 3, :distribution #object[anglican.infcomp.flatbuffers.normal.NormalClj 0x5dc04cce \"anglican.infcomp.flatbuffers.normal.NormalClj@5dc04cce\"], :value -0.04207217735247731} {:time-index 8, :sample-address \"S65\", :sample-instance 4, :distribution #object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x2f0e9fba \"anglican.infcomp.flatbuffers.gamma.GammaClj@2f0e9fba\"], :value 8.633091890679685} {:time-index 9, :sample-address \"S61\", :sample-instance 4, :distribution #object[anglican.infcomp.flatbuffers.normal.NormalClj 0x488402a3 \"anglican.infcomp.flatbuffers.normal.NormalClj@488402a3\"], :value 0.9645215115130794} {:time-index 10, :sample-address \"S65\", :sample-instance 5, :distribution #object[anglican.infcomp.flatbuffers.gamma.GammaClj 0x8e44f9b \"anglican.infcomp.flatbuffers.gamma.GammaClj@8e44f9b\"], :value 24.19496878216539} {:time-index 11, :sample-address \"S61\", :sample-instance 5, :distribution #object[anglican.infcomp.flatbuffers.normal.NormalClj 0x579dd475 \"anglican.infcomp.flatbuffers.normal.NormalClj@579dd475\"], :value 1.3423959685903382} {:time-index 12, :sample-address \"S46\", :sample-instance 0, :distribution #object[anglican.infcomp.flatbuffers.normal.NormalClj 0xc357273 \"anglican.infcomp.flatbuffers.normal.NormalClj@c357273\"], :value 1.4112123648126922}]"}
;; <=

;; @@
(defn combine-observes-fn [observes]
  (map :value observes))
;; @@
;; =>
;;; {"type":"html","content":"<span class='clj-var'>#&#x27;worksheets.dirichlet-process-mixture-stick-breaking/combine-observes-fn</span>","value":"#'worksheets.dirichlet-process-mixture-stick-breaking/combine-observes-fn"}
;; <=

;; @@

(defquery dirichlet-process-mixture-stick-breaking
  [input-data]
  (let
    [concentration 1.72
     base (fn []
            (let [v (/ 1.0 (sample (gamma 1 10)))]
              (list (sample (normal 0 (sqrt (* v 10)))) 
                    (sqrt v))))
     obs-param (DPmem concentration base)]

