Changeset 9330
- Timestamp:
- 03/21/13 16:47:39 (12 years ago)
- Location:
- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views-3.3.csproj
r9328 r9330 119 119 </ItemGroup> 120 120 <ItemGroup> 121 <Compile Include="SampleSizeChecker.cs"> 122 <SubType>UserControl</SubType> 123 </Compile> 124 <Compile Include="SampleSizeChecker.designer.cs"> 125 <DependentUpon>SampleSizeChecker.cs</DependentUpon> 126 </Compile> 121 127 <Compile Include="SampleSizeDetermination.cs" /> 122 128 <Compile Include="StatisticalTestingView.cs"> -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/KruskalWallis.cs
r9316 r9330 24 24 25 25 namespace HeuristicLab.Analysis.AlgorithmBehavior.Analyzers { 26 // Kruskal Wallis test based on R's kruskal.test()27 26 public class KruskalWallis { 27 /// <summary> 28 /// Performs the Kruskal-Wallis test and returns the p-Value. 29 /// (source based on R's kruskal.test()) 30 /// </summary> 28 31 public static double Test(double[][] data) { 29 32 double[] g; … … 78 81 } 79 82 80 p ublicstatic double[] FlattenArray(double[][] x, out double[] indizes) {83 private static double[] FlattenArray(double[][] x, out double[] indizes) { 81 84 int compLenght = 0; 82 85 for (int i = 0; i < x.Length; i++) { … … 100 103 } 101 104 102 p ublicstatic double[][] CountDuplicates(double[] x) {105 private static double[][] CountDuplicates(double[] x) { 103 106 List<double> number = new List<double>(); 104 107 List<double> cnt = new List<double>(); … … 129 132 } 130 133 131 p ublicstatic int[] Rank(double[] x) {134 private static int[] Rank(double[] x) { 132 135 double[] keys = new double[x.Length]; 133 136 int[] items = new int[x.Length]; -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/SampleSizeDetermination.cs
r9329 r9330 38 38 double result = 0; 39 39 40 double var = samples. Variance();41 double n = alglib. normaldistribution((conf + 1) / 2);40 double var = samples.StandardDeviation(); 41 double n = alglib.invnormaldistribution((conf + 1) / 2); 42 42 result = Math.Pow(n, 2) * Math.Pow(var, 2) / Math.Pow(e, 2); 43 return (int)Math.Ceiling(result); 43 result = Math.Ceiling(result); 44 if (result > int.MaxValue) 45 return int.MaxValue; 46 else 47 return (int)result; 44 48 } 45 49
Note: See TracChangeset
for help on using the changeset viewer.