PHPExcel_Shared_Trend

# Class: PHPExcel_Linear_Best_Fit

Source Location: /PHPExcel/Shared/trend/linearBestFitClass.php

### Class Overview

    PHPExcel_Best_Fit
       |
       --PHPExcel_Linear_Best_Fit

PHPExcel_Linear_Best_Fit

#### Author(s):

#### Copyright:

- Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

### Variables

- $_bestFitType

### Methods

- __construct
- getEquation
- getValueOfXForY
- getValueOfYForX

### Inherited Variables

#### Class: PHPExcel_Best_Fit

PHPExcel_Best_Fit::$_adjustToZero
PHPExcel_Best_Fit::$_correlation
PHPExcel_Best_Fit::$_covariance
PHPExcel_Best_Fit::$_DFResiduals
PHPExcel_Best_Fit::$_error
PHPExcel_Best_Fit::$_F
PHPExcel_Best_Fit::$_goodnessOfFit
PHPExcel_Best_Fit::$_intersect
PHPExcel_Best_Fit::$_intersectSE
PHPExcel_Best_Fit::$_slope
PHPExcel_Best_Fit::$_slopeSE
PHPExcel_Best_Fit::$_SSRegression
PHPExcel_Best_Fit::$_SSResiduals
PHPExcel_Best_Fit::$_stdevOfResiduals
PHPExcel_Best_Fit::$_valueCount
PHPExcel_Best_Fit::$_Xoffset
PHPExcel_Best_Fit::$_xValues
PHPExcel_Best_Fit::$_yBestFitValues
PHPExcel_Best_Fit::$_Yoffset
PHPExcel_Best_Fit::$_yValues

### Inherited Methods

#### Class: PHPExcel_Best_Fit

PHPExcel_Best_Fit::__construct()
  Define the regression
PHPExcel_Best_Fit::getBestFitType()
PHPExcel_Best_Fit::getCorrelation()
PHPExcel_Best_Fit::getCovariance()
PHPExcel_Best_Fit::getDFResiduals()
PHPExcel_Best_Fit::getEquation()
  Return the Equation of the best-fit line
PHPExcel_Best_Fit::getError()
PHPExcel_Best_Fit::getF()
PHPExcel_Best_Fit::getGoodnessOfFit()
  Return the goodness of fit for this regression
PHPExcel_Best_Fit::getGoodnessOfFitPercent()
PHPExcel_Best_Fit::getIntersect()
  Return the Value of X where it intersects Y = 0
PHPExcel_Best_Fit::getIntersectSE()
  Return the standard error of the Intersect
PHPExcel_Best_Fit::getSlope()
  Return the Slope of the line
PHPExcel_Best_Fit::getSlopeSE()
  Return the standard error of the Slope
PHPExcel_Best_Fit::getSSRegression()
PHPExcel_Best_Fit::getSSResiduals()
PHPExcel_Best_Fit::getStdevOfResiduals()
  Return the standard deviation of the residuals for this regression
PHPExcel_Best_Fit::getValueOfXForY()
  Return the X-Value for a specified value of Y
PHPExcel_Best_Fit::getValueOfYForX()
  Return the Y-Value for a specified value of X
PHPExcel_Best_Fit::getXValues()
  Return the original set of X-Values
PHPExcel_Best_Fit::getYBestFitValues()
PHPExcel_Best_Fit::_calculateGoodnessOfFit()
PHPExcel_Best_Fit::_leastSquareFit()

### Class Details

[line 39]
PHPExcel_Linear_Best_Fit

#### Tags:

copyright: | Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

[ Top ]

### Class Variables

#### $_bestFitType = 'linear'

[line 47]

Algorithm type to use for best-fit (Name of this trend class)

#### Tags:

access: | protected

Type: | string
Overrides: | Array

[ Top ]

### Class Methods

### constructor __construct [line 105]

`PHPExcel_Linear_Best_Fit __construct( float[] $yValues, [float[] $xValues = array()], [boolean $const = True])`

Define the regression and calculate the goodness of fit for a set of X and Y data values
Overrides PHPExcel_Best_Fit::__construct() (Define the regression)

#### Parameters:

float[] | $yValues | The set of Y-values for this regression
float[] | $xValues | The set of X-values for this regression
boolean | $const |

[ Top ]

### method getEquation [line 78]

`string getEquation( [int $dp = 0])`

Return the Equation of the best-fit line

#### Tags:

access: | public

Overrides PHPExcel_Best_Fit::getEquation() (Return the Equation of the best-fit line)

#### Parameters:

int | $dp | Number of places of decimal precision to display

[ Top ]

### method getValueOfXForY [line 67]

`float getValueOfXForY( float $yValue)`

Return the X-Value for a specified value of Y

#### Tags:

return: | X-Value
access: | public

Overrides PHPExcel_Best_Fit::getValueOfXForY() (Return the X-Value for a specified value of Y)

#### Parameters:

float | $yValue | Y-Value

[ Top ]

### method getValueOfYForX [line 56]

`float getValueOfYForX( float $xValue)`

Return the Y-Value for a specified value of X

#### Tags:

return: | Y-Value
access: | public

Overrides PHPExcel_Best_Fit::getValueOfYForX() (Return the Y-Value for a specified value of X)

#### Parameters:

float | $xValue | X-Value

[ Top ]

Documentation generated on Fri, 12 Oct 2012 00:16:34 +0200 by phpDocumentor 1.4.4