Repository navigation
Newton regularize - #1847
Newton regularize#1847
Conversation
|
3 failures in origin regress. no failures anywhere else, discrete and other emplike that use _fit_newton @j-grana6 Do you have an idea how reliable the |
|
On 07/27/2014 01:37 AM, Josef Perktold wrote:
|
|
The point here is that everything is at the optimization tolerance, AFAICS So small differences in convergence can have a larger impact on the llr, i.e. diff of two large values that are pretty close. The problem for investigating things like this is that the actual optimization is hidden behind several layers without storing any of the convergence results. |
|
On 07/27/2014 11:09 AM, Josef Perktold wrote:
|
|
What's the problem in the time that it takes to finish the tests? The best would be to add or change the test case. Do you still have the matlab code? I don't see any bug in the code, however the layers of optimization are a bit fragile, and we would need to refactor it to have more optimization options and get more results about the optimization itself. I'd like to merge this (today), because I think it will solve the test failures on Ubuntu and some Debian machines. After it is merged, Ubuntu and Debian testing will pick it up. |
|
On 07/27/2014 10:17 PM, Josef Perktold wrote:
|
|
I'm changing the Ridge factor, so that the result for origin regress test remains unchanged. So we shouldn't see this failure anymore after my next push. The diag of the Hessian in this example is |
|
change in last commit 47c0f98 introduces asarray(hess) since the user supplied function could return array_like (list of list in one test cases) |
|
The new keyword argument |
|
copy for reference, see #1316 and #1831 result of failure on Ubuntu python-xy |
|
all green, merging if this helps depend on Debian and Ubuntu testing. |
REF regularize optimize._fit_newton (ridge factor)
REF regularize optimize._fit_newton (ridge factor)
our
optimize._fit_newtonis very plain and fails if the Hessian is not invertiblesee #953 for the suggestion to use pinv
This PR instead introduces a Ridge regularization, i.e. add
lambda * eyeI'm not sure how lambda should be set.
The current lambda is at least 1e-10, which I needed to avoid the failing cases in #1845. Making it only depend on median or max of the diagonal elements didn't work in that case.
Problem in emplike #1845 is that _fit_newton is hardcoded as the only optimizer used in the inner optimization.