mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-04 16:57:32 +08:00
Enable ruff RUF002 rule (#11377)
* Enable ruff RUF002 rule * Fix --------- Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
@ -11,7 +11,7 @@ for polynomial regression:
|
||||
|
||||
β = (XᵀX)⁻¹Xᵀy = X⁺y
|
||||
|
||||
where X is the design matrix, y is the response vector, and X⁺ denotes the Moore–Penrose
|
||||
where X is the design matrix, y is the response vector, and X⁺ denotes the Moore-Penrose
|
||||
pseudoinverse of X. In the case of polynomial regression, the design matrix is
|
||||
|
||||
|1 x₁ x₁² ⋯ x₁ᵐ|
|
||||
@ -106,7 +106,7 @@ class PolynomialRegression:
|
||||
|
||||
β = (XᵀX)⁻¹Xᵀy = X⁺y
|
||||
|
||||
where X⁺ denotes the Moore–Penrose pseudoinverse of the design matrix X. This
|
||||
where X⁺ denotes the Moore-Penrose pseudoinverse of the design matrix X. This
|
||||
function computes X⁺ using singular value decomposition (SVD).
|
||||
|
||||
References:
|
||||
|
Reference in New Issue
Block a user