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

Adding Bernoulli Distribution #74

Open
wants to merge 17 commits into
base: dev
Choose a base branch
from

Conversation

SabrinaRichter
Copy link
Member

No description provided.

@SabrinaRichter SabrinaRichter requested review from davidsebfischer and removed request for davidsebfischer March 23, 2019 16:11
@davidsebfischer davidsebfischer self-requested a review March 24, 2019 14:00
@SabrinaRichter
Copy link
Member Author

recent status of gradients: tensorflow-gradient seems to be wrong as gradients for the coefficients that are initialized with zeros (and should thus be trained) are zero. Computation of log_probs wrt model_loc and model_scale seems to be correct and the only things happening before that are eta_loc = tf.matmul(design_loc, a_var) and model_loc = 1/1+tf.exp(-eta_loc) and the same for eta_scale.

Will look at it again during the next days.

@davidsebfischer
Copy link
Contributor

Did you try initializing at non-zero? Or checked whether zero is is an additional extremum?

@SabrinaRichter
Copy link
Member Author

Status report:

I think the hessian test didn't do what it was supposed to do and fixed it.

Bernoulli should be more or less ok:
Tests for graphs, jacobians, hessians pass. Also acc_analytic, when not sparse. Trying other optimizers (e.g. nr) throws errors, but also for nb. Don't know wether you fixed that yesterday.

I also compared the old beta version to nb, but I didn't find anything that could solve the gradient problem. The only thing I am not sure about are the bounds. Maybe you can have a look at them?

The new version for beta is not yet completely working:
Jacobians are ok, hessians are definitely "the same" in the test, but have relatively high differences.
Closed_form initialization can't handle different design matrices (yet).
(Standard-)Initialization could be ok by now, but training does definitely not work yet. (I will work on that next week)
I also noticed, that the off-diagonal-part of the fim is here non-zero. I am not sure if this is already compatible with your implementation of irls.

(btw: beta2 is the old version with mean and samplesize and beta is the new version with p and q)

@davidsebfischer
Copy link
Contributor

Ok, nice! I will add an option to use the full FIM as oppose to the block-diagonal blocks only. Until then, just set fim_a and fim_b as zero scalars and return a 3rd object "fim".

@SabrinaRichter
Copy link
Member Author

Forgot log in the log-likelihood, so no fim at all. Sorry!

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

Successfully merging this pull request may close these issues.

None yet

2 participants