Skip to content
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

Add a progress bar for better time management #565

Open
vkhodygo opened this issue Jul 4, 2023 · 5 comments
Open

Add a progress bar for better time management #565

vkhodygo opened this issue Jul 4, 2023 · 5 comments

Comments

@vkhodygo
Copy link
Contributor

vkhodygo commented Jul 4, 2023

Is your feature request related to a problem? Please describe.
I usually have no idea how much time an imputation might take.

Describe the solution you'd like
Add a progress bar & ETA to futuremice/mice.

Describe alternatives you've considered
Run a timing routine for one iteration and multiply by the total number of iterations.

@stefvanbuuren
Copy link
Member

The suggestion makes sense. I assume it should only show when interactive() is TRUE. I usually look at the speed on the printed log to make an estimate, but that works only because I know the algorithm.

One iteration should give a pretty good idea how long the total process may take. For a non-parallel mice() just multiply the time * maxit * m. If the total is below 5 seconds, don't show at all. Predicted time in futuremice() may be a little more complicated to calculate though.

Anyone willing to look into this?

@vkhodygo
Copy link
Contributor Author

when interactive() is TRUE

Not necessarily, since we know in advance how many iterations maxit and imputations m we need we can calculate the total number that is maxit * m. Now, an indicator that goes to stdout tells you how much time has passed/how far the imputation has progressed.

One iteration should give a pretty good idea how long the total process may take.

That's what I usually do, but when you run multiple calculations at once it's difficult to keep all these times in mind.

@stefvanbuuren
Copy link
Member

Related #551

@isaactpetersen
Copy link

I have the same feature request: #516

@thomvolker
Copy link
Member

I have time to look into this sometime soon, but the main problem for implementing this is that futuremice is essentially a wrapper around mice, and all calculations occur within mice calls. Ergo, the progress bar would be a part of the mice() call itself, through an implementation that is also compatible with futuremice().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants