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

Fix Binomial_adaboost with link functions #63

Closed
hofnerb opened this issue Jan 20, 2017 · 3 comments
Closed

Fix Binomial_adaboost with link functions #63

hofnerb opened this issue Jan 20, 2017 · 3 comments
Assignees

Comments

@hofnerb
Copy link
Member

@hofnerb hofnerb commented Jan 20, 2017

I was a bit too fast. I've changed link2dist() to make.link() in Binomial_adaboost (see commit 2562b07), however did not change all further occurrences of link$d, link$d and link$q.

I think it would be preferable to use make.link (with correct code afterwards). However it might be that Torsten needs the link2dist interface for his CTMs? Hence we might need to keep this.

hofnerb added a commit that referenced this issue Jan 20, 2017
@hofnerb
Copy link
Member Author

@hofnerb hofnerb commented Jan 20, 2017

I think arbitrary distributions should work again, e.g., with Bionomial(link = "norm"). These are required for boosted CTMs.

@mayrandy: Can you please add code for the make.link interface from line 184 onwards (or modify the code from line 152 onwards)? Afterwards we can remove lines 101-107 (in function link2dist).

@mayrandy
Copy link
Member

@mayrandy mayrandy commented Jan 25, 2017

mayrandy added a commit that referenced this issue Jan 26, 2017
@mayrandy
Copy link
Member

@mayrandy mayrandy commented Jan 26, 2017

I've implemented now the other glm-type link functions c("probit", "cloglog", "cauchit", "log") for the classical Binomial(type = "adaboost").

While doing that, I think I better understood what the classical family was doing:

In case of link = "logit" we were (and still are) using the loss (as described in Bühlmann and Hothorn, 2007):
log_2(1 + exp(- 2yf))
with y in (-1, 1) and f = log(p / (1 - p)) / 2

The latter is the actual reason we are getting coefficients half the size than usual, not the coding of y.

In case of link = "probit" the loss is the log-binomial
y * log(p) + (1 - y) * log(1 - p)
with f = qnorm(p) and the coefficients have the usual size (although we are giving the warning) -> see #65 !

As a result, Binomial(type = "glm", link = "probit") and Binomial(type = "adaboost", link = "probit") are in fact optimizing the same loss, they only lead to slightly different results due to other offsets and the different coding of y.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.