Changeset 14474 for branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.cs
- Timestamp:
- 12/12/16 11:17:07 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.cs
r14459 r14474 62 62 } else { 63 63 dt.VisualProperties.Title = variableName; 64 //var valuesPerClass = row.Values.Zip(Classification, (value, @class) => new { value, @class }) 65 // .GroupBy(x => x.@class) 66 // .ToDictionary(x => x.Key, x => x.Select(v => v.value)); 67 var valuesPerClass = row.Values.Select((i, index) => new { i, j = Classification.ToList()[index] }) 68 .GroupBy((x) => x.j) 69 .ToDictionary(x => x.Key, x => x.Select(v => v.i) 70 .ToList()); 64 var valuesPerClass = row.Values.Zip(Classification, (value, @class) => new { value, @class }) 65 .GroupBy(x => x.@class) 66 .ToDictionary(x => x.Key, x => x.Select(v => v.value)); 71 67 foreach (var entry in valuesPerClass) { 72 var classRow = new DataRow( entry.Key.ToString());68 var classRow = new DataRow(string.Format("{0} ({1})", classifierComboBox.SelectedItem, entry.Key)); 73 69 classRow.VisualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Histogram; 74 70 classRow.Values.AddRange(entry.Value);
Note: See TracChangeset
for help on using the changeset viewer.