SciKit Learn - 线性回归背后的数学模型?
SciKit Learn - Mathematical model behind linear regression?
Linear Regression function use in scikit learn? The Ordinary Least Squares model has more than one way to minimize the cost function. I've found the form of the function it solves here 的数学模型是什么,但我也很想知道它到底使用了哪种方法。任何人都可以详细说明吗?谢谢!
您基本上可以充分搜索源代码,并且您会找到它。
在base.py
中,你可以发现它使用了linal.lstsq
。
在linalg.py
, you can see that lstsq
uses the dglelsd
family。
这个家族与 SVD 相关。它uses SVD to solve the original problem.
Linear Regression function use in scikit learn? The Ordinary Least Squares model has more than one way to minimize the cost function. I've found the form of the function it solves here 的数学模型是什么,但我也很想知道它到底使用了哪种方法。任何人都可以详细说明吗?谢谢!
您基本上可以充分搜索源代码,并且您会找到它。
在
base.py
中,你可以发现它使用了linal.lstsq
。在
linalg.py
, you can see thatlstsq
uses thedglelsd
family。这个家族与 SVD 相关。它uses SVD to solve the original problem.