-
Notifications
You must be signed in to change notification settings - Fork 7
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
Help with the documentation #67
Comments
Hi @claudio20497 , Thanks for posting and suggestions. I will add as soon I can, but in the mean time:
# build a random kde object
X = kde!(randn(2,100))
# eval on the objection itself to get pdf density values
densities = X(5*rand(2,10))
# see plotting at KernelDensityEstimatePlotting.jl for examples |
Hello @dehann , Thank you very much for the detailed answer. So concerning point 3, if I understood correctly, if I sample from - say - a bivariate distribution of two correlated variables, and then call EDIT: I did some experimenting: using Distributions, KernelDensityEstimate, Plots
# generate correlated data
x = rand(Uniform(-10, 10), 1000)
y = x .^ 2
data = Array(hcat(x,y)')
# fit a kde on them
p_corr = kde!(data )
# sample from the kde
sample_p_corr = rand(p_corr, 100)
# plot the data together with the sample
sorted_sample_p_corr = sample_p_corr[sortperm(sample_p_corr[:, 1]), :]
sorted_data = data[sortperm(data[:,1]), :]
plot(sorted_data[:,1],sorted_data[:,2], lw = 3)
plot!(sorted_sample_p_corr[:,1], sorted_sample_p_corr[:,2] , lw = 3 )
# and note that they coincide very well
So the answer I think is: Yes, correlations are conserved. |
That's correct, the correlations are conserved. This remains true even though the individual kernel bandwidths that make up the kde use diagonal only values. Also note KernelDesityEstimatePlotting package exists with useful function |
I just wanted to step in and mention that I discovered this package today, it looks quite nice, but I think lack of documentation is going to make it quite difficult for me to use. Even a link to a review of the algorithms involved would be enormously helpful, coming in cold it's very unclear what most of these methods are doing. |
Hello,
I am interested in using your package, but I am not a domain expert in kde estimation or products of them.
From the ReadMe it is not clear to me what methods I may call on a BallTreeDensity. For example, I noted that calling
rand
on a BallTreeDensity like this:actually works.
resample
method do?p
from before):Regarding question 4. , I saw this, but I didn't really understand.
Great package!
Thanks in advance
The text was updated successfully, but these errors were encountered: