@@ -0,0 +1,604 @@
+package edu.neu.ccs.pyramid.regression.probabilistic_regression_tree;%0A%0Aimport org.apache.mahout.math.Vector;%0A%0A/**%0A * Created by chengli on 5/29/15.%0A */%0Apublic class HardThreshold implements GatingFunction %7B%0A    private int featureIndex;%0A    private double threshold;%0A%0A    public HardThreshold(int featureIndex, double threshold) %7B%0A        this.featureIndex = featureIndex;%0A        this.threshold = threshold;%0A    %7D%0A%0A    @Override%0A    public double leftProbability(Vector row) %7B%0A        if (row.get(featureIndex)%3C=threshold)%7B%0A            return 1;%0A        %7D else %7B%0A            return 0;%0A        %7D%0A    %7D%0A%7D%0A

add HardThreshold