- Timestamp:
- 04/04/17 17:52:44 (8 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views
- Property svn:mergeinfo changed
/branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views (added) merged: 14240-14241,14248,14251,14277,14330,14351,14421,14449,14497-14499,14542,14591-14592,14762,14825
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionComparisonView.cs
r14185 r14826 80 80 81 81 IClassificationProblemData problemData = Content.ProblemData; 82 var dataset = problemData.Dataset;83 82 solutions = new List<IClassificationSolution>() { Content }; 84 solutions.AddRange(GenerateClassificationSolutions( problemData));83 solutions.AddRange(GenerateClassificationSolutions().OrderBy(s=>s.Name)); 85 84 86 85 dataGridView.ColumnCount = 4; … … 105 104 var trainingIndizes = problemData.TrainingIndices; 106 105 var originalTrainingValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, trainingIndizes); 107 var estimatedTrainingValues = solution. Model.GetEstimatedClassValues(dataset, trainingIndizes);106 var estimatedTrainingValues = solution.EstimatedTrainingClassValues; 108 107 109 108 var testIndices = problemData.TestIndices; 110 109 var originalTestValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, testIndices); 111 var estimatedTestValues = solution. Model.GetEstimatedClassValues(dataset, testIndices);110 var estimatedTestValues = solution.EstimatedTestClassValues; 112 111 113 112 OnlineCalculatorError errorState; … … 126 125 } 127 126 128 private IEnumerable<IClassificationSolution> GenerateClassificationSolutions(IClassificationProblemData problemData) { 127 protected virtual IEnumerable<IClassificationSolution> GenerateClassificationSolutions() { 128 var problemData = Content.ProblemData; 129 129 var newSolutions = new List<IClassificationSolution>(); 130 130 var zeroR = ZeroR.CreateZeroRSolution(problemData); 131 131 zeroR.Name = "ZeroR Classification Solution"; 132 132 newSolutions.Add(zeroR); 133 var oneR = OneR.CreateOneRSolution(problemData); 134 oneR.Name = "OneR Classification Solution"; 135 newSolutions.Add(oneR); 133 try { 134 var oneR = OneR.CreateOneRSolution(problemData); 135 oneR.Name = "OneR Classification Solution (all variables)"; 136 newSolutions.Add(oneR); 137 } catch (NotSupportedException) { } catch (ArgumentException) { } 136 138 try { 137 139 var lda = LinearDiscriminantAnalysis.CreateLinearDiscriminantAnalysisSolution(problemData); 138 lda.Name = "Linear Discriminant Analysis Solution ";140 lda.Name = "Linear Discriminant Analysis Solution (all variables)"; 139 141 newSolutions.Add(lda); 140 142 } catch (NotSupportedException) { } catch (ArgumentException) { }
Note: See TracChangeset
for help on using the changeset viewer.