@Test public void test() throws Exception { LatentModelsFlink.main(null); }
public static void main(String[] args) throws FileNotFoundException { boolean hadoop_cluster = false; if (args.length>1){ hadoop_cluster = Boolean.parseBoolean(args[0]); } final ExecutionEnvironment env; if(hadoop_cluster){ env = ExecutionEnvironment.getExecutionEnvironment(); env.getConfig().disableSysoutLogging(); }else{ Configuration conf = new Configuration(); conf.setInteger("taskmanager.network.numberOfBuffers", 12000); conf.setInteger("taskmanager.numberOfTaskSlots",Main.PARALLELISM); env = ExecutionEnvironment.createLocalEnvironment(conf); env.setParallelism(Main.PARALLELISM); env.getConfig().disableSysoutLogging(); } String filename = "datasets/simulated/exampleDS_d0_c5.arff"; DataFlink<DataInstance> data = DataFlinkLoader.loadDataFromFile(env, filename, false); Model model = new FactorAnalysis(data.getAttributes()); ((FactorAnalysis)model).setNumberOfLatentVariables(3); model.updateModel(data); BayesianNetwork bn = model.getModel(); System.out.println(bn); }
LatentModelsFlink { public static void main(String[] args) throws FileNotFoundException { boolean hadoop_cluster = false; if (args.length>1){ hadoop_cluster = Boolean.parseBoolean(args[0]); } final ExecutionEnvironment env; if(hadoop_cluster){ env = ExecutionEnvironment.getExecutionEnvironment(); env.getConfig().disableSysoutLogging(); }else{ Configuration conf = new Configuration(); conf.setInteger("taskmanager.network.numberOfBuffers", 12000); conf.setInteger("taskmanager.numberOfTaskSlots",Main.PARALLELISM); env = ExecutionEnvironment.createLocalEnvironment(conf); env.setParallelism(Main.PARALLELISM); env.getConfig().disableSysoutLogging(); } String filename = "datasets/simulated/exampleDS_d0_c5.arff"; DataFlink<DataInstance> data = DataFlinkLoader.loadDataFromFile(env, filename, false); Model model = new FactorAnalysis(data.getAttributes()); ((FactorAnalysis)model).setNumberOfLatentVariables(3); model.updateModel(data); BayesianNetwork bn = model.getModel(); System.out.println(bn); } }
LatentModelsFlink { public static void main(String[] args) throws FileNotFoundException { boolean hadoop_cluster = false; if (args.length>1){ hadoop_cluster = Boolean.parseBoolean(args[0]); } final ExecutionEnvironment env; if(hadoop_cluster){ env = ExecutionEnvironment.getExecutionEnvironment(); env.getConfig().disableSysoutLogging(); }else{ Configuration conf = new Configuration(); conf.setInteger("taskmanager.network.numberOfBuffers", 12000); conf.setInteger("taskmanager.numberOfTaskSlots",Main.PARALLELISM); env = ExecutionEnvironment.createLocalEnvironment(conf); env.setParallelism(Main.PARALLELISM); env.getConfig().disableSysoutLogging(); } String filename = "datasets/simulated/exampleDS_d0_c5.arff"; DataFlink<DataInstance> data = DataFlinkLoader.loadDataFromFile(env, filename, false); Model model = new FactorAnalysis(data.getAttributes()); ((FactorAnalysis)model).setNumberOfLatentVariables(3); model.updateModel(data); BayesianNetwork bn = model.getModel(); System.out.println(bn); }  }
LatentModelsFlink { public static void main(String[] args) throws FileNotFoundException { boolean hadoop_cluster = false; if (args.length>1){ hadoop_cluster = Boolean.parseBoolean(args[0]); } final ExecutionEnvironment env; if(hadoop_cluster){ env = ExecutionEnvironment.getExecutionEnvironment(); env.getConfig().disableSysoutLogging(); }else{ Configuration conf = new Configuration(); conf.setInteger("taskmanager.network.numberOfBuffers", 12000); conf.setInteger("taskmanager.numberOfTaskSlots",Main.PARALLELISM); env = ExecutionEnvironment.createLocalEnvironment(conf); env.setParallelism(Main.PARALLELISM); env.getConfig().disableSysoutLogging(); } String filename = "datasets/simulated/exampleDS_d0_c5.arff"; DataFlink<DataInstance> data = DataFlinkLoader.loadDataFromFile(env, filename, false); Model model = new FactorAnalysis(data.getAttributes()); ((FactorAnalysis)model).setNumberOfLatentVariables(3); model.updateModel(data); BayesianNetwork bn = model.getModel(); System.out.println(bn); }  static void main(String[] args); }
LatentModelsFlink { public static void main(String[] args) throws FileNotFoundException { boolean hadoop_cluster = false; if (args.length>1){ hadoop_cluster = Boolean.parseBoolean(args[0]); } final ExecutionEnvironment env; if(hadoop_cluster){ env = ExecutionEnvironment.getExecutionEnvironment(); env.getConfig().disableSysoutLogging(); }else{ Configuration conf = new Configuration(); conf.setInteger("taskmanager.network.numberOfBuffers", 12000); conf.setInteger("taskmanager.numberOfTaskSlots",Main.PARALLELISM); env = ExecutionEnvironment.createLocalEnvironment(conf); env.setParallelism(Main.PARALLELISM); env.getConfig().disableSysoutLogging(); } String filename = "datasets/simulated/exampleDS_d0_c5.arff"; DataFlink<DataInstance> data = DataFlinkLoader.loadDataFromFile(env, filename, false); Model model = new FactorAnalysis(data.getAttributes()); ((FactorAnalysis)model).setNumberOfLatentVariables(3); model.updateModel(data); BayesianNetwork bn = model.getModel(); System.out.println(bn); }  static void main(String[] args);  }