Changeset 8522 for branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/RunCollectionStatisticalTabularView.cs
- Timestamp:
- 08/23/12 15:05:30 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/RunCollectionStatisticalTabularView.cs
r8521 r8522 156 156 string rowName = (string)dataRowComboBox.SelectedItem; 157 157 158 string[] columnNames = new string[] { "Count", "Minimum", "Maximum", "Average", "Median", "Standard Deviation", "Variance", "25th Percentile", "75th Percentile", "Gradient", " AbsolutError" };158 string[] columnNames = new string[] { "Count", "Minimum", "Maximum", "Average", "Median", "Standard Deviation", "Variance", "25th Percentile", "75th Percentile", "Gradient", "Relative Error" }; 159 159 160 160 var runs = Content.Where(x => x.Results.ContainsKey(resultName)); … … 200 200 stringConvertibleMatrixView.Content = dt; 201 201 } 202 203 private void addLineToChart_Click(object sender, EventArgs e) { 204 string resultName = (string)dataTableComboBox.SelectedItem; 205 string rowName = (string)dataRowComboBox.SelectedItem; 206 var runs = Content.Where(x => x.Results.ContainsKey(resultName)); 207 208 foreach (Run run in runs) { 209 DataTable resTable = (DataTable)run.Results[resultName]; 210 DataRow row = resTable.Rows[rowName]; 211 var values = row.Values.ToArray(); 212 double k, d; 213 LinearLeastSquaresFitting.Calculate(values, out k, out d); 214 215 DataRow newRow = new DataRow(row.Name + " Fitted Line"); 216 for (int i = 0; i < values.Count(); i++) { 217 newRow.Values.Add(k * i + d); 218 } 219 220 if (!resTable.Rows.ContainsKey(newRow.Name)) 221 resTable.Rows.Add(newRow); 222 } 223 } 202 224 } 203 225 }
Note: See TracChangeset
for help on using the changeset viewer.