- Timestamp:
- 05/05/10 19:50:46 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3
- Files:
-
- 6 added
- 3 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/HeuristicLab.Problems.DataAnalysis.Regression-3.3.csproj
r3532 r3651 86 86 <Compile Include="HeuristicLabProblemsDataAnalysisRegressionPlugin.cs" /> 87 87 <Compile Include="Properties\AssemblyInfo.cs" /> 88 <Compile Include="Symbolic\BestValidationSymbolicRegressionSolutionVisualizer.cs" /> 88 <Compile Include="Symbolic\Analyzers\PopulationSymbolicRegressionVariableFrequencyAnalyzer.cs" /> 89 <Compile Include="Symbolic\Analyzers\PopulationValidationBestScaledSymbolicRegressionSolutionAnalyzer.cs" /> 90 <Compile Include="Symbolic\Analyzers\SymbolicRegressionSolutionLinearScaler.cs" /> 91 <Compile Include="Symbolic\Analyzers\ISymbolicRegressionSolutionPopulationAnalyzer.cs" /> 92 <Compile Include="Symbolic\Analyzers\PopulationBestSymbolicRegressionSolutionAnalyzer.cs" /> 89 93 <Compile Include="Symbolic\SymbolicRegressionScaledMeanSquaredErrorEvaluator.cs" /> 90 94 <Compile Include="Symbolic\SymbolicRegressionSolution.cs" /> -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/HeuristicLabProblemsDataAnalysisRegressionPlugin.cs.frame
r3384 r3651 28 28 [Plugin("HeuristicLab.Problems.DataAnalysis.Regression","3.3.0.$WCREV$")] 29 29 [PluginFile("HeuristicLab.Problems.DataAnalysis.Regression-3.3.dll", PluginFileType.Assembly)] 30 [PluginDependency("HeuristicLab.Analysis", "3.3.0.0")] 30 31 [PluginDependency("HeuristicLab.Collections", "3.3.0.0")] 31 32 [PluginDependency("HeuristicLab.Common", "3.3")] … … 38 39 [PluginDependency("HeuristicLab.Parameters", "3.3.0.0")] 39 40 [PluginDependency("HeuristicLab.Persistence", "3.3.0.0")] 41 [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.3.0.0")] 42 [PluginDependency("HeuristicLab.Random", "3.3.0.0")] 40 43 public class HeuristicLabProblemsDataAnalysisRegressionPlugin : PluginBase { 41 44 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblem.cs
r3616 r3651 39 39 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators; 40 40 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces; 41 using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers; 42 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Analyzers; 41 43 42 44 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic { … … 150 152 get { return BestKnownQualityParameter.Value; } 151 153 } 152 private List<I SymbolicExpressionTreeOperator> operators;154 private List<IOperator> operators; 153 155 public IEnumerable<IOperator> Operators { 154 get { return operators.Cast<IOperator>(); } 156 get { return operators; } 157 } 158 public IEnumerable<ISymbolicRegressionSolutionPopulationAnalyzer> Analyzers { 159 get { return operators.OfType<ISymbolicRegressionSolutionPopulationAnalyzer>(); } 155 160 } 156 161 public DoubleValue PunishmentFactor { … … 180 185 var grammar = new ArithmeticExpressionGrammar(); 181 186 var globalGrammar = new GlobalSymbolicExpressionGrammar(grammar); 182 var visualizer = new BestValidationSymbolicRegressionSolutionVisualizer();183 187 var interpreter = new SimpleArithmeticExpressionInterpreter(); 184 188 Parameters.Add(new ValueParameter<BoolValue>("Maximization", "Set to false as the error of the regression model should be minimized.", (BoolValue)new BoolValue(false).AsReadOnly())); … … 200 204 ParameterizeSolutionCreator(); 201 205 ParameterizeEvaluator(); 202 ParameterizeVisualizer();203 206 204 207 UpdateGrammar(); … … 240 243 // paritions could be changed 241 244 ParameterizeEvaluator(); 242 Parameterize Visualizer();245 ParameterizeAnalyzers(); 243 246 // input variables could have been changed 244 247 UpdateGrammar(); … … 260 263 protected virtual void OnSolutionParameterNameChanged(EventArgs e) { 261 264 ParameterizeEvaluator(); 262 Parameterize Visualizer();265 ParameterizeAnalyzers(); 263 266 ParameterizeOperators(); 264 267 } … … 267 270 Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged); 268 271 ParameterizeEvaluator(); 269 Parameterize Visualizer();272 ParameterizeAnalyzers(); 270 273 RaiseEvaluatorChanged(e); 271 274 } 272 275 protected virtual void OnQualityParameterNameChanged(EventArgs e) { 273 Parameterize Visualizer();276 ParameterizeAnalyzers(); 274 277 } 275 278 #endregion … … 345 348 346 349 private void InitializeOperators() { 347 operators = new List<ISymbolicExpressionTreeOperator>(); 348 operators.AddRange(ApplicationManager.Manager.GetInstances<ISymbolicExpressionTreeOperator>()); 350 operators = new List<IOperator>(); 351 operators.AddRange(ApplicationManager.Manager.GetInstances<ISymbolicExpressionTreeOperator>().OfType<IOperator>()); 352 operators.Add(new PopulationValidationBestScaledSymbolicRegressionSolutionAnalyzer()); 353 operators.Add(new PopulationMinAvgMaxTreeSizeAnalyzer()); 354 operators.Add(new PopulationSymbolicRegressionVariableFrequencyAnalyzer()); 349 355 ParameterizeOperators(); 356 ParameterizeAnalyzers(); 350 357 } 351 358 … … 365 372 } 366 373 367 private void ParameterizeVisualizer() { 368 //var solutionVisualizer = Visualizer as BestValidationSymbolicRegressionSolutionVisualizer; 369 //if (solutionVisualizer != null) { 370 // solutionVisualizer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName; 371 // solutionVisualizer.DataAnalysisProblemDataParameter.ActualName = DataAnalysisProblemDataParameter.Name; 372 // solutionVisualizer.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name; 373 // solutionVisualizer.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameter.Name; 374 // solutionVisualizer.QualityParameter.ActualName = Evaluator.QualityParameter.Name; 375 // solutionVisualizer.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name; 376 // solutionVisualizer.ValidationSamplesStartParameter.Value = ValidationSamplesStart; 377 // solutionVisualizer.ValidationSamplesEndParameter.Value = ValidationSamplesEnd; 378 //} 374 private void ParameterizeAnalyzers() { 375 foreach (var analyzer in Analyzers) { 376 analyzer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName; 377 var bestValidationSolutionAnalyzer = analyzer as PopulationValidationBestScaledSymbolicRegressionSolutionAnalyzer; 378 if (bestValidationSolutionAnalyzer != null) { 379 bestValidationSolutionAnalyzer.ProblemDataParameter.ActualName = DataAnalysisProblemDataParameter.Name; 380 bestValidationSolutionAnalyzer.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name; 381 bestValidationSolutionAnalyzer.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameter.Name; 382 bestValidationSolutionAnalyzer.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name; 383 bestValidationSolutionAnalyzer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName; 384 bestValidationSolutionAnalyzer.SamplesStartParameter.Value = ValidationSamplesStart; 385 bestValidationSolutionAnalyzer.SamplesEndParameter.Value = ValidationSamplesEnd; 386 } 387 var varFreqAnalyzer = analyzer as PopulationSymbolicRegressionVariableFrequencyAnalyzer; 388 if (varFreqAnalyzer != null) { 389 varFreqAnalyzer.ProblemDataParameter.ActualName = DataAnalysisProblemDataParameter.Name; 390 } 391 } 392 foreach (ISymbolicExpressionTreePopulationAnalyzer analyzer in Operators.OfType<ISymbolicExpressionTreePopulationAnalyzer>()) { 393 analyzer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName; 394 } 379 395 } 380 396
Note: See TracChangeset
for help on using the changeset viewer.