mpi.fruitfly.analysis
Class FitLine

java.lang.Object
  extended by mpi.fruitfly.analysis.FitLine

public class FitLine
extends java.lang.Object

Title: Line Fitter

Description: Fits line (m*x + n) to a double array and return correlation coefficient, standard deviation and m and n of the linear equation

Copyright: Copyright (c) 2007

Company: MPI-CBG


Constructor Summary
FitLine()
           
 
Method Summary
static double computeAverage(double[] values)
           
static double computeVariance(double[] values)
           
static double[] fitLine(double[] values)
          Fits the line to a point cloud and returns fitted line (m*x + n) and regression coefficient and Standard Deviation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FitLine

public FitLine()
Method Detail

fitLine

public static double[] fitLine(double[] values)
Fits the line to a point cloud and returns fitted line (m*x + n) and regression coefficient and Standard Deviation

Parameters:
values - double[] - values to fit a line to
Returns:
double[] - double array containing (R, stDev, m, n)

computeAverage

public static double computeAverage(double[] values)

computeVariance

public static double computeVariance(double[] values)