Changeset 12139 for trunk/sources/HeuristicLab.Analysis
- Timestamp:
- 03/05/15 14:17:33 (10 years ago)
- 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 167 167 <Compile Include="Statistics\Fitting\LinearLeastSquaresFitting.cs" /> 168 168 <Compile Include="Statistics\Fitting\LogFitting.cs" /> 169 <Compile Include="Statistics\ NormalDistribution.cs" />169 <Compile Include="Statistics\KernelDensityEstimator.cs" /> 170 170 <Compile Include="Statistics\PairwiseTest.cs" /> 171 171 <Compile Include="Statistics\SampleSizeDetermination.cs" /> -
trunk/sources/HeuristicLab.Analysis/3.3/Statistics/KernelDensityEstimator.cs
r12135 r12139 26 26 27 27 namespace HeuristicLab.Analysis.Statistics { 28 public static class NormalDistribution{28 public static class KernelDensityEstimator { 29 29 public static double[] Density(double[] x, double mean, double stdDev) { 30 30 return x.Select(xi => Density(xi, mean, stdDev)).ToArray(); … … 36 36 (2.0 * Math.Pow(stdDev, 2.0)))); 37 37 } 38 39 38 40 39 // the scale (sigma) of the kernel is a parameter … … 62 61 return newX.Zip(y, Tuple.Create).ToList(); 63 62 } 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 } 64 68 } 65 69 }
Note: See TracChangeset
for help on using the changeset viewer.