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

Distributions (Gamma, Poisson) #3

Open
benman1 opened this issue Sep 4, 2019 · 0 comments
Open

Distributions (Gamma, Poisson) #3

benman1 opened this issue Sep 4, 2019 · 0 comments

Comments

@benman1
Copy link

benman1 commented Sep 4, 2019

Hi
Thanks for creating the repo (nicely maintained and good to read). I have a problem, however.

I am trying to use other distribution families, like Poisson or Gamma. So I create the GLM as follows:

Glm glm = new Glm(GlmSolverType.GlmIrlsSvd, GlmDistributionFamily.Gamma) glm.fit(dMatrix)

or

Glm glm = new Glm() glm.distributionFamily = GlmDistributionFamily.Poisson glm.fit(dMatrix)

I only get nans in either case for predictions. Is there anything I am missing here? If I change this to linear. I get non-nan results on my test dataset (iris).

For some values of distribution family, such as InverseGaussian, I even get null exceptions from GlmAlgorithm (state is null).

protected TerminationEvaluationMethod shouldTerminate = (state, iteration) -> { if (state.improved() && state.improvement() >= this.mTol) { return iteration >= this.maxIters; } else { return false; } };

Help appreciated.
Thanks again
Ben.

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

No branches or pull requests

1 participant