Changeset 10276 for branches/GrammaticalEvolution/HeuristicLab.Problems.GrammaticalEvolution/Symbolic/GESymbolicDataAnalysisProblem.cs
- Timestamp:
- 01/04/14 12:23:59 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GrammaticalEvolution/HeuristicLab.Problems.GrammaticalEvolution/Symbolic/GESymbolicDataAnalysisProblem.cs
r10268 r10276 51 51 private const string SymbolicExpressionTreeGrammarParameterName = "SymbolicExpressionTreeGrammar"; 52 52 private const string SymbolicExpressionTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter"; 53 //private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";54 53 private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength"; 55 //private const string MaximumFunctionDefinitionsParameterName = "MaximumFunctionDefinitions";56 //private const string MaximumFunctionArgumentsParameterName = "MaximumFunctionArguments";57 54 private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples"; 58 55 private const string FitnessCalculationPartitionParameterName = "FitnessCalculationPartition"; … … 90 87 get { return (IValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicExpressionTreeInterpreterParameterName]; } 91 88 } 92 //public IFixedValueParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {93 // get { return (IFixedValueParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }94 //}95 89 public IFixedValueParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter { 96 90 get { return (IFixedValueParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; } 97 91 } 98 //public IFixedValueParameter<IntValue> MaximumFunctionDefinitionsParameter {99 // get { return (IFixedValueParameter<IntValue>)Parameters[MaximumFunctionDefinitionsParameterName]; }100 //}101 //public IFixedValueParameter<IntValue> MaximumFunctionArgumentsParameter {102 // get { return (IFixedValueParameter<IntValue>)Parameters[MaximumFunctionArgumentsParameterName]; }103 //}104 92 public IFixedValueParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter { 105 93 get { return (IFixedValueParameter<PercentValue>)Parameters[RelativeNumberOfEvaluatedSamplesParameterName]; } … … 143 131 } 144 132 145 //public IntValue MaximumSymbolicExpressionTreeDepth {146 // get { return MaximumSymbolicExpressionTreeDepthParameter.Value; }147 //}148 133 public IntValue MaximumSymbolicExpressionTreeLength { 149 134 get { return MaximumSymbolicExpressionTreeLengthParameter.Value; } 150 135 } 151 //public IntValue MaximumFunctionDefinitions { 152 // get { return MaximumFunctionDefinitionsParameter.Value; } 153 //} 154 //public IntValue MaximumFunctionArguments { 155 // get { return MaximumFunctionArgumentsParameter.Value; } 156 //} 136 157 137 public PercentValue RelativeNumberOfEvaluatedSamples { 158 138 get { return RelativeNumberOfEvaluatedSamplesParameter.Value; } … … 186 166 Parameters.Add(new ValueParameter<GESymbolicExpressionGrammar>(SymbolicExpressionTreeGrammarParameterName, SymbolicExpressionTreeGrammarParameterDescription)); 187 167 Parameters.Add(new ValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicExpressionTreeInterpreterParameterName, SymoblicExpressionTreeInterpreterParameterDescription)); 188 //Parameters.Add(new FixedValueParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, MaximumSymbolicExpressionTreeDepthParameterDescription));189 168 Parameters.Add(new FixedValueParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, MaximumSymbolicExpressionTreeLengthParameterDescription)); 190 //Parameters.Add(new FixedValueParameter<IntValue>(MaximumFunctionDefinitionsParameterName, MaximumFunctionDefinitionsParameterDescription));191 //Parameters.Add(new FixedValueParameter<IntValue>(MaximumFunctionArgumentsParameterName, MaximumFunctionArgumentsParameterDescription));192 169 Parameters.Add(new FixedValueParameter<IntRange>(FitnessCalculationPartitionParameterName, FitnessCalculationPartitionParameterDescription)); 193 170 Parameters.Add(new FixedValueParameter<IntRange>(ValidationPartitionParameterName, ValidationPartitionParameterDescription)); … … 199 176 200 177 SymbolicExpressionTreeInterpreterParameter.Hidden = true; 201 //MaximumFunctionArgumentsParameter.Hidden = true;202 //MaximumFunctionDefinitionsParameter.Hidden = true;203 178 ApplyLinearScalingParameter.Hidden = true; 204 179 … … 232 207 private void InitializeOperators() { 233 208 Operators.AddRange(ApplicationManager.Manager.GetInstances<IIntegerVectorOperator>().OfType<IOperator>()); 234 // Operators.AddRange(ApplicationManager.Manager.GetInstances<ISymbolicDataAnalysisExpressionCrossover<T>>());235 209 Operators.Add(new SymbolicExpressionSymbolFrequencyAnalyzer()); 236 210 Operators.Add(new SymbolicDataAnalysisVariableFrequencyAnalyzer()); … … 246 220 247 221 RegisterGrammarHandler(); 248 249 //MaximumFunctionArguments.ValueChanged += new EventHandler(ArchitectureParameterValue_ValueChanged);250 //MaximumFunctionDefinitions.ValueChanged += new EventHandler(ArchitectureParameterValue_ValueChanged);251 //MaximumSymbolicExpressionTreeDepth.ValueChanged += new EventHandler(MaximumSymbolicExpressionTreeDepth_ValueChanged);252 222 } 253 223 … … 263 233 } 264 234 265 //private void MaximumSymbolicExpressionTreeDepth_ValueChanged(object sender, EventArgs e) {266 // if (MaximumSymbolicExpressionTreeDepth != null && MaximumSymbolicExpressionTreeDepth.Value < 3)267 // MaximumSymbolicExpressionTreeDepth.Value = 3;268 //}269 270 //protected override void OnSolutionCreatorChanged() {271 // base.OnSolutionCreatorChanged();272 // ParameterizeOperators();273 //}274 275 235 protected override void OnEvaluatorChanged() { 276 236 base.OnEvaluatorChanged(); … … 304 264 op.SymbolicExpressionTreeGrammarParameter.ActualName = SymbolicExpressionTreeGrammarParameter.Name; 305 265 } 306 /*307 foreach (var op in operators.OfType<ISymbolicExpressionTreeSizeConstraintOperator>()) {308 op.MaximumSymbolicExpressionTreeDepthParameter.ActualName = MaximumSymbolicExpressionTreeDepthParameter.Name;309 op.MaximumSymbolicExpressionTreeLengthParameter.ActualName = MaximumSymbolicExpressionTreeLengthParameter.Name;310 }311 foreach (var op in operators.OfType<ISymbolicExpressionTreeArchitectureAlteringOperator>()) {312 op.MaximumFunctionArgumentsParameter.ActualName = MaximumFunctionArgumentsParameter.Name;313 op.MaximumFunctionDefinitionsParameter.ActualName = MaximumFunctionDefinitionsParameter.Name;314 }315 */316 266 foreach (var op in operators.OfType<IGESymbolicDataAnalysisEvaluator<T>>()) { 317 267 op.ProblemDataParameter.ActualName = ProblemDataParameterName; … … 354 304 op.SymbolicDataAnalysisTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name; 355 305 } 356 /*357 foreach (var op in operators.OfType<ISymbolicDataAnalysisExpressionCrossover<T>>()) {358 op.EvaluationPartitionParameter.ActualName = FitnessCalculationPartitionParameter.Name;359 op.ProblemDataParameter.ActualName = ProblemDataParameter.Name;360 op.EvaluationPartitionParameter.ActualName = FitnessCalculationPartitionParameter.Name;361 op.RelativeNumberOfEvaluatedSamplesParameter.ActualName = RelativeNumberOfEvaluatedSamplesParameter.Name;362 op.EvaluatorParameter.ActualName = EvaluatorParameter.Name;363 }364 */365 306 } 366 307
Note: See TracChangeset
for help on using the changeset viewer.