Changeset 12151 for trunk/sources/HeuristicLab.Analysis.Statistics.Views
- Timestamp:
- 03/06/15 13:26:30 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Analysis.Statistics.Views/3.3/CorrelationView.cs
r12137 r12151 56 56 stringConvertibleMatrixView.Minimum = -1.0; 57 57 stringConvertibleMatrixView.Maximum = 1.0; 58 stringConvertibleMatrixView.FormatPattern = "0.000"; 58 59 59 60 methodComboBox.Items.Add(PearsonName); … … 216 217 if (!rowValues.Any() || !columnValues.Any() || rowValues.Count() != columnValues.Count()) { 217 218 dt[i, j] = double.NaN; 218 } else if (i == j) {219 dt[i, j] = 1.0;220 219 } else { 221 220 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 digits221 dt[i, j] = alglib.pearsoncorr2(rowValues.ToArray(), columnValues.ToArray()); 223 222 } else { 224 dt[i, j] = Math.Round(alglib.spearmancorr2(rowValues.ToArray(), columnValues.ToArray()), 3); // for correlations it is usually sufficient to show only 3 digits223 dt[i, j] = alglib.spearmancorr2(rowValues.ToArray(), columnValues.ToArray()); 225 224 } 226 225 }
Note: See TracChangeset
for help on using the changeset viewer.