- Timestamp:
- 06/27/12 17:34:17 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionEstimatedClassValuesView.cs
r7259 r8139 73 73 } 74 74 75 int[] indi zes;75 int[] indices; 76 76 double[] estimatedClassValues; 77 77 78 78 switch (SamplesComboBox.SelectedItem.ToString()) { 79 79 case SamplesComboBoxAllSamples: { 80 indi zes = Enumerable.Range(0, Content.ProblemData.Dataset.Rows).ToArray();80 indices = Enumerable.Range(0, Content.ProblemData.Dataset.Rows).ToArray(); 81 81 estimatedClassValues = Content.EstimatedClassValues.ToArray(); 82 82 break; 83 83 } 84 84 case SamplesComboBoxTrainingSamples: { 85 indi zes = Content.ProblemData.TrainingIndizes.ToArray();85 indices = Content.ProblemData.TrainingIndices.ToArray(); 86 86 estimatedClassValues = Content.EstimatedTrainingClassValues.ToArray(); 87 87 break; 88 88 } 89 89 case SamplesComboBoxTestSamples: { 90 indi zes = Content.ProblemData.TestIndizes.ToArray();90 indices = Content.ProblemData.TestIndices.ToArray(); 91 91 estimatedClassValues = Content.EstimatedTestClassValues.ToArray(); 92 92 break; … … 98 98 int classValuesCount = Content.ProblemData.ClassValues.Count; 99 99 int solutionsCount = Content.ClassificationSolutions.Count(); 100 string[,] values = new string[indi zes.Length, 5 + classValuesCount + solutionsCount];100 string[,] values = new string[indices.Length, 5 + classValuesCount + solutionsCount]; 101 101 double[] target = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray(); 102 List<List<double?>> estimatedValuesVector = GetEstimatedValues(SamplesComboBox.SelectedItem.ToString(), indi zes,102 List<List<double?>> estimatedValuesVector = GetEstimatedValues(SamplesComboBox.SelectedItem.ToString(), indices, 103 103 Content.ClassificationSolutions); 104 104 105 for (int i = 0; i < indi zes.Length; i++) {106 int row = indi zes[i];105 for (int i = 0; i < indices.Length; i++) { 106 int row = indices[i]; 107 107 values[i, 0] = row.ToString(); 108 108 values[i, 1] = target[i].ToString(); -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionConfusionMatrixView.cs
r7259 r8139 107 107 double[] predictedValues; 108 108 if (cmbSamples.SelectedItem.ToString() == TrainingSamples) { 109 rows = Content.ProblemData.TrainingIndi zes;109 rows = Content.ProblemData.TrainingIndices; 110 110 predictedValues = Content.EstimatedTrainingClassValues.ToArray(); 111 111 } else if (cmbSamples.SelectedItem.ToString() == TestSamples) { 112 rows = Content.ProblemData.TestIndi zes;112 rows = Content.ProblemData.TestIndices; 113 113 predictedValues = Content.EstimatedTestClassValues.ToArray(); 114 114 } else throw new InvalidOperationException(); -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionEstimatedClassValuesView.cs
r7259 r8139 96 96 var estimatedTraining = Content.EstimatedTrainingClassValues.GetEnumerator(); 97 97 estimatedTraining.MoveNext(); 98 foreach (var trainingRow in Content.ProblemData.TrainingIndi zes) {98 foreach (var trainingRow in Content.ProblemData.TrainingIndices) { 99 99 values[trainingRow, 3] = estimatedTraining.Current.ToString(); 100 100 estimatedTraining.MoveNext(); … … 102 102 var estimatedTest = Content.EstimatedTestClassValues.GetEnumerator(); 103 103 estimatedTest.MoveNext(); 104 foreach (var testRow in Content.ProblemData.TestIndi zes) {104 foreach (var testRow in Content.ProblemData.TestIndices) { 105 105 values[testRow, 4] = estimatedTest.Current.ToString(); 106 106 estimatedTest.MoveNext(); -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationRocCurvesView.cs
r7259 r8139 101 101 102 102 if (cmbSamples.SelectedItem.ToString() == TrainingSamples) { 103 rows = Content.ProblemData.TrainingIndi zes;103 rows = Content.ProblemData.TrainingIndices; 104 104 } else if (cmbSamples.SelectedItem.ToString() == TestSamples) { 105 rows = Content.ProblemData.TestIndi zes;105 rows = Content.ProblemData.TestIndices; 106 106 } else throw new InvalidOperationException(); 107 107 -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionThresholdView.cs
r7259 r8139 137 137 var targetValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToList(); 138 138 139 foreach (int row in Content.ProblemData.TrainingIndi zes) {139 foreach (int row in Content.ProblemData.TrainingIndices) { 140 140 double estimatedValue = estimatedValues[row]; 141 141 double targetValue = targetValues[row]; … … 150 150 } 151 151 152 foreach (int row in Content.ProblemData.TestIndi zes) {152 foreach (int row in Content.ProblemData.TestIndices) { 153 153 double estimatedValue = estimatedValues[row]; 154 154 double targetValue = targetValues[row];
Note: See TracChangeset
for help on using the changeset viewer.