fixed NUTSTest
@@ -3,7 +3,8 @@ package io.improbable.keanu.algorithms.mcmc.nuts;
import io.improbable.keanu.algorithms.NetworkSamples;
import io.improbable.keanu.algorithms.Statistics;
import io.improbable.keanu.algorithms.mcmc.MCMCTestDistributions;
-import io.improbable.keanu.algorithms.variational.optimizer.KeanuProbabilisticGraph;
+import io.improbable.keanu.algorithms.variational.optimizer.KeanuProbabilisticWithGradientGraph;
+import io.improbable.keanu.algorithms.variational.optimizer.ProbabilisticWithGradientGraph;
import io.improbable.keanu.network.BayesianNetwork;
import io.improbable.keanu.tensor.dbl.DoubleTensor;
import io.improbable.keanu.testcategory.Slow;
@@ -44,7 +45,7 @@ public class NUTSTest {
double initStepSize = 1;
int maxTreeHeight = 4;
BayesianNetwork simpleGaussian = MCMCTestDistributions.createSimpleGaussian(mu, sigma, 3, random);
- KeanuProbabilisticGraph graph = new KeanuProbabilisticGraph(simpleGaussian);
+ ProbabilisticWithGradientGraph graph = new KeanuProbabilisticWithGradientGraph(simpleGaussian);
NUTS nuts = NUTS.builder()
.adaptEnabled(false)
@@ -79,7 +80,7 @@ public class NUTSTest {
double mu = 0.0;
double sigma = 1.0;
BayesianNetwork simpleGaussian = MCMCTestDistributions.createSimpleGaussian(mu, sigma, 3, random);
- KeanuProbabilisticGraph graph = new KeanuProbabilisticGraph(simpleGaussian);
+ ProbabilisticWithGradientGraph graph = new KeanuProbabilisticWithGradientGraph(simpleGaussian);
NUTS nuts = NUTS.builder()
.adaptCount(2000)
@@ -102,7 +103,7 @@ public class NUTSTest {
public void samplesContinuousPrior() {
BayesianNetwork bayesNet = MCMCTestDistributions.createSumOfGaussianDistribution(20.0, 1.0, 46., 18.0);
- KeanuProbabilisticGraph graph = new KeanuProbabilisticGraph(bayesNet);
+ ProbabilisticWithGradientGraph graph = new KeanuProbabilisticWithGradientGraph(bayesNet);
int sampleCount = 2000;
NUTS nuts = NUTS.builder()
@@ -128,7 +129,7 @@ public class NUTSTest {
@Test
public void samplesFromDonut() {
BayesianNetwork donutBayesNet = MCMCTestDistributions.create2DDonutDistribution();
- KeanuProbabilisticGraph graph = new KeanuProbabilisticGraph(donutBayesNet);
+ ProbabilisticWithGradientGraph graph = new KeanuProbabilisticWithGradientGraph(donutBayesNet);
NUTS nuts = NUTS.builder()
.adaptCount(1000)
@@ -152,7 +153,7 @@ public class NUTSTest {
GaussianVertex A = new GaussianVertex(0.0, 1.0);
BayesianNetwork net = new BayesianNetwork(A.getConnectedGraph());
- KeanuProbabilisticGraph graph = new KeanuProbabilisticGraph(net);
+ ProbabilisticWithGradientGraph graph = new KeanuProbabilisticWithGradientGraph(net);
net.probeForNonZeroProbability(100, random);
NUTS nuts = NUTS.builder()
