- Timestamp:
- 08/31/12 13:52:24 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveTrainingBestSolutionAnalyzer.cs
r8531 r8550 79 79 if (ApplyLinearScaling.Value) SymbolicDiscriminantFunctionClassificationModel.Scale(model, ProblemDataParameter.ActualValue); 80 80 81 SymbolicDiscriminantFunctionClassificationModel.SetAccuracyMaximizingThresholds(model,ProblemDataParameter.ActualValue);81 model.SetAccuracyMaximizingThresholds(ProblemDataParameter.ActualValue); 82 82 return new SymbolicDiscriminantFunctionClassificationSolution(model, (IClassificationProblemData)ProblemDataParameter.ActualValue.Clone()); 83 83 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveValidationBestSolutionAnalyzer.cs
r8531 r8550 68 68 if (ApplyLinearScaling.Value) SymbolicDiscriminantFunctionClassificationModel.Scale(model, ProblemDataParameter.ActualValue); 69 69 70 SymbolicDiscriminantFunctionClassificationModel.SetAccuracyMaximizingThresholds(model,ProblemDataParameter.ActualValue);70 model.SetAccuracyMaximizingThresholds(ProblemDataParameter.ActualValue); 71 71 return new SymbolicDiscriminantFunctionClassificationSolution(model, (IClassificationProblemData)ProblemDataParameter.ActualValue.Clone()); 72 72 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveTrainingBestSolutionAnalyzer.cs
r8531 r8550 77 77 if (ApplyLinearScaling.Value) SymbolicDiscriminantFunctionClassificationModel.Scale(model, ProblemDataParameter.ActualValue); 78 78 79 SymbolicDiscriminantFunctionClassificationModel.SetAccuracyMaximizingThresholds(model,ProblemDataParameter.ActualValue);79 model.SetAccuracyMaximizingThresholds(ProblemDataParameter.ActualValue); 80 80 return new SymbolicDiscriminantFunctionClassificationSolution(model, (IClassificationProblemData)ProblemDataParameter.ActualValue.Clone()); 81 81 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveTrainingParetoBestSolutionAnalyzer.cs
r8531 r8550 62 62 if (ApplyLinearScaling.Value) SymbolicDiscriminantFunctionClassificationModel.Scale(model, ProblemDataParameter.ActualValue); 63 63 64 SymbolicDiscriminantFunctionClassificationModel.SetAccuracyMaximizingThresholds(model,ProblemDataParameter.ActualValue);64 model.SetAccuracyMaximizingThresholds(ProblemDataParameter.ActualValue); 65 65 return new SymbolicDiscriminantFunctionClassificationSolution(model, (IClassificationProblemData)ProblemDataParameter.ActualValue.Clone()); 66 66 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveValidationBestSolutionAnalyzer.cs
r8531 r8550 68 68 if (ApplyLinearScaling.Value) SymbolicDiscriminantFunctionClassificationModel.Scale(model, ProblemDataParameter.ActualValue); 69 69 70 SymbolicDiscriminantFunctionClassificationModel.SetAccuracyMaximizingThresholds(model,ProblemDataParameter.ActualValue);70 model.SetAccuracyMaximizingThresholds(ProblemDataParameter.ActualValue); 71 71 return new SymbolicDiscriminantFunctionClassificationSolution(model, (IClassificationProblemData)ProblemDataParameter.ActualValue.Clone()); 72 72 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveValidationParetoBestSolutionAnalyzer.cs
r8531 r8550 62 62 if (ApplyLinearScaling.Value) SymbolicDiscriminantFunctionClassificationModel.Scale(model, ProblemDataParameter.ActualValue); 63 63 64 SymbolicDiscriminantFunctionClassificationModel.SetAccuracyMaximizingThresholds(model,ProblemDataParameter.ActualValue);64 model.SetAccuracyMaximizingThresholds(ProblemDataParameter.ActualValue); 65 65 return new SymbolicDiscriminantFunctionClassificationSolution(model, (IClassificationProblemData)ProblemDataParameter.ActualValue.Clone()); 66 66 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicDiscriminantFunctionClassificationModel.cs
r8533 r8550 122 122 #endregion 123 123 124 public static void SetAccuracyMaximizingThresholds(IDiscriminantFunctionClassificationModel model,IClassificationProblemData problemData) {124 public void SetAccuracyMaximizingThresholds(IClassificationProblemData problemData) { 125 125 double[] classValues; 126 126 double[] thresholds; 127 127 var targetClassValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, problemData.TrainingIndices); 128 var estimatedTrainingValues = model.GetEstimatedValues(problemData.Dataset, problemData.TrainingIndices);128 var estimatedTrainingValues = GetEstimatedValues(problemData.Dataset, problemData.TrainingIndices); 129 129 AccuracyMaximizationThresholdCalculator.CalculateThresholds(problemData, estimatedTrainingValues, targetClassValues, out classValues, out thresholds); 130 130 131 model.SetThresholdsAndClassValues(thresholds, classValues);132 } 133 134 public static void SetClassDistributionCutPointThresholds(IDiscriminantFunctionClassificationModel model,IClassificationProblemData problemData) {131 SetThresholdsAndClassValues(thresholds, classValues); 132 } 133 134 public void SetClassDistributionCutPointThresholds(IClassificationProblemData problemData) { 135 135 double[] classValues; 136 136 double[] thresholds; 137 137 var targetClassValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, problemData.TrainingIndices); 138 var estimatedTrainingValues = model.GetEstimatedValues(problemData.Dataset, problemData.TrainingIndices);138 var estimatedTrainingValues = GetEstimatedValues(problemData.Dataset, problemData.TrainingIndices); 139 139 NormalDistributionCutPointsThresholdCalculator.CalculateThresholds(problemData, estimatedTrainingValues, targetClassValues, out classValues, out thresholds); 140 140 141 model.SetThresholdsAndClassValues(thresholds, classValues);141 SetThresholdsAndClassValues(thresholds, classValues); 142 142 } 143 143
Note: See TracChangeset
for help on using the changeset viewer.