mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
Apply edits from Allen Downey's review of the linear_regression docs. (GH-26176)
This commit is contained in:
parent
fdc7e52f5f
commit
b3f65e819f
2 changed files with 15 additions and 23 deletions
|
@ -930,15 +930,15 @@ def linear_regression(regressor, dependent_variable, /):
|
|||
Return the intercept and slope of simple linear regression
|
||||
parameters estimated using ordinary least squares. Simple linear
|
||||
regression describes relationship between *regressor* and
|
||||
*dependent variable* in terms of linear function::
|
||||
*dependent variable* in terms of linear function:
|
||||
|
||||
dependent_variable = intercept + slope * regressor + noise
|
||||
|
||||
where ``intercept`` and ``slope`` are the regression parameters that are
|
||||
estimated, and noise term is an unobserved random variable, for the
|
||||
variability of the data that was not explained by the linear regression
|
||||
(it is equal to the difference between prediction and the actual values
|
||||
of dependent variable).
|
||||
where *intercept* and *slope* are the regression parameters that are
|
||||
estimated, and noise represents the variability of the data that was
|
||||
not explained by the linear regression (it is equal to the
|
||||
difference between predicted and actual values of dependent
|
||||
variable).
|
||||
|
||||
The parameters are returned as a named tuple.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue