On Tue, Feb 13, 2018 at 01:30:42PM +0000, Angelo DI SENA wrote:
> I'm trying to "translate" a complex matlab script in C++ using armadillo.
> I implemented some functions that are not present in armadillo, but I'm
> currently blocked with ksdensity
> In particular I need to use ksdensity with the following parameters
> [ky kx] = ksdensity(vector,pts,'function','cdf');
> for probability density estimate.
> Is there any implementation of such function using mlpack/armadillo?
It has been a long-standing open issue to implement fast tree-based
kernel density estimation: https://github.com/mlpack/mlpack/issues/150
But unfortunately there is no implementation available today.
However, if you are just looking for something simple (if vector or pts
is not too big), you can write a loop over all of the points in 'pts' to
calculate the normal distribution value. There may be a little bit of
complexity involved---I don't know if ksdensity() does auto-tuning of
the bandwidth to be used, etc. (I have not used it before).
One class that may help in mlpack is the GaussianDistribution class in
I hope this helps; let me know if I can clarify anything.
Ryan Curtin | "Oh man, I shot Marvin in the face."
r...@ratml.org | - Vincent
mlpack mailing list