Changeset 6878 for branches/GeneralizedQAP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs
- Timestamp:
- 10/05/11 21:55:55 (13 years ago)
- Location:
- branches/GeneralizedQAP
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP
- Property svn:ignore
-
old new 1 *.docstates 2 *.psess 1 3 *.resharper 2 4 *.suo 5 *.vsp 3 6 Google.ProtocolBuffers-0.9.1.dll 7 HeuristicLab 3.3.5.1.ReSharper.user 8 HeuristicLab 3.3.6.0.ReSharper.user 4 9 HeuristicLab.4.5.resharper.user 5 10 HeuristicLab.resharper.user … … 8 13 _ReSharper.HeuristicLab 9 14 _ReSharper.HeuristicLab 3.3 15 _ReSharper.HeuristicLab.ExtLibs 16 bin 10 17 protoc.exe 11 HeuristicLab 3.3.5.1.ReSharper.user 12 *.psess 13 *.vsp 14 *.docstates 18 HeuristicLab.ExtLibs.6.0.ReSharper.user
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/GeneralizedQAP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4
- Property svn:ignore
-
old new 4 4 obj 5 5 *.vs10x 6 Plugin.cs
-
- Property svn:ignore
-
branches/GeneralizedQAP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs
r5854 r6878 62 62 MaximumSymbolicExpressionTreeLength.Value = InitialMaximumTreeLength; 63 63 64 SymbolicExpressionTreeGrammarParameter.ValueChanged += (o, e) => ConfigureGrammarSymbols(); 65 66 ConfigureGrammarSymbols(); 64 67 InitializeOperators(); 65 68 UpdateEstimationLimits(); 69 } 70 71 private void ConfigureGrammarSymbols() { 72 var grammar = SymbolicExpressionTreeGrammar as TypeCoherentExpressionGrammar; 73 if (grammar != null) grammar.ConfigureAsDefaultRegressionGrammar(); 66 74 } 67 75 … … 74 82 75 83 private void UpdateEstimationLimits() { 76 if (ProblemData.Training Partition.Start < ProblemData.TrainingPartition.End) {77 var targetValues = ProblemData.Dataset.Get VariableValues(ProblemData.TargetVariable, ProblemData.TrainingPartition.Start, ProblemData.TrainingPartition.End);84 if (ProblemData.TrainingIndizes.Any()) { 85 var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToList(); 78 86 var mean = targetValues.Average(); 79 87 var range = targetValues.Max() - targetValues.Min(); 80 88 EstimationLimits.Upper = mean + PunishmentFactor * range; 81 89 EstimationLimits.Lower = mean - PunishmentFactor * range; 90 } else { 91 EstimationLimits.Upper = double.MaxValue; 92 EstimationLimits.Lower = double.MinValue; 82 93 } 83 94 }
Note: See TracChangeset
for help on using the changeset viewer.