BatchDawidSkene extends AbstractDawidSkene { @Override public void compute(){ estimate(epsilon, iterations); } BatchDawidSkene(); @Override void compute(); void estimate(double epsilon, int maxIterations);  }
@Test public final void testMissclassificationCost() { LObject<String> obj = new LObject<String>("object1"); project.getData().addObject(obj); DecisionEngine de = new DecisionEngine(LabelProbabilityDistributionCostCalculators.get(""), null); try{ de.estimateMissclassificationCost(project, obj); fail("trying to get estimated value for not computed object"); } catch(Exception ex){ } project.getAlgorithm().compute(); assertEquals( 1. / project.getData().getCategories().size(), de.estimateMissclassificationCost(project, obj), 1e-10); try{ de.estimateMissclassificationCost(project, new LObject<String>("testObj")); fail("trying to get estimated value for non existions object"); } catch(Exception e){ } }