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

Add pdf() implementation for 2D density #17

Closed
juliohm opened this issue Sep 17, 2017 · 8 comments
Closed

Add pdf() implementation for 2D density #17

juliohm opened this issue Sep 17, 2017 · 8 comments

Comments

@juliohm
Copy link

juliohm commented Sep 17, 2017

Could you please let me know when 2D density estimation is ready? I see that you are rewriting it.

Thanks again, I am looking forward to use your package in one of my GeoStats.jl solvers.

@joshday
Copy link
Owner

joshday commented Sep 18, 2017

I'd like to do another iteration of docs and tests before putting out a release, but 2d estimation is on master. Take a look at "latest" docs.

@juliohm
Copy link
Author

juliohm commented Sep 18, 2017

Thank you @joshday, it is working perfectly. How to evaluate the density at a given location?

@joshday
Copy link
Owner

joshday commented Sep 18, 2017

It's not implemented for bivariate (yet), only univariate:

julia> a = ash(randn(10000));

julia> pdf(a, .1)
0.37732226126422047

I'm in the middle of writing a dissertation so I probably won't get to that anytime soon, even though coding is a lot more fun.

@juliohm
Copy link
Author

juliohm commented Sep 18, 2017

I am gonna start writing my thesis very soon too. I can fully appreciate the lack of time. :)

Just curious, how the density is evaluated in ASH? What is the interpolation strategy?

@juliohm juliohm changed the title 2D density estimation Add pdf() implementation for 2D density Sep 18, 2017
@joshday
Copy link
Owner

joshday commented Sep 18, 2017

I just do linear interpolation between the density estimates in the adjacent bins of a new data point. Since bins are narrow and ASH has already smoothed things, I don't think there's anything to be gained by doing something fancy.

@juliohm
Copy link
Author

juliohm commented Sep 18, 2017

That sounds perfect, thanks for explaining it.

@ParadaCarleton
Copy link
Contributor

@joshday did this ever end up implemented? pdf doesn't seem to work.

@joshday
Copy link
Owner

joshday commented Jun 14, 2022

Sorry to say I did not work on this and won't have any time to try it in the near future.

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