package edu.neu.ccs.pyramid.regression;

import edu.neu.ccs.pyramid.dataset.FeatureRow;

import java.io.Serializable;

/**
 * Created by chengli on 8/19/14.
 */
public class ConstantRegressor implements Regressor, Serializable{
    private static final long serialVersionUID = 1L;

    private double score;

    public ConstantRegressor(double score) {
        this.score = score;
    }

    @Override
    public double predict(FeatureRow featureRow) {
        return this.score;
    }

    @Override
    public String toString() {
        return "ConstantRegressor{" +
                "score=" + score +
                '}' +"\n";
    }
}

@@ -374,32 +374,92 @@
 = score;%0A    %7D%0A%0A
+    public double getScore() %7B%0A        return score;%0A    %7D%0A%0A
     @Override%0A  

add getScore()