Free cookie consent management tool by TermsFeed Policy Generator

source: branches/DataAnalysis.PopulationDiversityAnalysis/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionPopulationDiversityAnalyzer.cs @ 13806

Last change on this file since 13806 was 4885, checked in by swinkler, 14 years ago

Added abstract base class for population diversity analyzers for symbolic regression; simplified management of population diversity analyzers in symbolic regression problem base. (#1278)

File size: 3.1 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using System;
23using HeuristicLab.Analysis;
24using HeuristicLab.Common;
25using HeuristicLab.Core;
26using HeuristicLab.Data;
27using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
28using HeuristicLab.Operators;
29using HeuristicLab.Optimization;
30using HeuristicLab.Optimization.Operators;
31using HeuristicLab.Parameters;
32using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
33using HeuristicLab.Problems.DataAnalysis.Symbolic;
34using System.Collections.Generic;
35using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
36
37namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers {
38  /// <summary>
39  /// Base class for population diversity analyzers for symbolic regression.
40  /// </summary>
41  [Item("SymbolicRegressionPopulationDiversityAnalyzer", "Base class for population diversity analyzers for symbolic regression.")]
42  [StorableClass]
43  public abstract class SymbolicRegressionPopulationDiversityAnalyzer : PopulationDiversityAnalyzer<SymbolicExpressionTree>, ISymbolicRegressionAnalyzer {
44
45    private const string ProblemDataParameterName = "ProblemData";
46
47    public IValueLookupParameter<DataAnalysisProblemData> ProblemDataParameter {
48      get { return (IValueLookupParameter<DataAnalysisProblemData>)Parameters[ProblemDataParameterName]; }
49    }
50    public DataAnalysisProblemData ProblemData {
51      get { return ProblemDataParameter.ActualValue; }
52    }
53
54    #region ISymbolicRegressionAnalyzer Members
55
56    public ScopeTreeLookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
57      get { return base.SolutionParameter; }
58    }
59
60    public new ILookupParameter<ResultCollection> ResultsParameter {
61      get { return base.ResultsParameter; }
62    }
63
64    #endregion
65
66    [StorableConstructor]
67    protected SymbolicRegressionPopulationDiversityAnalyzer(bool deserializing) : base(deserializing) { }
68    protected SymbolicRegressionPopulationDiversityAnalyzer(SymbolicRegressionPopulationDiversityAnalyzer original, Cloner cloner) : base(original, cloner) { }
69    public SymbolicRegressionPopulationDiversityAnalyzer()
70      : base() {
71      Parameters.Add(new ValueLookupParameter<DataAnalysisProblemData>(ProblemDataParameterName, "The problem data for which the symbolic expression tree is a solution."));
72    }
73
74  }
75}
Note: See TracBrowser for help on using the repository browser.