Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 310 and 311] [Versions 311 and 400] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403] [Versions 39 and 311]

(no description)

File Size: 463 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: BestFit  - X-Ref

getError()   X-Ref
No description

getBestFitType()   X-Ref
No description

getValueOfYForX($xValue)   X-Ref
Return the Y-Value for a specified value of X.

param: float $xValue X-Value
return: bool Y-Value

getValueOfXForY($yValue)   X-Ref
Return the X-Value for a specified value of Y.

param: float $yValue Y-Value
return: bool X-Value

getXValues()   X-Ref
Return the original set of X-Values.

return: float[] X-Values

getEquation($dp = 0)   X-Ref
Return the Equation of the best-fit line.

param: int $dp Number of places of decimal precision to display
return: bool

getSlope($dp = 0)   X-Ref
Return the Slope of the line.

param: int $dp Number of places of decimal precision to display
return: float

getSlopeSE($dp = 0)   X-Ref
Return the standard error of the Slope.

param: int $dp Number of places of decimal precision to display
return: float

getIntersect($dp = 0)   X-Ref
Return the Value of X where it intersects Y = 0.

param: int $dp Number of places of decimal precision to display
return: float

getIntersectSE($dp = 0)   X-Ref
Return the standard error of the Intersect.

param: int $dp Number of places of decimal precision to display
return: float

getGoodnessOfFit($dp = 0)   X-Ref
Return the goodness of fit for this regression.

param: int $dp Number of places of decimal precision to return
return: float

getGoodnessOfFitPercent($dp = 0)   X-Ref
Return the goodness of fit for this regression.

param: int $dp Number of places of decimal precision to return
return: float

getStdevOfResiduals($dp = 0)   X-Ref
Return the standard deviation of the residuals for this regression.

param: int $dp Number of places of decimal precision to return
return: float

getSSRegression($dp = 0)   X-Ref

param: int $dp Number of places of decimal precision to return
return: float

getSSResiduals($dp = 0)   X-Ref

param: int $dp Number of places of decimal precision to return
return: float

getDFResiduals($dp = 0)   X-Ref

param: int $dp Number of places of decimal precision to return
return: float

getF($dp = 0)   X-Ref

param: int $dp Number of places of decimal precision to return
return: float

getCovariance($dp = 0)   X-Ref

param: int $dp Number of places of decimal precision to return
return: float

getCorrelation($dp = 0)   X-Ref

param: int $dp Number of places of decimal precision to return
return: float

getYBestFitValues()   X-Ref

return: float[]

calculateGoodnessOfFit($sumX, $sumY, $sumX2, $sumY2, $sumXY, $meanX, $meanY, $const)   X-Ref
No description

leastSquareFit(array $yValues, array $xValues, $const)   X-Ref

param: float[] $yValues
param: float[] $xValues
param: bool $const

__construct($yValues, $xValues = [], $const = true)   X-Ref
Define the regression.

param: float[] $yValues The set of Y-values for this regression
param: float[] $xValues The set of X-values for this regression
param: bool $const