@Test public void testMaximumLikelihood() { logger.info("maximumLikelihood"); DataTable2D payoffMatrix = generatePayoffMatrix(); AssociativeArray eventProbabilities = generateEventProbabilities(); Map.Entry<Object, Object> expResult = new AbstractMap.SimpleEntry<>("A2", 600.0); Map.Entry<Object, Object> result = DecisionCriteria.maximumLikelihood(payoffMatrix, eventProbabilities); assertEquals(expResult, result); }
public static Map.Entry<Object, Object> maximumLikelihood(DataTable2D payoffMatrix, AssociativeArray eventProbabilities) { if(payoffMatrix.isValid()==false) { throw new IllegalArgumentException("The payoff matrix does not have a rectangular format."); } Map.Entry<Object, Object> eventEntry = MapMethods.selectMaxKeyValue(eventProbabilities); Object mostProbableEvent = eventEntry.getKey(); return MapMethods.selectMaxKeyValue(payoffMatrix.get(mostProbableEvent)); }
DecisionCriteria { public static Map.Entry<Object, Object> maximumLikelihood(DataTable2D payoffMatrix, AssociativeArray eventProbabilities) { if(payoffMatrix.isValid()==false) { throw new IllegalArgumentException("The payoff matrix does not have a rectangular format."); } Map.Entry<Object, Object> eventEntry = MapMethods.selectMaxKeyValue(eventProbabilities); Object mostProbableEvent = eventEntry.getKey(); return MapMethods.selectMaxKeyValue(payoffMatrix.get(mostProbableEvent)); } }
DecisionCriteria { public static Map.Entry<Object, Object> maximumLikelihood(DataTable2D payoffMatrix, AssociativeArray eventProbabilities) { if(payoffMatrix.isValid()==false) { throw new IllegalArgumentException("The payoff matrix does not have a rectangular format."); } Map.Entry<Object, Object> eventEntry = MapMethods.selectMaxKeyValue(eventProbabilities); Object mostProbableEvent = eventEntry.getKey(); return MapMethods.selectMaxKeyValue(payoffMatrix.get(mostProbableEvent)); }  }
DecisionCriteria { public static Map.Entry<Object, Object> maximumLikelihood(DataTable2D payoffMatrix, AssociativeArray eventProbabilities) { if(payoffMatrix.isValid()==false) { throw new IllegalArgumentException("The payoff matrix does not have a rectangular format."); } Map.Entry<Object, Object> eventEntry = MapMethods.selectMaxKeyValue(eventProbabilities); Object mostProbableEvent = eventEntry.getKey(); return MapMethods.selectMaxKeyValue(payoffMatrix.get(mostProbableEvent)); }  static Map.Entry<Object, Object> maxMin(DataTable2D payoffMatrix); static Map.Entry<Object, Object> maxMax(DataTable2D payoffMatrix); static Map.Entry<Object, Object> savage(DataTable2D payoffMatrix); static Map.Entry<Object, Object> laplace(DataTable2D payoffMatrix); static Map.Entry<Object, Object> hurwiczAlpha(DataTable2D payoffMatrix, double alpha); static Map.Entry<Object, Object> maximumLikelihood(DataTable2D payoffMatrix, AssociativeArray eventProbabilities); static Map.Entry<Object, Object> bayes(DataTable2D payoffMatrix, AssociativeArray eventProbabilities); }
DecisionCriteria { public static Map.Entry<Object, Object> maximumLikelihood(DataTable2D payoffMatrix, AssociativeArray eventProbabilities) { if(payoffMatrix.isValid()==false) { throw new IllegalArgumentException("The payoff matrix does not have a rectangular format."); } Map.Entry<Object, Object> eventEntry = MapMethods.selectMaxKeyValue(eventProbabilities); Object mostProbableEvent = eventEntry.getKey(); return MapMethods.selectMaxKeyValue(payoffMatrix.get(mostProbableEvent)); }  static Map.Entry<Object, Object> maxMin(DataTable2D payoffMatrix); static Map.Entry<Object, Object> maxMax(DataTable2D payoffMatrix); static Map.Entry<Object, Object> savage(DataTable2D payoffMatrix); static Map.Entry<Object, Object> laplace(DataTable2D payoffMatrix); static Map.Entry<Object, Object> hurwiczAlpha(DataTable2D payoffMatrix, double alpha); static Map.Entry<Object, Object> maximumLikelihood(DataTable2D payoffMatrix, AssociativeArray eventProbabilities); static Map.Entry<Object, Object> bayes(DataTable2D payoffMatrix, AssociativeArray eventProbabilities);  }