/** * Returns the sum of squared deviations of the predicted y values about * their mean (which equals the mean of y). * <p> * This is usually abbreviated SSR or SSM. It is defined as SSM * <a href="http://www.xycoon.com/SumOfSquares.htm">here</a></p> * <p> * <strong>Preconditions</strong>: <ul> * <li>At least two observations (with at least two different x values) * must have been added before invoking this method. If this method is * invoked before a model can be estimated, <code>Double.NaN</code> is * returned. * </li></ul></p> * * @return sum of squared deviations of predicted y values */ public double getRegressionSumSquares() { return getRegressionSumSquares(getSlope()); }
/** * Returns the sum of squared deviations of the predicted y values about * their mean (which equals the mean of y). * <p> * This is usually abbreviated SSR or SSM. It is defined as SSM * <a href="http://www.xycoon.com/SumOfSquares.htm">here</a></p> * <p> * <strong>Preconditions</strong>: <ul> * <li>At least two observations (with at least two different x values) * must have been added before invoking this method. If this method is * invoked before a model can be estimated, <code>Double.NaN</code> is * returned. * </li></ul></p> * * @return sum of squared deviations of predicted y values */ public double getRegressionSumSquares() { return getRegressionSumSquares(getSlope()); }
/** * Returns the sum of squared deviations of the predicted y values about * their mean (which equals the mean of y). * <p> * This is usually abbreviated SSR or SSM. It is defined as SSM * <a href="http://www.xycoon.com/SumOfSquares.htm">here</a></p> * <p> * <strong>Preconditions</strong>: <ul> * <li>At least two observations (with at least two different x values) * must have been added before invoking this method. If this method is * invoked before a model can be estimated, <code>Double.NaN</code> is * returned. * </li></ul></p> * * @return sum of squared deviations of predicted y values */ public double getRegressionSumSquares() { return getRegressionSumSquares(getSlope()); }
map.put("N", regression.getN()); map.put("RSquared", regression.getRSquare()); map.put("regressionSumSquares", regression.getRegressionSumSquares()); map.put("slopeConfidenceInterval", regression.getSlopeConfidenceInterval()); map.put("interceptStdErr", regression.getInterceptStdErr());
@Override LR.ModelResult asResult() { LR.ModelResult r = new LR.ModelResult(name, framework, hasConstant(), getNumVars(), state, getNTrain(), getNTest()); if (state != State.created) { List<Double> params = new ArrayList<>(); params.add(R.getIntercept()); params.add(R.getSlope()); r.withTrainInfo("parameters", params, "RSquared", R.getRSquare(), "significance", R.getSignificance(), "slope confidence interval", R.getSlopeConfidenceInterval(), "intercept std error", R.getInterceptStdErr(), "slope std error", R.getSlopeStdErr(), "SSE", R.getSumSquaredErrors(), "MSE", R.getMeanSquareError(), "correlation", R.getR(), "SSR", R.getRegressionSumSquares(), "SST", R.getTotalSumSquares()); } if (tester.isReady()) r.withTestInfo(tester.getStatistics()); return r; }