Changeset 12487 for branches/SensitivityEvaluator/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification
- Timestamp:
- 06/22/15 16:55:29 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SensitivityEvaluator/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveWeightedPerformanceMeasuresEvaluator.cs
r12418 r12487 119 119 120 120 //calculate performance measures 121 var model = (ISymbolicDiscriminantFunctionClassificationModel)modelCreator.CreateSymbolicClassificationModel(solution, interpreter, lowerEstimationLimit, upperEstimationLimit);122 121 string positiveClassName = problemData.PositiveClass; 123 122 double[] classValues, thresholds; 124 model.ThresholdCalculator.Calculate(problemData, boundedEstimatedValues, targetClassValues, out classValues, out thresholds); 125 model.SetThresholdsAndClassValues(thresholds, classValues); 123 IEnumerable<double> estimatedClassValues = null; 124 ISymbolicDiscriminantFunctionClassificationModel m; 125 126 var model = modelCreator.CreateSymbolicClassificationModel(solution, interpreter, lowerEstimationLimit, upperEstimationLimit); 127 if ((m = model as ISymbolicDiscriminantFunctionClassificationModel) != null) { 128 m.ThresholdCalculator.Calculate(problemData, boundedEstimatedValues, targetClassValues, out classValues, out thresholds); 129 m.SetThresholdsAndClassValues(thresholds, classValues); 130 estimatedClassValues = m.GetEstimatedClassValues(boundedEstimatedValues); 131 } else { 132 model.RecalculateModelParameters(problemData, rows); 133 estimatedClassValues = model.GetEstimatedClassValues(problemData.Dataset, rows); 134 } 126 135 var performanceCalculator = new ClassificationPerformanceMeasuresCalculator(positiveClassName, problemData.GetClassValue(positiveClassName)); 127 var estimatedClassValues = model.GetEstimatedClassValues(boundedEstimatedValues);128 136 performanceCalculator.Calculate(targetClassValues, estimatedClassValues); 129 137 if (performanceCalculator.ErrorState != OnlineCalculatorError.None)
Note: See TracChangeset
for help on using the changeset viewer.