@Test public void test() throws Exception { try { ParallelTANExample.main(null); }catch (UnsatisfiedLinkError error) { error.printStackTrace(); } }
public static void main(String[] args) throws Exception { int sampleSize = 10000; BayesianNetwork bn = BayesianNetworkLoader.loadFromFile("networks/simulated/asia.bn"); System.out.println(bn); BayesianNetworkSampler sampler = new BayesianNetworkSampler(bn); DataStream<DataInstance> data = sampler.sampleToDataStream(sampleSize); ParallelTAN tan = new ParallelTAN(); tan.setNumCores(4); tan.setNumSamplesOnMemory(1000); tan.setNameRoot("X"); tan.setNameTarget("E"); BayesianNetwork model = tan.learn(data); System.out.println(model.toString()); }
ParallelTANExample { public static void main(String[] args) throws Exception { int sampleSize = 10000; BayesianNetwork bn = BayesianNetworkLoader.loadFromFile("networks/simulated/asia.bn"); System.out.println(bn); BayesianNetworkSampler sampler = new BayesianNetworkSampler(bn); DataStream<DataInstance> data = sampler.sampleToDataStream(sampleSize); ParallelTAN tan = new ParallelTAN(); tan.setNumCores(4); tan.setNumSamplesOnMemory(1000); tan.setNameRoot("X"); tan.setNameTarget("E"); BayesianNetwork model = tan.learn(data); System.out.println(model.toString()); } }
ParallelTANExample { public static void main(String[] args) throws Exception { int sampleSize = 10000; BayesianNetwork bn = BayesianNetworkLoader.loadFromFile("networks/simulated/asia.bn"); System.out.println(bn); BayesianNetworkSampler sampler = new BayesianNetworkSampler(bn); DataStream<DataInstance> data = sampler.sampleToDataStream(sampleSize); ParallelTAN tan = new ParallelTAN(); tan.setNumCores(4); tan.setNumSamplesOnMemory(1000); tan.setNameRoot("X"); tan.setNameTarget("E"); BayesianNetwork model = tan.learn(data); System.out.println(model.toString()); }  }
ParallelTANExample { public static void main(String[] args) throws Exception { int sampleSize = 10000; BayesianNetwork bn = BayesianNetworkLoader.loadFromFile("networks/simulated/asia.bn"); System.out.println(bn); BayesianNetworkSampler sampler = new BayesianNetworkSampler(bn); DataStream<DataInstance> data = sampler.sampleToDataStream(sampleSize); ParallelTAN tan = new ParallelTAN(); tan.setNumCores(4); tan.setNumSamplesOnMemory(1000); tan.setNameRoot("X"); tan.setNameTarget("E"); BayesianNetwork model = tan.learn(data); System.out.println(model.toString()); }  static void main(String[] args); }
ParallelTANExample { public static void main(String[] args) throws Exception { int sampleSize = 10000; BayesianNetwork bn = BayesianNetworkLoader.loadFromFile("networks/simulated/asia.bn"); System.out.println(bn); BayesianNetworkSampler sampler = new BayesianNetworkSampler(bn); DataStream<DataInstance> data = sampler.sampleToDataStream(sampleSize); ParallelTAN tan = new ParallelTAN(); tan.setNumCores(4); tan.setNumSamplesOnMemory(1000); tan.setNameRoot("X"); tan.setNameTarget("E"); BayesianNetwork model = tan.learn(data); System.out.println(model.toString()); }  static void main(String[] args);  }