From 96537a7daff160b558ee3a0ff612ab76b1e3703d Mon Sep 17 00:00:00 2001 From: Mike Reposa Date: Fri, 9 Jan 2015 11:40:50 -0500 Subject: [PATCH] Removed duplicate test --- .../atomic/continuous/ContinuousTest.scala | 42 ------------------- 1 file changed, 42 deletions(-) diff --git a/Figaro/src/test/scala/com/cra/figaro/test/library/atomic/continuous/ContinuousTest.scala b/Figaro/src/test/scala/com/cra/figaro/test/library/atomic/continuous/ContinuousTest.scala index 2c0832c3..bf29192e 100644 --- a/Figaro/src/test/scala/com/cra/figaro/test/library/atomic/continuous/ContinuousTest.scala +++ b/Figaro/src/test/scala/com/cra/figaro/test/library/atomic/continuous/ContinuousTest.scala @@ -743,26 +743,6 @@ class ContinuousTest extends WordSpec with Matchers { alg.stop() alg.kill } - - "produce the right probability when conditioned under Importance Sampling" in { - val sampleUniverse = Universe.createNew() - val nSamples = Beta(2, 5)("", sampleUniverse) - val samples = for (i <- 1 to 100) - yield nSamples.generateValue(nSamples.generateRandomness()) - - val universe = Universe.createNew() - val a = Uniform(0, 10)("a", universe) - val b = Uniform(0, 10)("b", universe) - for (sample <- samples) { - val beta = Beta(a, b) - beta.observe(sample) - } - val alg = Importance(200000, a, b) - alg.start() - alg.mean(a) should be(2.0 +- 0.5) - alg.mean(b) should be(5.0 +- 0.5) - } - } // We can test Dirichlets using the special case where alpha.length = 2 @@ -906,27 +886,5 @@ class ContinuousTest extends WordSpec with Matchers { alg.stop() alg.kill } - - "produce the right probability when conditioned under Importance Sampling" in { - val sampleUniverse = Universe.createNew() - val nSamples = Dirichlet(1, 2, 3)("", sampleUniverse) - val samples = for (i <- 1 to 100) - yield nSamples.generateValue(nSamples.generateRandomness()) - - val universe = Universe.createNew() - val alpha1 = Uniform(0, 10)("a1", universe) - val alpha2 = Uniform(0, 10)("a2", universe) - val alpha3 = Uniform(0, 10)("a3", universe) - for (sample <- samples) { - val dirichlet = Dirichlet(alpha1, alpha2, alpha3) - dirichlet.observe(sample) - } - val alg = Importance(200000, alpha1, alpha2, alpha3) - alg.start() - alg.mean(alpha1) should be(1.0 +- 0.5) - alg.mean(alpha2) should be(2.0 +- 0.5) - alg.mean(alpha3) should be(3.0 +- 0.5) - } - } }