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

Make cutoff values more usable #18

Closed
fabrice-rossi opened this issue Jul 26, 2022 · 1 comment
Closed

Make cutoff values more usable #18

fabrice-rossi opened this issue Jul 26, 2022 · 1 comment
Labels
invalid This doesn't seem right
Milestone

Comments

@fabrice-rossi
Copy link
Owner

Values computed by the cutoff.* functions correspond directly to the thresholds used in the pruning phase of VLMC or coVLMC. As the pruning tests are written as follows

if (p_value > cutoff) {
  prune
} else {
  do not prune
} 

using directly the cutoff values may not induce pruning.

This can be fixed by either:

  1. replacing the test by p_value >= cutoff
  2. slightly decreasing the thresholds reported by cutoff

The first solution departs from what is used in other VLMC implementations, leading to potential differences between the results of very similar codes. The second solution is easy to implement in Rcpp using the nextafter standard function.

@fabrice-rossi fabrice-rossi added the invalid This doesn't seem right label Jul 26, 2022
@fabrice-rossi fabrice-rossi added this to the 0.1.0 milestone Jul 26, 2022
fabrice-rossi added a commit that referenced this issue Jul 28, 2022
This is done using the before function.
@fabrice-rossi
Copy link
Owner Author

Fixed using the second solution by commits 56f7b9f and f5e280a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant