@Override public void exitTreeModel(TreeModel treeModel){ treeModel .setNoTrueChildStrategy(TreeModel.NoTrueChildStrategy.RETURN_LAST_PREDICTION) .setSplitCharacteristic(TreeModel.SplitCharacteristic.MULTI_SPLIT); }
private TreeModel configureTreeModel(TreeModel treeModel){ TreeModel.NoTrueChildStrategy noTrueChildStrategy = TreeModel.NoTrueChildStrategy.RETURN_LAST_PREDICTION; TreeModel.MissingValueStrategy missingValueStrategy; switch(this.useSurrogate){ case 0: missingValueStrategy = TreeModel.MissingValueStrategy.NULL_PREDICTION; // XXX break; case 1: missingValueStrategy = TreeModel.MissingValueStrategy.LAST_PREDICTION; break; case 2: missingValueStrategy = null; break; default: throw new IllegalArgumentException(); } treeModel .setNoTrueChildStrategy(noTrueChildStrategy) .setMissingValueStrategy(missingValueStrategy); return treeModel; }
@Override public void exitTreeModel(TreeModel treeModel){ treeModel .setMissingValueStrategy(TreeModel.MissingValueStrategy.NULL_PREDICTION) .setSplitCharacteristic(TreeModel.SplitCharacteristic.MULTI_SPLIT); switch(this.miningFunction){ case REGRESSION: treeModel.setNoTrueChildStrategy(TreeModel.NoTrueChildStrategy.RETURN_LAST_PREDICTION); break; case CLASSIFICATION: break; default: throw new IllegalArgumentException(); } this.miningFunction = null; }
@Override public void exitTreeModel(TreeModel treeModel){ treeModel .setMissingValueStrategy(TreeModel.MissingValueStrategy.NONE) .setNoTrueChildStrategy(TreeModel.NoTrueChildStrategy.RETURN_LAST_PREDICTION) .setSplitCharacteristic(TreeModel.SplitCharacteristic.MULTI_SPLIT); } }
@Override public void exitTreeModel(TreeModel treeModel){ treeModel .setMissingValueStrategy(TreeModel.MissingValueStrategy.NONE) .setNoTrueChildStrategy(TreeModel.NoTrueChildStrategy.RETURN_LAST_PREDICTION) .setSplitCharacteristic(TreeModel.SplitCharacteristic.MULTI_SPLIT); } }
@Override public void exitTreeModel(TreeModel treeModel){ treeModel .setMissingValueStrategy(TreeModel.MissingValueStrategy.NULL_PREDICTION) .setSplitCharacteristic(TreeModel.SplitCharacteristic.MULTI_SPLIT); switch(this.miningFunction){ case REGRESSION: treeModel.setNoTrueChildStrategy(TreeModel.NoTrueChildStrategy.RETURN_LAST_PREDICTION); break; case CLASSIFICATION: break; default: throw new IllegalArgumentException(); } this.miningFunction = null; } }
@Override public void exitTreeModel(TreeModel treeModel){ treeModel .setMissingValueStrategy(TreeModel.MissingValueStrategy.NONE) .setNoTrueChildStrategy(TreeModel.NoTrueChildStrategy.RETURN_LAST_PREDICTION) .setSplitCharacteristic(TreeModel.SplitCharacteristic.MULTI_SPLIT); } }