private double getActualSelectionThreshold()

in flink-ml-lib/src/main/java/org/apache/flink/ml/feature/univariatefeatureselector/UnivariateFeatureSelector.java [156:184]


    private double getActualSelectionThreshold() {
        Double threshold = getSelectionThreshold();
        if (threshold == null) {
            String selectionMode = getSelectionMode();
            if (NUM_TOP_FEATURES.equals(selectionMode)) {
                threshold = 50.0;
            } else if (PERCENTILE.equals(selectionMode)) {
                threshold = 0.1;
            } else {
                threshold = 0.05;
            }
        } else {
            if (NUM_TOP_FEATURES.equals(getSelectionMode())) {
                Preconditions.checkArgument(
                        threshold >= 1 && threshold.intValue() == threshold,
                        "SelectionThreshold needs to be a positive Integer "
                                + "for selection mode numTopFeatures, but got %s.",
                        threshold);
            } else {
                Preconditions.checkArgument(
                        threshold >= 0 && threshold <= 1,
                        "SelectionThreshold needs to be in the range [0, 1] "
                                + "for selection mode %s, but got %s.",
                        getSelectionMode(),
                        threshold);
            }
        }
        return threshold;
    }