Menu

How can I use a kernel density estimator?

Help
iskren_g
2005-08-03
2013-02-10
  • iskren_g

    iskren_g - 2005-08-03

    I would like to fit my data using kernel density estimator. However, it is hard for me to understand how to implement that in gnuplot. Particularly, I would like to use the Epanechnikov kernel.

     
    • Hans-Bernhard Broeker

      gnuplot's "fit" command is not designed nor meant to be used for heavy-duty data analysis.  I suggest you use octave or some other matlab-alike, or maybe a computer algebra system, instead.

       
    • iskren_g

      iskren_g - 2005-08-03

      I'm sorry, I miss-used the word fit. My aim is to plot a curve of the density distribution of my data (number density vs data points) using the mentioned kernel as density estimator. The kernel is the following:
      K(t)=(3/4)*(1-t**2) for -1<t<1 where t=X-Xi
      >K(t)=(-1<t && t<1) ? (3/4)*(1-t**2) : 0
      I think this should be the declaration, but how to read the real data column and include the condition?
      I wanted to perform this task under gnuplot and because of other reason. A frend of mine realised it in SuperMongo script and now claims that SuperMongo is better than Gnuplot, with wich I totally disagree. There should be a way to implement this.
      Well, if it is that hard, I'll have to give up and admit his win :(

      Any way, thanks a lot for your readiness to answer such a questions.

      Cheers,
      Iskren

       
      • Hans-Bernhard Broeker

        Gnuplot doesn't do filter kernels.  They would require summation over several input data points, weighted by that kernel function.

        gnuplot does try to stick with the Unix philosophy, i.e. "one tool <--> one task".  It's not our task to implement heavy numerical algorithms.  The fact that we implement 'fit' already took some non-trivial justification.

         

Log in to post a comment.