@Test public void test() throws Exception { SVBByBatchExample.main(null); }
public static void main(String[] args) throws Exception { DataStream<DataInstance> data = DataStreamLoader.open("datasets/simulated/WasteIncineratorSample.arff"); SVB parameterLearningAlgorithm = new SVB(); parameterLearningAlgorithm.setDAG(DAGGenerator.getHiddenNaiveBayesStructure(data.getAttributes(),"H",2)); parameterLearningAlgorithm.setWindowsSize(100); parameterLearningAlgorithm.setOutput(true); parameterLearningAlgorithm.initLearning(); for (DataOnMemory<DataInstance> batch : data.iterableOverBatches(100)){ double log_likelhood_of_batch = parameterLearningAlgorithm.updateModel(batch); System.out.println("Log-Likelihood of Batch: "+ log_likelhood_of_batch); } BayesianNetwork bnModel = parameterLearningAlgorithm.getLearntBayesianNetwork(); System.out.println(bnModel.toString()); }
SVBByBatchExample { public static void main(String[] args) throws Exception { DataStream<DataInstance> data = DataStreamLoader.open("datasets/simulated/WasteIncineratorSample.arff"); SVB parameterLearningAlgorithm = new SVB(); parameterLearningAlgorithm.setDAG(DAGGenerator.getHiddenNaiveBayesStructure(data.getAttributes(),"H",2)); parameterLearningAlgorithm.setWindowsSize(100); parameterLearningAlgorithm.setOutput(true); parameterLearningAlgorithm.initLearning(); for (DataOnMemory<DataInstance> batch : data.iterableOverBatches(100)){ double log_likelhood_of_batch = parameterLearningAlgorithm.updateModel(batch); System.out.println("Log-Likelihood of Batch: "+ log_likelhood_of_batch); } BayesianNetwork bnModel = parameterLearningAlgorithm.getLearntBayesianNetwork(); System.out.println(bnModel.toString()); } }
SVBByBatchExample { public static void main(String[] args) throws Exception { DataStream<DataInstance> data = DataStreamLoader.open("datasets/simulated/WasteIncineratorSample.arff"); SVB parameterLearningAlgorithm = new SVB(); parameterLearningAlgorithm.setDAG(DAGGenerator.getHiddenNaiveBayesStructure(data.getAttributes(),"H",2)); parameterLearningAlgorithm.setWindowsSize(100); parameterLearningAlgorithm.setOutput(true); parameterLearningAlgorithm.initLearning(); for (DataOnMemory<DataInstance> batch : data.iterableOverBatches(100)){ double log_likelhood_of_batch = parameterLearningAlgorithm.updateModel(batch); System.out.println("Log-Likelihood of Batch: "+ log_likelhood_of_batch); } BayesianNetwork bnModel = parameterLearningAlgorithm.getLearntBayesianNetwork(); System.out.println(bnModel.toString()); }  }
SVBByBatchExample { public static void main(String[] args) throws Exception { DataStream<DataInstance> data = DataStreamLoader.open("datasets/simulated/WasteIncineratorSample.arff"); SVB parameterLearningAlgorithm = new SVB(); parameterLearningAlgorithm.setDAG(DAGGenerator.getHiddenNaiveBayesStructure(data.getAttributes(),"H",2)); parameterLearningAlgorithm.setWindowsSize(100); parameterLearningAlgorithm.setOutput(true); parameterLearningAlgorithm.initLearning(); for (DataOnMemory<DataInstance> batch : data.iterableOverBatches(100)){ double log_likelhood_of_batch = parameterLearningAlgorithm.updateModel(batch); System.out.println("Log-Likelihood of Batch: "+ log_likelhood_of_batch); } BayesianNetwork bnModel = parameterLearningAlgorithm.getLearntBayesianNetwork(); System.out.println(bnModel.toString()); }  static void main(String[] args); }
SVBByBatchExample { public static void main(String[] args) throws Exception { DataStream<DataInstance> data = DataStreamLoader.open("datasets/simulated/WasteIncineratorSample.arff"); SVB parameterLearningAlgorithm = new SVB(); parameterLearningAlgorithm.setDAG(DAGGenerator.getHiddenNaiveBayesStructure(data.getAttributes(),"H",2)); parameterLearningAlgorithm.setWindowsSize(100); parameterLearningAlgorithm.setOutput(true); parameterLearningAlgorithm.initLearning(); for (DataOnMemory<DataInstance> batch : data.iterableOverBatches(100)){ double log_likelhood_of_batch = parameterLearningAlgorithm.updateModel(batch); System.out.println("Log-Likelihood of Batch: "+ log_likelhood_of_batch); } BayesianNetwork bnModel = parameterLearningAlgorithm.getLearntBayesianNetwork(); System.out.println(bnModel.toString()); }  static void main(String[] args);  }