Commit c3ae50e4 authored by Romain Reuillon's avatar Romain Reuillon
Browse files

Merge branch 'fixabc' into 'master'

Fix IslandABC

See merge request openmole/openmole!9
parents 6d025b9d aea9c60b
......@@ -37,7 +37,13 @@ object ABCHook {
s.weights zip
s.thetas).map {
case ((((((epsilon, pAcc), t), ti), rhoi), wi), thetai)
epsilon.toString ++ "," ++ pAcc.toString ++ "," ++ t.toString ++ "," ++ ti.toString ++ "," ++ rhoi.toString ++ "," ++ wi.toString ++ "," ++ thetai.mkString(",")
epsilon.formatted("%.12f") ++ "," ++
pAcc.formatted("%.12f") ++ "," ++
t.formatted("%d") ++ "," ++
ti.formatted("%d") ++ "," ++
rhoi.formatted("%.12f") ++ "," ++
wi.formatted("%.12f") ++ "," ++
thetai.map { _.formatted("%.12f") }.mkString(",")
}.mkString("\n")
file.createParentDir
......
......@@ -12,7 +12,7 @@ object AppendSplitTask {
import p._
val newState = MonAPMC.append(nAlpha, context(masterState), context(islandState))
val (ns1, ns2) = MonAPMC.split(newState)
context + (islandState.array -> Array(ns1)) + (masterState -> ns2) + (step -> (context(step) + 1))
context + (masterState -> ns1) + (islandState.array -> Array(ns2)) + (step -> (context(step) + 1))
} set (
(inputs, outputs) += (masterState, step),
inputs += islandState,
......
......@@ -96,13 +96,12 @@ package object abc {
import ABC._
def IslandABC(
evaluation: DSL,
prior: Seq[Prior],
observed: Seq[Observed[_]],
sample: Int,
generated: Int,
parallelism: Int,
//islandGenerated: Int = 1,
evaluation: DSL,
prior: Seq[Prior],
observed: Seq[Observed[_]],
sample: Int,
generated: Int,
parallelism: Int,
minAcceptedRatio: Double = 0.01,
stopSampleSizeFactor: Int = 1,
maxStep: OptionalArgument[Int] = None,
......
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