Changeset 6766
- Timestamp:
- 09/15/11 09:52:33 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/RunCollectionVariableImpactView.cs
r6709 r6766 103 103 where r.Parameters.ContainsKey(numberOfFoldsParameterName) 104 104 select r; 105 var selectedFolds = from r in cvRuns 106 let foldCollection = (RunCollection)r.Results[crossValidationFoldsResultName] 107 select (IRun)foldCollection.ElementAt((int)comboBox.SelectedItem).Clone(); 108 matrixView.Content = CalculateVariableImpactMatrix(selectedFolds.ToArray(), cvRuns.Select(r => r.Name).ToArray()); 105 if (comboBox.SelectedIndex == 0) { 106 var selectedFolds = cvRuns.SelectMany(r => (RunCollection)r.Results[crossValidationFoldsResultName]); 107 matrixView.Content = CalculateVariableImpactMatrix(selectedFolds.ToArray()); 108 } else { 109 var selectedFolds = from r in cvRuns 110 let foldCollection = (RunCollection)r.Results[crossValidationFoldsResultName] 111 select (IRun)foldCollection.ElementAt(comboBox.SelectedIndex - 1).Clone(); 112 matrixView.Content = CalculateVariableImpactMatrix(selectedFolds.ToArray(), cvRuns.Select(r => r.Name).ToArray()); 113 } 109 114 } 110 115 } … … 124 129 if (cvRuns.All(r => ((IntValue)r.Parameters[numberOfFoldsParameterName]).Value == nFolds)) { 125 130 // populate combobox 131 comboBox.Items.Add("Overall"); 126 132 for (int foldIndex = 0; foldIndex < nFolds; foldIndex++) { 127 comboBox.Items.Add( foldIndex);133 comboBox.Items.Add("Fold " + foldIndex); 128 134 } 135 comboBox.SelectedIndex = 0; 129 136 comboBox.Enabled = true; 130 var selectedFolds = from r in cvRuns 131 let foldCollection = (RunCollection)r.Results[crossValidationFoldsResultName] 132 select foldCollection.First(); 133 matrixView.Content = CalculateVariableImpactMatrix(selectedFolds.ToArray(), cvRuns.Select(f => f.Name).ToArray()); 137 var selectedFolds = cvRuns.SelectMany(r => (RunCollection)r.Results[crossValidationFoldsResultName]); 138 matrixView.Content = CalculateVariableImpactMatrix(selectedFolds.ToArray()); 134 139 } else { 135 140 matrixView.Content = null;
Note: See TracChangeset
for help on using the changeset viewer.