Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| # Header And More
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jfree.data.statistics
Class Regression

    java.lang.Object
      org.jfree.data.statistics.Regression

    public abstract class Regression

extends java.lang.Object

A utility class for fitting regression curves to data.

Constructor Summary
`Regression()`

Method Summary
`static double[]` | `getOLSRegression(double[][] data)` Returns the parameters 'a' and 'b' for an equation y = a + bx, fitted to the data using ordinary least squares regression.
`static double[]` | `getOLSRegression(XYDataset data, int series)` Returns the parameters 'a' and 'b' for an equation y = a + bx, fitted to the data using ordinary least squares regression.
`static double[]` | `getPowerRegression(double[][] data)` Returns the parameters 'a' and 'b' for an equation y = ax^b, fitted to the data using a power regression equation.
`static double[]` | `getPowerRegression(XYDataset data, int series)` Returns the parameters 'a' and 'b' for an equation y = ax^b, fitted to the data using a power regression equation.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Regression

    public Regression()

Method Detail

### getOLSRegression

    public static double[] getOLSRegression(double[][] data)

  Returns the parameters 'a' and 'b' for an equation y = a + bx, fitted to the data using ordinary least squares regression. The result is returned as a double[], where result[0] --> a, and result[1] --> b.

  Parameters:
    `data` - the data.
  Returns:
    The parameters.

### getOLSRegression

    public static double[] getOLSRegression(XYDataset data,
                                            int series)

  Returns the parameters 'a' and 'b' for an equation y = a + bx, fitted to the data using ordinary least squares regression. The result is returned as a double[], where result[0] --> a, and result[1] --> b.

  Parameters:
    `data` - the data.
    `series` - the series (zero-based index).
  Returns:
    The parameters.

### getPowerRegression

    public static double[] getPowerRegression(double[][] data)

  Returns the parameters 'a' and 'b' for an equation y = ax^b, fitted to the data using a power regression equation. The result is returned as an array, where double[0] --> a, and double[1] --> b.

  Parameters:
    `data` - the data.
  Returns:
    The parameters.

### getPowerRegression

    public static double[] getPowerRegression(XYDataset data,
                                              int series)

  Returns the parameters 'a' and 'b' for an equation y = ax^b, fitted to the data using a power regression equation. The result is returned as an array, where double[0] --> a, and double[1] --> b.

  Parameters:
    `data` - the data.
    `series` - the series to fit the regression line against.
  Returns:
    The parameters.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| # Footer And More
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2009 by Object Refinery Limited. All Rights Reserved.