Skip to content

Instantly share code, notes, and snippets.

@Torvaney
Created July 20, 2018 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Torvaney/d9696a8aa5e681968aa6120ef9a2a04b to your computer and use it in GitHub Desktop.
Save Torvaney/d9696a8aa5e681968aa6120ef9a2a04b to your computer and use it in GitHub Desktop.
Bounds on classifier error given disagreement rate
lower_bound <- function(d) {
(1 - sqrt(1 - 2*d)) / 2
}
upper_bound <- function(d) {
(1 + sqrt(1 - 2*d)) / 2
}
tibble(d = seq(0, 0.5, 0.001),
lower = lower_bound(d),
upper = upper_bound(d)) %>%
ggplot(aes(x = d)) +
geom_ribbon(aes(ymin = lower, ymax = upper))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment