rcssjava.coach
Class LinearRegression

java.lang.Object
  extended by rcssjava.coach.LinearRegression
All Implemented Interfaces:
java.io.Serializable

public class LinearRegression
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Constructor Summary
LinearRegression()
           
 
Method Summary
 void addPoint(VecPosition p)
           
 Line getBestFitLine()
           
 int getNumPoints()
           
 double getRMSError()
          Compute the unbiased root-mean-square error for the current regression.
 double getRMSError(java.util.Collection<VecPosition> points)
          Compute the unbiased root-mean-square error for a new set of points on the current best-fit-line.
static void main(java.lang.String[] args)
           
 void reset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearRegression

public LinearRegression()
Method Detail

reset

public void reset()

addPoint

public void addPoint(VecPosition p)

getNumPoints

public int getNumPoints()

getBestFitLine

public Line getBestFitLine()
                    throws rcssjava.coach.InsufficientDataException
Throws:
rcssjava.coach.InsufficientDataException

getRMSError

public double getRMSError()
                   throws rcssjava.coach.InsufficientDataException
Compute the unbiased root-mean-square error for the current regression.

Throws:
rcssjava.coach.InsufficientDataException

getRMSError

public double getRMSError(java.util.Collection<VecPosition> points)
                   throws rcssjava.coach.InsufficientDataException
Compute the unbiased root-mean-square error for a new set of points on the current best-fit-line.

Throws:
rcssjava.coach.InsufficientDataException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception