Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/24/15 11:17:08 (10 years ago)
Author:
mkommend
Message:

#2276: Merged trunk changes into dataset refactoring branch.

Location:
branches/HeuristicLab.DatasetRefactor/sources
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.DatasetRefactor/sources

  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Analysis.Statistics.Views/3.3/ChartAnalysisView.cs

    r12012 r12247  
    112112
    113113    void Content_ColumnsChanged(object sender, EventArgs e) {
    114       RebuildDataTableAsync();
     114      if (!suppressUpdates) {
     115        RebuildDataTableAsync();
     116      }
    115117    }
    116118
     
    289291        double percentile25 = values.Percentile(0.25);
    290292        double percentile75 = values.Percentile(0.75);
    291         double lowerAvg = values.OrderBy(x => x).Take((int)(values.Count() * 0.25)).Average();
    292         double upperAvg = values.OrderByDescending(x => x).Take((int)(values.Count() * 0.25)).Average();
    293         double firstAvg = values.Take((int)(values.Count() * 0.25)).Average();
    294         double lastAvg = values.Skip((int)(values.Count() * 0.75)).Average();
     293        double lowerAvg = values.Count() > 4 ? values.OrderBy(x => x).Take((int)(values.Count() * 0.25)).Average() : double.NaN;
     294        double upperAvg = values.Count() > 4 ? values.OrderByDescending(x => x).Take((int)(values.Count() * 0.25)).Average() : double.NaN;
     295        double firstAvg = values.Count() > 4 ? values.Take((int)(values.Count() * 0.25)).Average() : double.NaN;
     296        double lastAvg = values.Count() > 4 ? values.Skip((int)(values.Count() * 0.75)).Average() : double.NaN;
    295297        double slope, intercept, r;
    296298        llsFitting.Calculate(values, out slope, out intercept);
  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Analysis.Statistics.Views/3.3/CorrelationView.cs

    r12012 r12247  
    5656      stringConvertibleMatrixView.Minimum = -1.0;
    5757      stringConvertibleMatrixView.Maximum = 1.0;
     58      stringConvertibleMatrixView.FormatPattern = "0.000";
    5859
    5960      methodComboBox.Items.Add(PearsonName);
     
    9798
    9899    void Content_ColumnsChanged(object sender, EventArgs e) {
    99       UpdateUI();
     100      if (!suppressUpdates) {
     101        UpdateUI();
     102      }
    100103    }
    101104
     
    212215                .Where(x => !double.IsNaN(x) && !double.IsNegativeInfinity(x) && !double.IsPositiveInfinity(x));
    213216
    214           if (!rowValues.Any() || !columnValues.Any() || i == j || rowValues.Count() != columnValues.Count()) {
     217          if (!rowValues.Any() || !columnValues.Any() || rowValues.Count() != columnValues.Count()) {
    215218            dt[i, j] = double.NaN;
     219          } else if (i == j) {
     220            dt[i, j] = 1.0;
    216221          } else {
    217222            if (methodName == PearsonName) {
  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Analysis.Statistics.Views/3.3/SampleSizeInfluenceView.cs

    r12012 r12247  
    174174        Invoke(new EventHandler(Content_ColumnNamesChanged), sender, e);
    175175      else {
    176         UpdateComboBoxes();
     176        if (!suppressUpdates) {
     177          UpdateComboBoxes();
     178        }
    177179      }
    178180    }
  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Analysis.Statistics.Views/3.3/StatisticalTestsView.cs

    r12012 r12247  
    109109
    110110    void Content_ColumnsChanged(object sender, EventArgs e) {
    111       RebuildDataTable();
     111      if (!Content.UpdateOfRunsInProgress) {
     112        RebuildDataTable();
     113      }
    112114    }
    113115
     
    277279
    278280      //alglib needs at least 5 samples for computation
    279       if (data.Any(x => x.Length <= requiredSampleSize)) {
     281      if (data.Any(x => x.Length < requiredSampleSize)) {
    280282        if (showMessage)
    281283          MessageBox.Show(this, "You need at least " + requiredSampleSize
     
    291293        return;
    292294
    293       if (data != null) {
     295      if (data != null && data.All(x => x != null)) {
    294296        MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>()
    295297          .AddOperationProgressToView(this, "Calculating...");
Note: See TracChangeset for help on using the changeset viewer.