Changeset 12151
- Timestamp:
- 03/06/15 13:26:30 (10 years ago)
- Location:
- trunk/sources
- Files:
-
- 5 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 } -
trunk/sources/HeuristicLab.Data.Views/3.3/EnhancedStringConvertibleMatrixView.cs
r12012 r12151 45 45 public double Minimum { get; set; } 46 46 47 public string FormatPattern { get; set; } 48 47 49 public new DoubleMatrix Content { 48 50 get { return (DoubleMatrix)base.Content; } … … 52 54 public EnhancedStringConvertibleMatrixView() { 53 55 InitializeComponent(); 56 FormatPattern = string.Empty; 54 57 } 55 58 … … 57 60 columnVisibility = null; 58 61 rowVisibility = null; 62 } 63 64 protected override void dataGridView_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) { 65 if (Content != null && e.RowIndex < Content.Rows && e.ColumnIndex < Content.Columns) { 66 int rowIndex = virtualRowIndices[e.RowIndex]; 67 e.Value = Content[rowIndex, e.ColumnIndex].ToString(FormatPattern); 68 } 59 69 } 60 70 -
trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs
r12077 r12151 281 281 dataGridView.Rows[e.RowIndex].ErrorText = string.Empty; 282 282 } 283 pr ivatevoid dataGridView_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) {283 protected virtual void dataGridView_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) { 284 284 if (Content != null && e.RowIndex < Content.Rows && e.ColumnIndex < Content.Columns) { 285 285 int rowIndex = virtualRowIndices[e.RowIndex]; -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.cs
r12012 r12151 48 48 protected AbstractFeatureCorrelationView() { 49 49 InitializeComponent(); 50 dataView.FormatPattern = "0.000"; 50 51 fcc = new FeatureCorrelationCalculator(); 51 52 var calculators = ApplicationManager.Manager.GetInstances<IDependencyCalculator>(); … … 115 116 dataView.Maximum = calc.Maximum; 116 117 dataView.Minimum = calc.Minimum; 118 117 119 dataView.Content = correlation; 118 120 dataView.Enabled = true; -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationCalculator.cs
r12137 r12151 139 139 IEnumerable<double> var2 = problemData.Dataset.GetDoubleValues(doubleVariableNames[j], indices); 140 140 141 elements[i, j] = Math.Round(calc.Calculate(var1, var2, out error), 3); // only show correlations to 3 digits accuracy141 elements[i, j] = calc.Calculate(var1, var2, out error); 142 142 143 143 if (!error.Equals(OnlineCalculatorError.None)) {
Note: See TracChangeset
for help on using the changeset viewer.