learner_isoreg(formula, info = "targeted::isoregw", learner.args = NULL, ...)
(formula) Formula specifying response and design matrix.
(character) Optional information to describe the instantiated learner object.
(list) Additional arguments to learner$new().
Additional arguments to isoregw.
learner object.
x <- runif(5e3, -5, 5)
pr <- lava::expit(-1 + x)
y <- rbinom(length(pr), 1, pr)
d <- data.frame(y, x)
lr <- learner_isoreg(y ~ x)
lr$estimate(d)
pr_iso <- lr$predict(d)
if (interactive()) {
plot(pr ~ x, cex=0.3)
lines(sort(x), pr_iso[order(x)], col="red", type="s")
}