-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
IterativeImputer not converging (at all) #14338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It seems to converge for BayesianRidge but not for anything else? |
While developing iterative imputer we realised that RidgeCV had sharp
changes across iterations due to selecting a different alpha. So you might
need something equivalent to decreasing learning rate to stop big
fluctuations.
|
Similar things seem true for RandomForestRegressor and DecisionTreeRegressor. |
That seems... strange and is quite different from what we're doing. |
This is the paper: They are also using a normalized error, I don't think we're doing that. |
It makes sense for it not to converge if we're sampling from the posterior. I haven't thought about the non-sampling case, and all of our close studies were with We added convergence to have more feature-parity with missForest, but our stopping criterion is different (as you pointed out). Have any of your examples suggested a better criterion? Should we try a switch to NRMSE? Here is our current criterion given a user-passed
If we used NRMSE, we'd get something like this:
|
I haven't done experiments. It's a bit strange to do something that's not in the literature. But if we'd implement the literature we'd have different convergence criteria based on the My main problem right now is that the behavior for forests is non-sensical. We will always tell the user we didn't converge, independent of We could just not warn on non-convergence but I have no idea if that's better or worse. I really don't like useless and even misleading warnings. If you can find a better convergence criterion that would be great, but I figure the authors of MissForest have tried that and didn't find one? |
I can mess around with a few different criteria with RandomForests and RidgeCV as the estimators. Do you have a quick code snippet showing that it doesn't converge on some standard dataset that I can start with? |
#14330, our example that's currently in master. |
Thanks, I'll take a look when work dies down later this week.
…On Tue, Aug 6, 2019 at 1:33 PM Andreas Mueller ***@***.***> wrote:
#14330 <#14330>, our
example that's currently in master.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#14338?email_source=notifications&email_token=AAOJV3HRGP4BX6QMPHNTW6DQDHNZLA5CNFSM4IDA6S52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3WL7AQ#issuecomment-518832002>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAOJV3BRJK4R53MGVBULAWTQDHNZLANCNFSM4IDA6S5Q>
.
|
It does look like the convergence criterion we currently have is much harder to reach than the one based on L2 norm that I sketched above. Even having that one satisfied requires raising Also, the resulting values (with
Note that the change goes up right away from 150 Here the change is It's bizarre to either have it stop instantly OR to just keep going until max_tol is reached. Here's another one where the early stopping criterion isn't reached:
The difference becomes larger for the first time right away from 174 to 173. My intuition is that we should switch to the L2 version and raised the default |
Would the approach from missforest work if we required that the criterion
is held for multiple iterations as per n_iter_no_change?
|
Here's the first dataset:
With larger |
Running this on several datasets my intuition was that sometimes missforest just doesn't really do much and it is done after one iteration, which seems fine. And in other cases it actually converges. |
Maybe we should try the datasets from the missforest paper? |
I don't think this is a blocker. Certainly not as long as iterative imputer is regarded as experimental |
Moving to 0.23 |
moving to 0.24. We probably should start thinking of this as "high priority", as tagged lol. |
I think the problem is that no-one has an idea how to solve it, right? We could: I guess b) isn't too bad, if people read warning messages? |
I would also vote for (b), and add my previous conclusion: |
We could also:
Wouldn't that be flexible enough? |
Flexible enough but not usable enough? I like the idea of having the user specify a hyperparam path or something. If it existed: (a) would it achieve the goal of improving the chance of meaningful convergence; and (b) would it be clear how a user should use it? |
I think good documentation should be good enough to handle the usability. Also, for both of these parameters I'm suggesting some accepted literals which would be used by non-advanced users. It would also allow us to have some magical defaults which usually converge, and if not, the user has enough flexibility to fine tune the imputation. |
Hi, So if I understand correctly, the convergence error will always be produced, regardless of the max_iter? I am currently running it on a dataset (133,70) with the ExtraTreeRegressor and with max_iter = 60 it still produces the error and takes forever to impute. |
Hi, |
Have changed most of the parameters for ConvergenceWarning that is only slowing down the process but no change in warnings. So, I use the following lines to ignore warnings that suppress all the warnings:
|
Observed in #14330: the IterativeImputer doesn't converge, as a matter of fact, the convergence criterion doesn't seem to go down with iterations.
To me that indicates that either there's an issue with the implementation, an issue with the metric, or that our stopping criterion is not suitable.
Were there examples on which it converged? It would be nice to plot the convergence but we don't allow callbacks like that. But just printing it on https://github.com/scikit-learn/scikit-learn/blob/master/examples/impute/plot_iterative_imputer_variants_comparison.py shows that it doesn't go down.
The text was updated successfully, but these errors were encountered: