Changeset 5649 for branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective
- Timestamp:
- 03/10/11 10:00:09 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveTrainingBestSolutionAnalyzer.cs
r5557 r5649 37 37 [Item("SymbolicClassificationMultiObjectiveTrainingBestSolutionAnalyzer", "An operator that analyzes the training best symbolic classification solution for multi objective symbolic classification problems.")] 38 38 [StorableClass] 39 public sealed class SymbolicClassificationMultiObjectiveTrainingBestSolutionAnalyzer : SymbolicDataAnalysisMultiObjectiveTrainingBestSolutionAnalyzer<ISymbolicClassificationSolution> { 39 public sealed class SymbolicClassificationMultiObjectiveTrainingBestSolutionAnalyzer : SymbolicDataAnalysisMultiObjectiveTrainingBestSolutionAnalyzer<ISymbolicClassificationSolution>, 40 ISymbolicDataAnalysisInterpreterOperator { 41 private const string ProblemDataParameterName = "ProblemData"; 42 private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter"; 43 #region parameter properties 44 public ILookupParameter<IClassificationProblemData> ProblemDataParameter { 45 get { return (ILookupParameter<IClassificationProblemData>)Parameters[ProblemDataParameterName]; } 46 } 47 public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter { 48 get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; } 49 } 50 #endregion 51 #region properties 52 public IClassificationProblemData ProblemData { 53 get { return ProblemDataParameter.ActualValue; } 54 } 55 public ISymbolicDataAnalysisExpressionTreeInterpreter SymbolicDataAnalysisTreeInterpreter { 56 get { return SymbolicDataAnalysisTreeInterpreterParameter.ActualValue; } 57 } 58 #endregion 40 59 [StorableConstructor] 41 60 private SymbolicClassificationMultiObjectiveTrainingBestSolutionAnalyzer(bool deserializing) : base(deserializing) { } … … 43 62 public SymbolicClassificationMultiObjectiveTrainingBestSolutionAnalyzer() 44 63 : base() { 64 Parameters.Add(new LookupParameter<IClassificationProblemData>(ProblemDataParameterName, "The problem data for the symbolic classification solution.")); 45 65 } 46 66 public override IDeepCloneable Clone(Cloner cloner) { … … 50 70 51 71 protected override ISymbolicClassificationSolution CreateSolution(ISymbolicExpressionTree bestTree, double[] bestQuality) { 52 throw new System.NotImplementedException(); 72 var model = new SymbolicDiscriminantFunctionClassificationModel(bestTree, SymbolicDataAnalysisTreeInterpreter, ProblemData.ClassValues); 73 return new SymbolicDiscriminantFunctionClassificationSolution(model, ProblemData); 53 74 } 54 75 }
Note: See TracChangeset
for help on using the changeset viewer.