Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/05/15 17:29:35 (9 years ago)
Author:
ascheibe
Message:

#2031 merged revisions 11703,11704,11705,11706,11715,11717,11725,11757,11837,11914 into stable

Location:
stable
Files:
4 edited
6 copied

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Analysis

  • stable/HeuristicLab.Analysis/3.3/DataVisualization/DataRow.cs

    r11170 r11919  
    7676      this.values = new ObservableList<double>(original.values);
    7777    }
     78    public DataRow() : this("DataRow") { }
    7879    public DataRow(string name)
    7980      : base(name) {
     
    116117      OnVisualPropertiesChanged();
    117118    }
     119    protected override void OnNameChanged() {
     120      base.OnNameChanged();
     121      VisualProperties.DisplayName = Name;
     122    }
    118123  }
    119124}
  • stable/HeuristicLab.Analysis/3.3/HeuristicLab.Analysis-3.3.csproj

    r11859 r11919  
    153153    <Compile Include="QualityAnalysis\QualityDistributionAnalyzer.cs" />
    154154    <Compile Include="QualityAnalysis\ScaledQualityDifferenceAnalyzer.cs" />
     155    <Compile Include="Statistics\BonferroniHolm.cs" />
     156    <Compile Include="Statistics\EnumerableStatisticsExtension.cs" />
     157    <Compile Include="Statistics\Fitting\ExpFitting.cs" />
     158    <Compile Include="Statistics\Fitting\IFitting.cs" />
     159    <Compile Include="Statistics\KruskalWallisTest.cs" />
     160    <Compile Include="Statistics\Fitting\LinearLeastSquaresFitting.cs" />
     161    <Compile Include="Statistics\Fitting\LogFitting.cs" />
    155162    <Compile Include="Statistics\NormalDistribution.cs" />
     163    <Compile Include="Statistics\PairwiseTest.cs" />
     164    <Compile Include="Statistics\SampleSizeDetermination.cs" />
    156165    <Compile Include="ValueAnalysis\SingleValueAnalyzer.cs" />
    157166    <Compile Include="ValueAnalysis\MinAverageMaxValueAnalyzer.cs" />
  • stable/HeuristicLab.Analysis/3.3/Statistics/BonferroniHolm.cs

    r11706 r11919  
    4141        pValuesIndizes.Add(i, pValues[i]);
    4242      }
    43       var sortedPValues = pValuesIndizes.OrderBy(x => x.Value);
     43      var sortedPValues = pValuesIndizes.OrderBy(x => x.Value).ToArray();
    4444
    4545      for (int i = 1; i < k + 1; i++) {
    4646        alphaNiveau[i - 1] = globalAlpha / (k - i + 1);
    47         int idx = sortedPValues.ElementAt(i - 1).Key;
     47        int idx = sortedPValues[i - 1].Key;
    4848
    4949        if (i == 1) {
    5050          //true means reject
    51           decision[idx] = sortedPValues.ElementAt(i - 1).Value < alphaNiveau[i - 1];
    52           adjustedPValues[idx] = sortedPValues.ElementAt(i - 1).Value * (k - i + 1);
     51          decision[idx] = sortedPValues[i - 1].Value < alphaNiveau[i - 1];
     52          adjustedPValues[idx] = sortedPValues[i - 1].Value * (k - i + 1);
    5353        } else {
    54           decision[idx] = decision[sortedPValues.ElementAt(i - 2).Key] ? (sortedPValues.ElementAt(i - 1).Value < alphaNiveau[i - 1]) : false;
    55           adjustedPValues[idx] = Math.Max(adjustedPValues[sortedPValues.ElementAt(i - 2).Key], sortedPValues.ElementAt(i - 1).Value * (k - i + 1));
     54          decision[idx] = decision[sortedPValues[i - 2].Key] && (sortedPValues[i - 1].Value < alphaNiveau[i - 1]);
     55          adjustedPValues[idx] = Math.Max(adjustedPValues[sortedPValues[i - 2].Key], sortedPValues[i - 1].Value * (k - i + 1));
    5656        }
    5757        if (adjustedPValues[idx] > 1.0) {
  • stable/HeuristicLab.Analysis/3.3/Statistics/EnumerableStatisticsExtension.cs

    r11706 r11919  
    2828  public static class EnumerableStatisticExtensions {
    2929    public static Tuple<double, double> ConfidenceIntervals(this IEnumerable<double> values, double alpha) {
    30       if (values.Count() <= 1) return new Tuple<double, double>(double.NaN, double.NaN);
     30      return ConfidenceIntervals(values.ToArray(), alpha);
     31    }
    3132
     33    public static Tuple<double, double> ConfidenceIntervals(this double[] values, double alpha) {
    3234      double lower, upper;
     35      int n = values.Length;
     36      if (n <= 1) return new Tuple<double, double>(double.NaN, double.NaN);
     37
    3338      double s = values.StandardDeviation();
    3439      double x = values.Average();
    35       int n = values.Count();
    3640      double t = alglib.invstudenttdistribution(n - 1, (1.0 - alpha) / 2.0);
    3741
  • stable/HeuristicLab.Analysis/3.3/Statistics/SampleSizeDetermination.cs

    r11706 r11919  
    3636      if (conf < 0.0 || conf > 1.0) throw new ArgumentException("The confidence interval must be between zero and one.");
    3737
    38       var confInterval = samples.ConfidenceIntervals(0.95);
     38      var confInterval = samples.ConfidenceIntervals(conf);
    3939      double e = (confInterval.Item2 - confInterval.Item1) / 2;
    4040      double s = samples.StandardDeviation();
     
    4343
    4444      double result = Math.Pow(s, 2) / ((Math.Pow(e, 2) / Math.Pow(z, 2)) + (Math.Pow(s, 2) / n));
    45 
    46       result = Math.Ceiling(result);
    47       if (result > int.MaxValue)
    48         return int.MaxValue;
    49       else
    50         return (int)result;
    51     }
    52 
    53     public static int DetermineSampleSizeByEstimatingMeanForLargeSampleSizes(double[] samples, double conf = 0.95) {
    54       if (conf < 0.0 || conf > 1.0) throw new ArgumentException("The confidence interval must be between zero and one.");
    55 
    56       var confInterval = samples.ConfidenceIntervals(0.95);
    57       double e = (confInterval.Item2 - confInterval.Item1) / 2;
    58       double s = samples.StandardDeviation();
    59       double z = alglib.invnormaldistribution((conf + 1) / 2);
    60 
    61       double result = Math.Pow(z, 2) * (Math.Pow(s, 2) / Math.Pow(e, 2));
    6245
    6346      result = Math.Ceiling(result);
Note: See TracChangeset for help on using the changeset viewer.