Inheritance: extends Regression
 /**
  * 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);
 }
Example #2
0
 /**
  * @param array $points
  * @param array $ws     Weights
  */
 public function __construct(array $points, array $ws)
 {
     $this->ws = $ws;
     parent::__construct($points);
 }