- Timestamp:
- 01/22/14 15:31:48 (11 years ago)
- Location:
- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IStatisticsLogic.cs
r10369 r10374 15 15 double GetMedian(int columnIndex); 16 16 double GetAverage(int columnIndex); 17 T GetMostCommonValue<T>(int columnIndex);18 17 double GetStandardDeviation(int columnIndex); 19 18 double GetVariance(int columnIndex); 19 T GetMostCommonValue<T>(int columnIndex); 20 20 int GetDifferentValuesCount<T>(int columnIndex); 21 21 -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Views/StatisticsView.cs
r10371 r10374 13 13 14 14 private List<List<string>> columnsRowsMatrix; 15 private readonly int COLUMNS = 5;15 private readonly int COLUMNS = 10; 16 16 17 17 public new StatisticsContent Content { … … 45 45 txtMissingValuesTotal.Text = logic.GetMissingValueCount().ToString(); 46 46 47 DataGridViewColumn[] columns = new DataGridViewColumn[COLUMNS];48 49 47 columnsRowsMatrix = new List<List<string>>(); 50 51 52 for (int i = 0; i < logic.GetColumnCount(); ++i) { 48 DataGridViewColumn[] columns = new DataGridViewColumn[10]; 49 for (int i = 0; i < COLUMNS; ++i) { 53 50 var column = new DataGridViewTextBoxColumn(); 54 51 column.FillWeight = 1; 55 52 columns[i] = column; 53 } 56 54 55 for (int i = 0; i < logic.GetColumnCount(); ++i) { 57 56 List<string> list; 58 57 if (logic.IsType<double>(i)) { … … 65 64 list = new List<string>(); 66 65 for (int j = 0; j < COLUMNS; ++j) { 67 list.Add(" ");66 list.Add("unknown column type"); 68 67 } 69 68 } … … 94 93 95 94 private List<string> GetStringColumns(int columnIndex) { 96 return null; 95 var logic = Content.StatisticsLogic; 96 return new List<string> { 97 logic.GetColumnTypeAsString(columnIndex), 98 logic.GetMissingValueCount(columnIndex).ToString(), 99 "", //min 100 "", //max 101 "", //median 102 "", //average 103 "", //standard deviation 104 "", //variance 105 logic.GetMostCommonValue<string>(columnIndex).ToString(), 106 logic.GetDifferentValuesCount<string>(columnIndex).ToString() 107 }; 97 108 } 98 private List<string> GetDateTimeColumns(int columndIndex) { 99 return null; 109 110 private List<string> GetDateTimeColumns(int columnIndex) { 111 var logic = Content.StatisticsLogic; 112 return new List<string> { 113 logic.GetColumnTypeAsString(columnIndex), 114 logic.GetMissingValueCount(columnIndex).ToString(), 115 logic.GetMin<DateTime>(columnIndex).ToString(), 116 logic.GetMax<DateTime>(columnIndex).ToString(), 117 "", //median 118 "", //average 119 "", //standard deviation 120 "", //variance 121 logic.GetMostCommonValue<string>(columnIndex).ToString(), 122 logic.GetDifferentValuesCount<string>(columnIndex).ToString() 123 }; 100 124 } 101 125 … … 106 130 private void dataGridView_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) { 107 131 if (Content != null && e.RowIndex < columnsRowsMatrix.Count && e.ColumnIndex < Content.StatisticsLogic.GetColumnCount()) { 108 132 dataGridView[e.ColumnIndex, e.RowIndex].Value = columnsRowsMatrix[e.ColumnIndex][e.RowIndex]; 109 133 } 110 134 }
Note: See TracChangeset
for help on using the changeset viewer.