net.sf.jagg
Class LinearRegressionStats

java.lang.Object
  extended by net.sf.jagg.LinearRegressionStats

public class LinearRegressionStats
extends java.lang.Object

This class represents all statistics generated by a LinearRegressionAggregator.

Since:
0.1.0
Author:
Randy Gettman
See Also:
LinearRegressionAggregator

Constructor Summary
LinearRegressionStats(double lineSlope, double lineIntercept, long count, double rSquared, double correlation, double avg1, double avg2)
          Creates a LinearRegressionStats with the given attributes.
 
Method Summary
 double getAvg1()
          Returns the average of the first "x" property.
 double getAvg2()
          Returns the average of the second "y" property.
 double getCorrelation()
          Returns the coefficient of correlation between the first "x" property and the second "y" property.
 long getCount()
          Returns the number of non-null samples considered.
 double getLineIntercept()
          Returns the linear regression line's y-intercept.
 double getLineSlope()
          Returns the linear regression line's slope.
 double getRSquared()
          Returns the coefficient of determination, a.k.a.
 java.lang.String toString()
          The String representation:
(slope,intercept,count,rSquared,correlation,avg1,avg2).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinearRegressionStats

public LinearRegressionStats(double lineSlope,
                             double lineIntercept,
                             long count,
                             double rSquared,
                             double correlation,
                             double avg1,
                             double avg2)
Creates a LinearRegressionStats with the given attributes.

Parameters:
lineSlope - The linear regression line's slope.
lineIntercept - The linear regression line's y-intercept.
count - The number of non-null samples considered.
rSquared - The coefficient of determination, a.k.a. R-squared, or goodness of fit.
correlation - The coefficient of correlation between the first "x" property and the second "y" property.
avg1 - The average of the first "x" property.
avg2 - The average of the second "y" property.
Method Detail

getLineSlope

public double getLineSlope()
Returns the linear regression line's slope.

Returns:
The linear regression line's slope.

getLineIntercept

public double getLineIntercept()
Returns the linear regression line's y-intercept.

Returns:
The linear regression line's y-intercept.

getCount

public long getCount()
Returns the number of non-null samples considered.

Returns:
The number of non-null samples considered.

getRSquared

public double getRSquared()
Returns the coefficient of determination, a.k.a. R-squared, or goodness of fit.

Returns:
The coefficient of determination.

getCorrelation

public double getCorrelation()
Returns the coefficient of correlation between the first "x" property and the second "y" property.

Returns:
The coefficient of correlation.

getAvg1

public double getAvg1()
Returns the average of the first "x" property.

Returns:
The average of the first "x" property.

getAvg2

public double getAvg2()
Returns the average of the second "y" property.

Returns:
The average of the second "y" property.

toString

public java.lang.String toString()
The String representation:
(slope,intercept,count,rSquared,correlation,avg1,avg2).

Overrides:
toString in class java.lang.Object
Returns:
A String representation.


Copyright © 2010-2013 jAgg Team. All Rights Reserved.