Changeset 8206 for branches/GP-MoveOperators/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers
- Timestamp:
- 07/03/12 16:46:35 (12 years ago)
- Location:
- branches/GP-MoveOperators
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GP-MoveOperators
- Property svn:mergeinfo changed
/trunk/sources merged: 8084,8088-8090,8092-8100,8102-8113,8115,8117-8132,8134-8146,8148-8156,8158-8160,8163-8170,8173-8176,8178-8190,8192-8205
- Property svn:mergeinfo changed
-
branches/GP-MoveOperators/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer.cs
r7734 r8206 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 24 using System.Linq; … … 26 27 using HeuristicLab.Data; 27 28 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 28 using HeuristicLab.Operators;29 29 using HeuristicLab.Optimization; 30 30 using HeuristicLab.Parameters; 31 31 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 32 using System;33 32 34 33 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { … … 38 37 [Item("SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer", "An operator that analyzes the Pareto-best symbolic data analysis solution for single objective symbolic data analysis problems.")] 39 38 [StorableClass] 40 public abstract class SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer<T> : SymbolicDataAnalysisSingleObjectiveAnalyzer 41 where T : class, ISymbolicDataAnalysisSolution { 39 public abstract class SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer<S, T> : SymbolicDataAnalysisSingleObjectiveAnalyzer, ISymbolicDataAnalysisInterpreterOperator, ISymbolicDataAnalysisBoundedOperator 40 where T : class, ISymbolicDataAnalysisSolution 41 where S : class, IDataAnalysisProblemData { 42 private const string ProblemDataParameterName = "ProblemData"; 42 43 private const string TrainingBestSolutionsParameterName = "Best training solutions"; 43 44 private const string TrainingBestSolutionQualitiesParameterName = "Best training solution qualities"; 44 45 private const string ComplexityParameterName = "Complexity"; 46 private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter"; 47 private const string EstimationLimitsParameterName = "EstimationLimits"; 45 48 46 49 public override bool EnabledByDefault { … … 58 61 get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters[ComplexityParameterName]; } 59 62 } 63 public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter { 64 get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; } 65 } 66 public ILookupParameter<S> ProblemDataParameter { 67 get { return (ILookupParameter<S>)Parameters[ProblemDataParameterName]; } 68 } 69 public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter { 70 get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; } 71 } 60 72 #endregion 61 73 #region properties … … 72 84 [StorableConstructor] 73 85 protected SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer(bool deserializing) : base(deserializing) { } 74 protected SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer(SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer< T> original, Cloner cloner) : base(original, cloner) { }86 protected SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer(SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer<S, T> original, Cloner cloner) : base(original, cloner) { } 75 87 public SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer() 76 88 : base() { 89 Parameters.Add(new LookupParameter<S>(ProblemDataParameterName, "The problem data for the symbolic data analysis solution.")); 77 90 Parameters.Add(new LookupParameter<ItemList<T>>(TrainingBestSolutionsParameterName, "The training best (Pareto-optimal) symbolic data analysis solutions.")); 78 91 Parameters.Add(new LookupParameter<ItemList<DoubleArray>>(TrainingBestSolutionQualitiesParameterName, "The qualities of the training best (Pareto-optimal) solutions.")); 79 92 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(ComplexityParameterName, "The complexity of each tree.")); 93 Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The symbolic data analysis tree interpreter for the symbolic expression tree.")); 94 Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The lower and upper limit for the estimated values produced by the symbolic classification model.")); 80 95 } 81 96 … … 100 115 101 116 List<double> complexities; 102 if (ComplexityParameter.ActualValue != null ) {117 if (ComplexityParameter.ActualValue != null && ComplexityParameter.ActualValue.Length == qualities.Count) { 103 118 complexities = ComplexityParameter.ActualValue.Select(x => x.Value).ToList(); 104 119 } else { -
branches/GP-MoveOperators/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer.cs
r7734 r8206 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 24 using System.Linq; … … 26 27 using HeuristicLab.Data; 27 28 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 28 using HeuristicLab.Operators;29 29 using HeuristicLab.Optimization; 30 30 using HeuristicLab.Parameters; 31 31 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 32 using System;33 32 34 33 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { … … 38 37 [Item("SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer", "An operator that analyzes the Pareto-best symbolic data analysis solution for single objective symbolic data analysis problems.")] 39 38 [StorableClass] 40 public abstract class SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer<S, T, U> : SymbolicDataAnalysisSingleObjectiveValidationAnalyzer<T, U> 39 public abstract class SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer<S, T, U> : SymbolicDataAnalysisSingleObjectiveValidationAnalyzer<T, U>, ISymbolicDataAnalysisBoundedOperator 41 40 where S : class, ISymbolicDataAnalysisSolution 42 41 where T : class, ISymbolicDataAnalysisSingleObjectiveEvaluator<U> … … 45 44 private const string ValidationBestSolutionQualitiesParameterName = "Best validation solution qualities"; 46 45 private const string ComplexityParameterName = "Complexity"; 46 private const string EstimationLimitsParameterName = "EstimationLimits"; 47 47 48 48 public override bool EnabledByDefault { … … 60 60 get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters[ComplexityParameterName]; } 61 61 } 62 public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter { 63 get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; } 64 } 65 62 66 #endregion 63 67 #region properties … … 80 84 Parameters.Add(new LookupParameter<ItemList<DoubleArray>>(ValidationBestSolutionQualitiesParameterName, "The qualities of the validation best (Pareto-optimal) solutions.")); 81 85 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(ComplexityParameterName, "The complexity of each tree.")); 86 Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The lower and upper limit for the estimated values produced by the symbolic classification model.")); 82 87 } 83 88 … … 137 142 138 143 List<double> complexities; 139 if (ComplexityParameter.ActualValue != null ) {144 if (ComplexityParameter.ActualValue != null && ComplexityParameter.ActualValue.Length == trainingQuality.Length) { 140 145 complexities = ComplexityParameter.ActualValue.Select(x => x.Value).ToList(); 141 146 } else {
Note: See TracChangeset
for help on using the changeset viewer.