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

improve diagnostics in recalib() #29

Open
GregorDeCillia opened this issue Jul 15, 2020 · 0 comments
Open

improve diagnostics in recalib() #29

GregorDeCillia opened this issue Jul 15, 2020 · 0 comments

Comments

@GregorDeCillia
Copy link
Contributor

give the client of recalib() more flexibility about how live diagnostics in ipf() are produced. Add a new callback class surveysd_reporter and two implementations for recalib() and ipf().

ipf(..., reporter = ipf_reporter())
recalib(..., reporter = recalib_reporter())

Those reporters are callbacks that will be invoked after every iteration step of ipf()

# body of ipf()
while (!converged) {
  converged <- ipf_step(data) # data is updated by reference
  reporter(data)
}

Possible parameters

ipf_reporter(freq = 10, show_table = TRUE, show_number_steps = TRUE)
recalib_reporter(freq = Inf, show_table = FALSE, show_number_steps = TRUE)
  • freq: how often should the reporter be used? Default: every 10th iteration. Inf menas the reporter is called once after the last iteration.
  • show_table: Show a verbose table that characterizes problematic groups?
  • show_number_stps: Show a message of the form "not converged after XY steps" or "converged after XY steps"?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant