- Timestamp:
- 11/13/15 20:57:14 (9 years ago)
- Location:
- stable
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 12889
- Property svn:mergeinfo changed
-
stable/HeuristicLab.DataPreprocessing.Views
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.DataPreprocessing.Views merged: 12889
- Property svn:mergeinfo changed
-
stable/HeuristicLab.DataPreprocessing.Views/3.4/StatisticsView.cs
r12718 r13149 33 33 34 34 private List<List<string>> columnsRowsMatrix; 35 private readonly int COLUMNS = 1 0;35 private readonly int COLUMNS = 12; 36 36 37 37 public new StatisticsContent Content { … … 83 83 84 84 columnsRowsMatrix = new List<List<string>>(); 85 DataGridViewColumn[] columns = new DataGridViewColumn[ 10];85 DataGridViewColumn[] columns = new DataGridViewColumn[COLUMNS]; 86 86 for (int i = 0; i < COLUMNS; ++i) { 87 87 var column = new DataGridViewTextBoxColumn(); … … 99 99 columns[6].HeaderCell.Value = "std. Deviation"; 100 100 columns[7].HeaderCell.Value = "Variance"; 101 columns[8].HeaderCell.Value = "Most Common Value"; 102 columns[9].HeaderCell.Value = "Num. diff. Values"; 101 columns[8].HeaderCell.Value = "25th Percentile"; 102 columns[9].HeaderCell.Value = "75th Percentile"; 103 columns[10].HeaderCell.Value = "Most Common Value"; 104 columns[11].HeaderCell.Value = "Num. diff. Values"; 103 105 104 106 if (rowCount > 0) { … … 150 152 logic.GetStandardDeviation(columnIndex).ToString(), 151 153 logic.GetVariance(columnIndex).ToString(), 154 logic.GetOneQuarterPercentile(columnIndex).ToString(), 155 logic.GetThreeQuarterPercentile(columnIndex).ToString(), 152 156 logic.GetMostCommonValue<double>(columnIndex).ToString(), 153 157 logic.GetDifferentValuesCount<double>(columnIndex).ToString() … … 166 170 "", //standard deviation 167 171 "", //variance 172 "", //quarter percentile 173 "", //three quarter percentile 168 174 logic.GetMostCommonValue<string>(columnIndex) ?? "", 169 175 logic.GetDifferentValuesCount<string>(columnIndex).ToString() … … 178 184 logic.GetMin<DateTime>(columnIndex).ToString(), 179 185 logic.GetMax<DateTime>(columnIndex).ToString(), 180 logic.GetMedianDateTime(columnIndex).ToString(), 186 logic.GetMedianDateTime(columnIndex).ToString(), 181 187 logic.GetAverageDateTime(columnIndex).ToString(), 182 188 logic.GetStandardDeviation(columnIndex).ToString(), 183 189 logic.GetVariance(columnIndex).ToString(), //variance 190 logic.GetOneQuarterPercentile(columnIndex).ToString(), 191 logic.GetThreeQuarterPercentile(columnIndex).ToString(), 184 192 logic.GetMostCommonValue<DateTime>(columnIndex).ToString(), 185 193 logic.GetDifferentValuesCount<DateTime>(columnIndex).ToString() -
stable/HeuristicLab.DataPreprocessing/3.4
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.DataPreprocessing/3.4 merged: 12889
- Property svn:mergeinfo changed
-
stable/HeuristicLab.DataPreprocessing/3.4/Implementations/StatisticsLogic.cs
r12718 r13149 163 163 } 164 164 165 public double GetOneQuarterPercentile(int columnIndex) { 166 double percentile = double.NaN; 167 if (preprocessingData.VariableHasType<double>(columnIndex)) { 168 percentile = GetValuesWithoutNaN<double>(columnIndex).Percentile(0.25); 169 } else if (preprocessingData.VariableHasType<DateTime>(columnIndex)) { 170 percentile = GetDateTimeAsSeconds(columnIndex).Percentile(0.25); 171 } 172 return percentile; 173 } 174 175 public double GetThreeQuarterPercentile(int columnIndex) { 176 double percentile = double.NaN; 177 if (preprocessingData.VariableHasType<double>(columnIndex)) { 178 percentile = GetValuesWithoutNaN<double>(columnIndex).Percentile(0.75); 179 } else if (preprocessingData.VariableHasType<DateTime>(columnIndex)) { 180 percentile = GetDateTimeAsSeconds(columnIndex).Percentile(0.75); 181 } 182 return percentile; 183 } 184 165 185 public int GetDifferentValuesCount<T>(int columnIndex) { 166 186 return preprocessingData.GetValues<T>(columnIndex).GroupBy(x => x).Count(); -
stable/HeuristicLab.DataPreprocessing/3.4/Interfaces/IStatisticsLogic.cs
r12009 r13149 41 41 DateTime GetAverageDateTime(int columnIndex, bool considerSelection = false); 42 42 43 double GetOneQuarterPercentile(int columnIndex); 44 double GetThreeQuarterPercentile(int columnIndex); 43 45 double GetStandardDeviation(int columnIndex); 44 46 double GetVariance(int columnIndex);
Note: See TracChangeset
for help on using the changeset viewer.