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

Implement Weibull distribution #59

Open
ragulpr opened this issue Jan 1, 2018 · 9 comments
Open

Implement Weibull distribution #59

ragulpr opened this issue Jan 1, 2018 · 9 comments

Comments

@ragulpr
Copy link

ragulpr commented Jan 1, 2018

Great work everyone. I'm planning on implementing the Weibull distribution for pytorch anyways, is there any interest in merging this here?
I just wanted to give a heads up if someone else is thinking about it. I can give details about the timeline after consulting with my lab.

@fritzo
Copy link

fritzo commented Jan 2, 2018

One clean way to implement this would be via PowerBijector and a ScaleBijector. I believe that if X ~ Exponential(1) then W=X**(1/k)/lambda is Weibul(k,lambda). However I'm not sure we'll have time to implement Bijectors by the PyTorch 0.4 release.

@fritzo fritzo changed the title Implementing Weibull distribution? Implement Weibull distribution? Jan 2, 2018
@ragulpr
Copy link
Author

ragulpr commented Jan 3, 2018

I'll look into the Bijector, but there's other type of abstractions available. For example for the continuous weibull;
g~gumbel(u,s) -> exp(g) ~ Weibull(exp(u),1/s). But I think the discrete Weibull is the most useful in practice. To form the discrete distributions from the continuous there might be better abstractions starting with the Cumulative Hazard function, but in both continuous and discrete case there are some numerical issues to consider. I'll have to get a better understanding of Bijectors and I'll get back after that.

@fritzo
Copy link

fritzo commented Jan 3, 2018

To clarify we don't yet have Bijejctors in torch.distributions 😄 I'm just trying to gather evidence that Bijectors would simplify lots of things. I didn't realize you were implementing Discrete Weibull; Bijectors will only handle continuous distributions.

@vishwakftw
Copy link

@ragulpr Are you implementing the Weibull distribution?

@ragulpr
Copy link
Author

ragulpr commented Jan 10, 2018

Yes, I just started

@fritzo fritzo changed the title Implement Weibull distribution? Implement Weibull distribution Jan 10, 2018
@vishwakftw
Copy link

@ragulpr @fritzo I think the Weibull distribution can now be implemented based on @ragulpr 's transformations and existing transforms. Let me know what both of you think.

@ragulpr
Copy link
Author

ragulpr commented Feb 9, 2018

Is it urgent? I haven't been able to keep up with the latest API and my implementation is slightly behind, or ahead I'm not sure.
Do you propose using a power-transform? I've been experimenting with an api generating any positive distributions pdf,cdf,survivalfunction, hazard etc based on its cumulative hazard, and it seems to work well.
If there's a current demand for the weibull I could submit something similar to currently implemented distributions.

@vishwakftw
Copy link

Oh no, it wasn't urgent. Sorry if I made it sound that way. I just was looking at a possible simplistic continuous Weibull distribution using existing transforms. I also very recently realized that the discrete Weibull is a bit harder to do too.

@ragulpr
Copy link
Author

ragulpr commented Feb 14, 2018

I'm looking into it! Will ask questions on slack 👍

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

3 participants