Free cookie consent management tool by TermsFeed Policy Generator

# Changeset 11699

Ignore:
Timestamp:
12/19/14 12:46:06 (9 years ago)
Message:
• fixed confidence intervals calculation
• some cosmetic changes
Location:
branches/StatisticalTesting
Files:
6 edited
1 moved

Unmodified
Removed
• ## branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/EnumerableStatisticsExtension.cs

 r11375 double x = values.Average(); int n = values.Count(); double t = alglib.studenttdistribution(n - 1, 1 - (alpha / 2)); double t = alglib.invstudenttdistribution(n - 1, (1.0 - alpha) / 2.0); lower = x - t * (s / Math.Sqrt(n)); upper = x + t * (s / Math.Sqrt(n)); lower = x + t * (s / Math.Sqrt(n)); upper = x - t * (s / Math.Sqrt(n)); return new Tuple(lower, upper); } // Bessel corrected variance public static double EstimatedVariance(this IEnumerable values) { double n = values.Count(); return values.Variance() * n / (n - 1); } // Bessel corrected standard deviation public static double EstimatedStandardDeviation(this IEnumerable values) { double n = values.Count(); return values.StandardDeviation() * n / (n - 1); } } }
• ## branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/KruskalWallisTest.cs

 r11692 using System; using System.Collections.Generic; using HeuristicLab.Common; namespace HeuristicLab.Analysis.Statistics { int cnt = 0; for (int i = 0; i < r.Length; i++) { if (lastG == g[i]) { if (lastG.IsAlmost(g[i])) { curSum += r[i]; cnt++; for (int i = 1; i < x.Length; i++) { if (last != x[i]) { if (!last.IsAlmost(x[i])) { number.Add(x[i]); last = x[i];
• ## branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/LinearLeastSquaresFitting.cs

 r11375 public double CalculateError(double[] dataPoints, double p0, double p1) { double r = 0.0; double r; double avgy = dataPoints.Average(); double sstot = 0.0;
• ## branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/LogFitting.cs

 r11375 public class LogFitting : IFitting { private void LogFunc(double[] c, double[] x, ref double func, object obj) { func = c[0] * System.Math.Exp(c[1] / x[0]); func = c[0] * Math.Exp(c[1] / x[0]); } for (int i = 0; i < stdX.Count(); i++) { newRow.Values.Add(c0 * System.Math.Exp(c1 / stdX[i])); newRow.Values.Add(c0 * Math.Exp(c1 / stdX[i])); } for (int i = 0; i < x.Count(); i++) { newRow.Values.Add(c0 * System.Math.Exp(c1 / x[i])); newRow.Values.Add(c0 * Math.Exp(c1 / x[i])); }
• ## branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/SampleSizeDetermination.cs

 r11692 var confInterval = samples.ConfidenceIntervals(0.95); double e = (confInterval.Item2 - confInterval.Item1) / 2; double s = samples.EstimatedStandardDeviation(); double s = samples.StandardDeviation(); double z = alglib.invnormaldistribution((conf + 1) / 2); double n = samples.Count(); var confInterval = samples.ConfidenceIntervals(0.95); double e = (confInterval.Item2 - confInterval.Item1) / 2; double s = samples.EstimatedStandardDeviation(); double s = samples.StandardDeviation(); double z = alglib.invnormaldistribution((conf + 1) / 2);
• ## branches/StatisticalTesting/Statistics.UnitTests/Statistics.UnitTests.csproj

 r11625
Note: See TracChangeset for help on using the changeset viewer.