PHP 클래스 MathPHP\Statistics\Regression\WeightedLinear

A model with a single explanatory variable. Fits a straight line through the set of n points in such a way that makes the sum of squared residuals of the model (that is, vertical distances between the points of the data set and the fitted line) as small as possible. https://en.wikipedia.org/wiki/Simple_linear_regression Having data points {(xᵢ, yᵢ), i = 1 ..., n } Find the equation y = mx + b
상속: extends ParametricRegression, use trait MathPHP\Statistics\Regression\Models\LinearModel, use trait MathPHP\Statistics\Regression\Methods\WeightedLeastSquares
파일 보기 프로젝트 열기: markrogoyski/math-php

공개 메소드들

메소드 설명
__construct ( array $points, array $ws )
calculate ( ) Calculates the regression parameters.

메소드 상세

__construct() 공개 메소드

public __construct ( array $points, array $ws )
$points array
$ws array Weights

calculate() 공개 메소드

Calculates the regression parameters.
public calculate ( )