private String getNodeId(MissingValueStrategyType missingValueStrategy) throws Exception { ModelEvaluator<?> evaluator = createModelEvaluator(); TreeModel treeModel = (TreeModel) evaluator.getModel(); treeModel.setMissingValueStrategy(missingValueStrategy); Map<FieldName, ?> arguments = createArguments("outlook", "sunny", "temperature", null, "humidity", null); Map<FieldName, ?> result = evaluator.evaluate(arguments); return getEntityId(result.get(evaluator.getTargetField())); }
public static Map<FieldName, ? extends Classification> evaluateClassification( Classification value, ModelEvaluationContext context) { ModelEvaluator<?> evaluator = context.getModelEvaluator(); return evaluateClassification(evaluator.getTargetField(), value, context); }
public static Map<FieldName, ?> evaluateRegression(Double value, ModelEvaluationContext context) { ModelEvaluator<?> evaluator = context.getModelEvaluator(); return evaluateRegression(evaluator.getTargetField(), value, context); }