Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/06/15 13:26:30 (9 years ago)
Author:
mkommend
Message:

#2352: Reverse merged r12137 and implemented a format pattern for the EnhancedStringConvertibleMatrixView.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Analysis.Statistics.Views/3.3/CorrelationView.cs

    r12137 r12151  
    5656      stringConvertibleMatrixView.Minimum = -1.0;
    5757      stringConvertibleMatrixView.Maximum = 1.0;
     58      stringConvertibleMatrixView.FormatPattern = "0.000";
    5859
    5960      methodComboBox.Items.Add(PearsonName);
     
    216217          if (!rowValues.Any() || !columnValues.Any() || rowValues.Count() != columnValues.Count()) {
    217218            dt[i, j] = double.NaN;
    218           } else if (i == j) {
    219             dt[i, j] = 1.0;
    220219          } else {
    221220            if (methodName == PearsonName) {
    222               dt[i, j] = Math.Round(alglib.pearsoncorr2(rowValues.ToArray(), columnValues.ToArray()), 3); // for correlations it is usually sufficient to show only 3 digits
     221              dt[i, j] = alglib.pearsoncorr2(rowValues.ToArray(), columnValues.ToArray());
    223222            } else {
    224               dt[i, j] = Math.Round(alglib.spearmancorr2(rowValues.ToArray(), columnValues.ToArray()), 3); // for correlations it is usually sufficient to show only 3 digits
     223              dt[i, j] = alglib.spearmancorr2(rowValues.ToArray(), columnValues.ToArray());
    225224            }
    226225          }
Note: See TracChangeset for help on using the changeset viewer.