System.out.println("Single datapoint example!"); ExponentialState expState = new ExponentialState(); expState.mean.set(new DoubleState(0.0)); expState.datum.set(new DoubleState(10.0)); /* */ RandomSource randomSource = Distributions.randomSource(); /* */ ExponentialDistribution ed = Distributions.defaultFactory().exponentialWithRate(randomSource); ScalarContinuousRateDensity scrd = new ScalarContinuousRateDensity(ed); LetKernel muLetKernel = new LetKernel(new Path().add(new KeyPathElement(expState.mean))); DoubleDriftKernel muKernel = new DoubleDriftKernel(0.1); muLetKernel.subkernel.set(muKernel); // Configure the inference engine and sample SDK sdk = new SDK(expState, scrd, muLetKernel); int NUMSAMPLES = 100; Walk engine = new Walk(sdk, Distributions.randomSource(), new WalkControllerFixedLengthRun(NUMSAMPLES)); engine.getSDK().declareQuery( new PeriodicQuery( new LogDensityReportingQuery(), 1)); engine.go();