ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
PHPExcel_Power_Best_Fit Class Reference
+ Inheritance diagram for PHPExcel_Power_Best_Fit:
+ Collaboration diagram for PHPExcel_Power_Best_Fit:

Public Member Functions

 getValueOfYForX ($xValue)
 getValueOfXForY ($yValue)
 getEquation ($dp=0)
 getIntersect ($dp=0)
 __construct ($yValues, $xValues=array(), $const =True)
- Public Member Functions inherited from PHPExcel_Best_Fit
 getError ()
 getBestFitType ()
 getXValues ()
 getSlope ($dp=0)
 getSlopeSE ($dp=0)
 getIntersectSE ($dp=0)
 getGoodnessOfFit ($dp=0)
 getGoodnessOfFitPercent ($dp=0)
 getStdevOfResiduals ($dp=0)
 getSSRegression ($dp=0)
 getSSResiduals ($dp=0)
 getDFResiduals ($dp=0)
 getF ($dp=0)
 getCovariance ($dp=0)
 getCorrelation ($dp=0)
 getYBestFitValues ()

Protected Attributes

 $_bestFitType = 'power'
- Protected Attributes inherited from PHPExcel_Best_Fit
 $_error = False
 $_bestFitType = 'undetermined'
 $_valueCount = 0
 $_xValues = array()
 $_yValues = array()
 $_adjustToZero = False
 $_yBestFitValues = array()
 $_goodnessOfFit = 1
 $_stdevOfResiduals = 0
 $_covariance = 0
 $_correlation = 0
 $_SSRegression = 0
 $_SSResiduals = 0
 $_DFResiduals = 0
 $_F = 0
 $_slope = 0
 $_slopeSE = 0
 $_intersect = 0
 $_intersectSE = 0
 $_Xoffset = 0
 $_Yoffset = 0

Private Member Functions

 _power_regression ($yValues, $xValues, $const)

Additional Inherited Members

- Protected Member Functions inherited from PHPExcel_Best_Fit
 _calculateGoodnessOfFit ($sumX, $sumY, $sumX2, $sumY2, $sumXY, $meanX, $meanY, $const)
 _leastSquareFit ($yValues, $xValues, $const)

Detailed Description

Definition at line 39 of file powerBestFitClass.php.

Constructor & Destructor Documentation

PHPExcel_Power_Best_Fit::__construct (   $yValues,
  $xValues = array(),
  $const = True 
)

Reimplemented from PHPExcel_Best_Fit.

Definition at line 92 of file powerBestFitClass.php.

References _power_regression().

{
if (parent::__construct($yValues, $xValues) !== False) {
$this->_power_regression($yValues, $xValues, $const);
}
} // function __construct()

+ Here is the call graph for this function:

Member Function Documentation

PHPExcel_Power_Best_Fit::_power_regression (   $yValues,
  $xValues,
  $const 
)
private

Definition at line 70 of file powerBestFitClass.php.

References PHPExcel_Best_Fit\_leastSquareFit().

Referenced by __construct().

{
foreach($xValues as &$value) {
if ($value < 0.0) {
$value = 0 - log(abs($value));
} elseif ($value > 0.0) {
$value = log($value);
}
}
unset($value);
foreach($yValues as &$value) {
if ($value < 0.0) {
$value = 0 - log(abs($value));
} elseif ($value > 0.0) {
$value = log($value);
}
}
unset($value);
$this->_leastSquareFit($yValues, $xValues, $const);
} // function _power_regression()

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

PHPExcel_Power_Best_Fit::getEquation (   $dp = 0)

Reimplemented from PHPExcel_Best_Fit.

Definition at line 54 of file powerBestFitClass.php.

References getIntersect(), and PHPExcel_Best_Fit\getSlope().

{
$slope = $this->getSlope($dp);
$intersect = $this->getIntersect($dp);
return 'Y = '.$intersect.' * X^'.$slope;
} // function getEquation()

+ Here is the call graph for this function:

PHPExcel_Power_Best_Fit::getIntersect (   $dp = 0)

Reimplemented from PHPExcel_Best_Fit.

Definition at line 62 of file powerBestFitClass.php.

Referenced by getEquation(), getValueOfXForY(), and getValueOfYForX().

{
if ($dp != 0) {
return round(exp($this->_intersect),$dp);
}
return exp($this->_intersect);
} // function getIntersect()

+ Here is the caller graph for this function:

PHPExcel_Power_Best_Fit::getValueOfXForY (   $yValue)

Reimplemented from PHPExcel_Best_Fit.

Definition at line 49 of file powerBestFitClass.php.

References getIntersect(), and PHPExcel_Best_Fit\getSlope().

{
return pow((($yValue + $this->_Yoffset) / $this->getIntersect()),(1 / $this->getSlope()));
} // function getValueOfXForY()

+ Here is the call graph for this function:

PHPExcel_Power_Best_Fit::getValueOfYForX (   $xValue)

Reimplemented from PHPExcel_Best_Fit.

Definition at line 44 of file powerBestFitClass.php.

References getIntersect(), and PHPExcel_Best_Fit\getSlope().

{
return $this->getIntersect() * pow(($xValue - $this->_Xoffset),$this->getSlope());
} // function getValueOfYForX()

+ Here is the call graph for this function:

Field Documentation

PHPExcel_Power_Best_Fit::$_bestFitType = 'power'
protected

Definition at line 41 of file powerBestFitClass.php.


The documentation for this class was generated from the following file: