Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/05/15 10:38:34 (9 years ago)
Author:
gkronber
Message:

#2351: sigma as parameter of the density estimation routine

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Analysis/3.3/Statistics/NormalDistribution.cs

    r12134 r12135  
    3737    }
    3838
    39     // based on the idea from http://www.statmethods.net/graphs/density.html
    40     public static List<Tuple<double, double>> Density(double[] x, int nrOfPoints, double stepWidth) {
     39
     40    // the scale (sigma) of the kernel is a parameter
     41    public static List<Tuple<double, double>> Density(double[] x, int nrOfPoints, double stepWidth, double sigma = 1.0) {
    4142      // calculate grid for which to estimate the density
    4243      double[] newX = new double[nrOfPoints];
     
    5354      }
    5455
    55       // the scale (std.-dev. of the kernel is a parameter)
    56       var sigma = 1.0; // TODO allow configuration in the view
    5756      // for each of the points for which we want to calculate the density
    5857      // we sum up all the densities of the observed points assuming they are at the center of a normal distribution
Note: See TracChangeset for help on using the changeset viewer.