Free cookie consent management tool by TermsFeed Policy Generator

source: branches/DataAnalysis SolutionEnsembles/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveValidationAnalyzer.cs @ 6004

Last change on this file since 6004 was 5809, checked in by mkommend, 14 years ago

#1418: Reintegrated branch into trunk.

File size: 4.2 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2011 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 HeuristicLab.Common;
23using HeuristicLab.Core;
24using HeuristicLab.Data;
25using HeuristicLab.Parameters;
26using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
27
28namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
29  /// <summary>
30  /// Abstract base class for symbolic data analysis analyzers that validate a solution on a separate data partition using the evaluator.
31  /// </summary>
32  [StorableClass]
33  public abstract class SymbolicDataAnalysisMultiObjectiveValidationAnalyzer<T, U> : SymbolicDataAnalysisMultiObjectiveAnalyzer,
34    ISymbolicDataAnalysisValidationAnalyzer<T, U>
35    where T : class, ISymbolicDataAnalysisMultiObjectiveEvaluator<U>
36    where U : class, IDataAnalysisProblemData {
37    private const string ProblemDataParameterName = "ProblemData";
38    private const string EvaluatorParameterName = "Evaluator";
39    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter";
40    private const string ValidationPartitionParameterName = "ValidationPartition";
41    private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples";
42
43    #region parameter properties
44    public ILookupParameter<U> ProblemDataParameter {
45      get { return (ILookupParameter<U>)Parameters[ProblemDataParameterName]; }
46    }
47    public ILookupParameter<T> EvaluatorParameter {
48      get { return (ILookupParameter<T>)Parameters[EvaluatorParameterName]; }
49    }
50    public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter {
51      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
52    }
53    public IValueLookupParameter<IntRange> ValidationPartitionParameter {
54      get { return (IValueLookupParameter<IntRange>)Parameters[ValidationPartitionParameterName]; }
55    }
56    public IValueLookupParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter {
57      get { return (IValueLookupParameter<PercentValue>)Parameters[RelativeNumberOfEvaluatedSamplesParameterName]; }
58    }
59    #endregion
60
61    [StorableConstructor]
62    protected SymbolicDataAnalysisMultiObjectiveValidationAnalyzer(bool deserializing) : base(deserializing) { }
63    protected SymbolicDataAnalysisMultiObjectiveValidationAnalyzer(SymbolicDataAnalysisMultiObjectiveValidationAnalyzer<T, U> original, Cloner cloner)
64      : base(original, cloner) {
65    }
66    public SymbolicDataAnalysisMultiObjectiveValidationAnalyzer()
67      : base() {
68      Parameters.Add(new LookupParameter<U>(ProblemDataParameterName, "The problem data of the symbolic data analysis problem."));
69      Parameters.Add(new LookupParameter<T>(EvaluatorParameterName, "The operator to use for fitness evaluation on the validation partition."));
70      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The interpreter for symbolic data analysis expression trees."));
71      Parameters.Add(new ValueLookupParameter<IntRange>(ValidationPartitionParameterName, "Thes validation partition."));
72      Parameters.Add(new ValueLookupParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation between the start and end index."));
73    }
74  }
75}
Note: See TracBrowser for help on using the repository browser.