@Test public void evaluateMissing() throws Exception { FieldName name = FieldName.create("x"); ModelEvaluator<?> evaluator = createModelEvaluator(MissingPredictionTest.class); ModelEvaluationContext context = evaluator.createEvaluationContext(); context.setArguments(Collections.emptyMap()); try { context.lookup(name); fail(); } catch(MissingValueException mve){ } assertEquals(FieldValues.MISSING_VALUE, context.evaluate(name)); assertEquals(Arrays.asList(FieldValues.MISSING_VALUE), context.evaluateAll(Arrays.asList(name))); }
public void setArguments(Map<FieldName, ?> arguments){ this.arguments = Objects.requireNonNull(arguments); }
ModelEvaluationContext extends EvaluationContext { public void setArguments(Map<FieldName, ?> arguments){ this.arguments = Objects.requireNonNull(arguments); } }
ModelEvaluationContext extends EvaluationContext { public void setArguments(Map<FieldName, ?> arguments){ this.arguments = Objects.requireNonNull(arguments); } ModelEvaluationContext(ModelEvaluator<?> modelEvaluator); }
ModelEvaluationContext extends EvaluationContext { public void setArguments(Map<FieldName, ?> arguments){ this.arguments = Objects.requireNonNull(arguments); } ModelEvaluationContext(ModelEvaluator<?> modelEvaluator); @Override void reset(boolean clearValues); ModelEvaluator<?> getModelEvaluator(); void setModelEvaluator(ModelEvaluator<?> modelEvaluator); MiningModelEvaluationContext getParent(); void setParent(MiningModelEvaluationContext parent); Map<FieldName, ?> getArguments(); void setArguments(Map<FieldName, ?> arguments); }
ModelEvaluationContext extends EvaluationContext { public void setArguments(Map<FieldName, ?> arguments){ this.arguments = Objects.requireNonNull(arguments); } ModelEvaluationContext(ModelEvaluator<?> modelEvaluator); @Override void reset(boolean clearValues); ModelEvaluator<?> getModelEvaluator(); void setModelEvaluator(ModelEvaluator<?> modelEvaluator); MiningModelEvaluationContext getParent(); void setParent(MiningModelEvaluationContext parent); Map<FieldName, ?> getArguments(); void setArguments(Map<FieldName, ?> arguments);  }