Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/05/15 14:17:33 (9 years ago)
Author:
ascheibe
Message:

#2351

  • renamed NormalDistribution class
  • added Silverman's rule of thumb for bandwidth estimation
  • made bandwidth configurable in UI
Location:
trunk/sources/HeuristicLab.Analysis/3.3
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Analysis/3.3/HeuristicLab.Analysis-3.3.csproj

    r12069 r12139  
    167167    <Compile Include="Statistics\Fitting\LinearLeastSquaresFitting.cs" />
    168168    <Compile Include="Statistics\Fitting\LogFitting.cs" />
    169     <Compile Include="Statistics\NormalDistribution.cs" />
     169    <Compile Include="Statistics\KernelDensityEstimator.cs" />
    170170    <Compile Include="Statistics\PairwiseTest.cs" />
    171171    <Compile Include="Statistics\SampleSizeDetermination.cs" />
  • trunk/sources/HeuristicLab.Analysis/3.3/Statistics/KernelDensityEstimator.cs

    r12135 r12139  
    2626
    2727namespace HeuristicLab.Analysis.Statistics {
    28   public static class NormalDistribution {
     28  public static class KernelDensityEstimator {
    2929    public static double[] Density(double[] x, double mean, double stdDev) {
    3030      return x.Select(xi => Density(xi, mean, stdDev)).ToArray();
     
    3636                             (2.0 * Math.Pow(stdDev, 2.0))));
    3737    }
    38 
    3938
    4039    // the scale (sigma) of the kernel is a parameter
     
    6261      return newX.Zip(y, Tuple.Create).ToList();
    6362    }
     63
     64    //Silverman's rule of thumb for bandwidth estimation (sigma)
     65    public static double EstimateBandwidth(double[] x) {
     66      return 1.06 * x.StandardDeviation() * Math.Pow(x.Length, -0.2);
     67    }
    6468  }
    6569}
Note: See TracChangeset for help on using the changeset viewer.