@Test public void evaluate() throws Exception { MiningModelEvaluator evaluator = (MiningModelEvaluator)createModelEvaluator(); MiningModelEvaluationContext context = new MiningModelEvaluationContext(evaluator); context.declare(FieldName.create("Age"), 35); Map<FieldName, ?> results = evaluator.evaluateInternal(context); Classification<?, ?> targetValue = (Classification<?, ?>)results.get(evaluator.getTargetName()); assertEquals("under 50", targetValue.getResult()); }
public SegmentResult getResult(String id){ return this.results.get(id); }
MiningModelEvaluationContext extends ModelEvaluationContext { public SegmentResult getResult(String id){ return this.results.get(id); } }
MiningModelEvaluationContext extends ModelEvaluationContext { public SegmentResult getResult(String id){ return this.results.get(id); } MiningModelEvaluationContext(MiningModelEvaluator miningModelEvaluator); }
MiningModelEvaluationContext extends ModelEvaluationContext { public SegmentResult getResult(String id){ return this.results.get(id); } MiningModelEvaluationContext(MiningModelEvaluator miningModelEvaluator); @Override void reset(boolean clearValues); @Override MiningModelEvaluator getModelEvaluator(); SegmentResult getResult(String id); OutputField getOutputField(FieldName name); DerivedField getLocalDerivedField(FieldName name); }
MiningModelEvaluationContext extends ModelEvaluationContext { public SegmentResult getResult(String id){ return this.results.get(id); } MiningModelEvaluationContext(MiningModelEvaluator miningModelEvaluator); @Override void reset(boolean clearValues); @Override MiningModelEvaluator getModelEvaluator(); SegmentResult getResult(String id); OutputField getOutputField(FieldName name); DerivedField getLocalDerivedField(FieldName name);  }