#region License Information
/* HeuristicLab
* Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
*
* This file is part of HeuristicLab.
*
* HeuristicLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* HeuristicLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with HeuristicLab. If not, see .
*/
#endregion
using HeuristicLab.Common;
using HeuristicLab.Core;
using HeuristicLab.Data;
using HeuristicLab.Parameters;
using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
///
/// Abstract base class for symbolic data analysis analyzers that validate a solution on a separate data partition using the evaluator.
///
[StorableClass]
public abstract class SymbolicDataAnalysisMultiObjectiveValidationAnalyzer : SymbolicDataAnalysisMultiObjectiveAnalyzer,
ISymbolicDataAnalysisValidationAnalyzer
where T : class, ISymbolicDataAnalysisMultiObjectiveEvaluator
where U : class, IDataAnalysisProblemData {
private const string ProblemDataParameterName = "ProblemData";
private const string EvaluatorParameterName = "Evaluator";
private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter";
private const string ValidationPartitionParameterName = "ValidationPartition";
private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples";
#region parameter properties
public ILookupParameter ProblemDataParameter {
get { return (ILookupParameter)Parameters[ProblemDataParameterName]; }
}
public ILookupParameter EvaluatorParameter {
get { return (ILookupParameter)Parameters[EvaluatorParameterName]; }
}
public ILookupParameter SymbolicDataAnalysisTreeInterpreterParameter {
get { return (ILookupParameter)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
}
public IValueLookupParameter ValidationPartitionParameter {
get { return (IValueLookupParameter)Parameters[ValidationPartitionParameterName]; }
}
public IValueLookupParameter RelativeNumberOfEvaluatedSamplesParameter {
get { return (IValueLookupParameter)Parameters[RelativeNumberOfEvaluatedSamplesParameterName]; }
}
#endregion
[StorableConstructor]
protected SymbolicDataAnalysisMultiObjectiveValidationAnalyzer(bool deserializing) : base(deserializing) { }
protected SymbolicDataAnalysisMultiObjectiveValidationAnalyzer(SymbolicDataAnalysisMultiObjectiveValidationAnalyzer original, Cloner cloner)
: base(original, cloner) {
}
public SymbolicDataAnalysisMultiObjectiveValidationAnalyzer()
: base() {
Parameters.Add(new LookupParameter(ProblemDataParameterName, "The problem data of the symbolic data analysis problem."));
Parameters.Add(new LookupParameter(EvaluatorParameterName, "The operator to use for fitness evaluation on the validation partition."));
Parameters.Add(new LookupParameter(SymbolicDataAnalysisTreeInterpreterParameterName, "The interpreter for symbolic data analysis expression trees."));
Parameters.Add(new ValueLookupParameter(ValidationPartitionParameterName, "Thes validation partition."));
Parameters.Add(new ValueLookupParameter(RelativeNumberOfEvaluatedSamplesParameterName, "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation between the start and end index."));
}
}
}