Changeset 3373 for trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblem.cs
- Timestamp:
- 04/16/10 15:22:57 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblem.cs
r3294 r3373 33 33 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 34 34 using HeuristicLab.Problems.DataAnalysis.Regression; 35 using HeuristicLab.Problems.DataAnalysis.Symbolic; 35 36 36 37 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic { … … 38 39 [Creatable("Problems")] 39 40 [StorableClass] 40 public sealed class SymbolicRegressionProblem : RegressionProblem, ISingleObjectiveProblem {41 public sealed class SymbolicRegressionProblem : DataAnalysisProblem, ISingleObjectiveProblem { 41 42 42 43 #region Parameter Properties … … 155 156 creator.SymbolicExpressionTreeParameter.ActualName = "SymbolicRegressionModel"; 156 157 evaluator.QualityParameter.ActualName = "TrainingMeanSquaredError"; 157 RegressionProblemDataParameter.ValueChanged += new EventHandler(RegressionProblemDataParameter_ValueChanged);158 RegressionProblemData.InputVariablesChanged += new EventHandler(RegressionProblemData_InputVariablesChanged);158 DataAnalysisProblemDataParameter.ValueChanged += new EventHandler(DataAnalysisProblemDataParameter_ValueChanged); 159 DataAnalysisProblemData.InputVariablesChanged += new EventHandler(DataAnalysisProblemData_InputVariablesChanged); 159 160 ParameterizeSolutionCreator(); 160 161 ParameterizeEvaluator(); … … 164 165 } 165 166 166 void RegressionProblemDataParameter_ValueChanged(object sender, EventArgs e) {167 RegressionProblemData.InputVariablesChanged += new EventHandler(RegressionProblemData_InputVariablesChanged);168 } 169 170 void RegressionProblemData_InputVariablesChanged(object sender, EventArgs e) {171 FunctionTreeGrammar.VariableNames = RegressionProblemData.InputVariables.Select(x => x.Value);167 void DataAnalysisProblemDataParameter_ValueChanged(object sender, EventArgs e) { 168 DataAnalysisProblemData.InputVariablesChanged += new EventHandler(DataAnalysisProblemData_InputVariablesChanged); 169 } 170 171 void DataAnalysisProblemData_InputVariablesChanged(object sender, EventArgs e) { 172 FunctionTreeGrammar.VariableNames = DataAnalysisProblemData.InputVariables.Select(x => x.Value); 172 173 } 173 174 … … 263 264 private void ParameterizeEvaluator() { 264 265 Evaluator.FunctionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName; 265 Evaluator.RegressionProblemDataParameter.ActualName = RegressionProblemDataParameter.Name;266 Evaluator.RegressionProblemDataParameter.ActualName = DataAnalysisProblemDataParameter.Name; 266 267 } 267 268 private void ParameterizeVisualizer() { … … 289 290 foreach (ISymbolicRegressionEvaluator op in Operators.OfType<ISymbolicRegressionEvaluator>()) { 290 291 op.FunctionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName; 291 op.RegressionProblemDataParameter.ActualName = RegressionProblemDataParameter.Name;292 op.RegressionProblemDataParameter.ActualName = DataAnalysisProblemDataParameter.Name; 292 293 op.NumberOfEvaluatedNodesParameter.ActualName = NumberOfEvaluatedNodesParameter.Name; 293 294 }
Note: See TracChangeset
for help on using the changeset viewer.