MathPHP\Statistics\Regression\ParametricRegression::__construct PHP Метод

__construct() публичный Метод

Calculate the regression parameters
public __construct ( array $points )
$points array
    public function __construct(array $points)
    {
        parent::__construct($points);
        $this->calculate();
    }

Usage Example

Пример #1
0
 /**
  * Given a set of data ($points) and a point($force), perform a least squares
  * regression of the data, such that the regression is forced to pass through
  * the specified point.
  *
  * This procedure is most frequently used with $force = [0,0], the origin.
  *
  * @param array $points
  * @param array $force Point to force regression line through (default: origin)
  */
 public function __construct(array $points, array $force = [0, 0])
 {
     $this->v = $force[0];
     $this->w = $force[1];
     parent::__construct($points);
 }
All Usage Examples Of MathPHP\Statistics\Regression\ParametricRegression::__construct