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 |
|
---|
22 | using System;
|
---|
23 | using HeuristicLab.Analysis;
|
---|
24 | using HeuristicLab.Common;
|
---|
25 | using HeuristicLab.Core;
|
---|
26 | using HeuristicLab.Data;
|
---|
27 | using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
|
---|
28 | using HeuristicLab.Operators;
|
---|
29 | using HeuristicLab.Optimization;
|
---|
30 | using HeuristicLab.Optimization.Operators;
|
---|
31 | using HeuristicLab.Parameters;
|
---|
32 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
33 | using HeuristicLab.Problems.DataAnalysis.Symbolic;
|
---|
34 | using System.Collections.Generic;
|
---|
35 | using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
|
---|
36 |
|
---|
37 | namespace 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 | }
|
---|