JuliaStats / KernelDensity.jl

Kernel density estimators for Julia
Other
175 stars 40 forks source link

Transforms of Variables #13

Open bdeonovic opened 9 years ago

bdeonovic commented 9 years ago

Would there be any easy way to implement doing Kernel density estimation on transforms of variables? For example, I have a variable that is constrained to be between 0 and 1, it would be better for me to do the kernel density estimate of the logit of the variable or the complementary log log of the variable, obtain the fit, and then scale it by the appropriate value.

It would be nice if this was built into the package for particular transforms of interest so that packages like gadfly can use them without the user having to manually transform the variables, feed those variables to gadfly etc.

simonbyrne commented 9 years ago

That's an interesting idea, it is essentially equivalent to using a position-dependent kernel (though we don't support that either).

panlanfeng commented 8 years ago

Transforms of variable is an intuitive idea to deal with bounded data but it proves not working well. Since the inverse of logit function can amplify tiny disturbance into huge, the resulted density generally vibrates widely near the boundary. There are several ways to deal with bounded data. Using beta kernel is one of them.