Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/07/12 11:27:49 (12 years ago)
Author:
mkommend
Message:

#1940: Added support in symbolic classification for different methods to create the classification ModelCreator.

  • Added ModelCreators
  • Refactored SymbolicClassificationModel and SymbolicDiscriminantFunctionClassificationModel
  • Added ModelCreatorParameter to Analyzers and Evaluators if needed
  • Corrected wiring in symbolic classification problems (single- and multiobjective
  • Adapted simplifier
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveProblem.cs

    r8175 r8594  
    3636    private const string EstimationLimitsParameterName = "EstimationLimits";
    3737    private const string EstimationLimitsParameterDescription = "The lower and upper limit for the estimated value that can be returned by the symbolic classification model.";
     38    private const string ModelCreatorParameterName = "ModelCreator";
     39
    3840
    3941    #region parameter properties
     
    4143      get { return (IFixedValueParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
    4244    }
     45    public IValueParameter<ISymbolicClassificationModelCreator> ModelCreatorParameter {
     46      get { return (IValueParameter<ISymbolicClassificationModelCreator>)Parameters[ModelCreatorParameterName]; }
     47    }
    4348    #endregion
    4449    #region properties
    4550    public DoubleLimit EstimationLimits {
    4651      get { return EstimationLimitsParameter.Value; }
     52    }
     53    public ISymbolicClassificationModelCreator ModelCreator {
     54      get { return ModelCreatorParameter.Value; }
    4755    }
    4856    #endregion
     
    5866      : base(new ClassificationProblemData(), new SymbolicClassificationMultiObjectiveMeanSquaredErrorTreeSizeEvaluator(), new SymbolicDataAnalysisExpressionTreeCreator()) {
    5967      Parameters.Add(new FixedValueParameter<DoubleLimit>(EstimationLimitsParameterName, EstimationLimitsParameterDescription));
     68      Parameters.Add(new ValueParameter<ISymbolicClassificationModelCreator>(ModelCreatorParameterName, "", new AccuracyMaximizingThresholdsModelCreator()));
    6069
    6170      EstimationLimitsParameter.Hidden = true;
     
    7483    [StorableHook(HookType.AfterDeserialization)]
    7584    private void AfterDeserialization() {
     85      if (!Parameters.ContainsKey(ModelCreatorParameterName))
     86        Parameters.Add(new ValueParameter<ISymbolicClassificationModelCreator>(ModelCreatorParameterName, "", new AccuracyMaximizingThresholdsModelCreator()));
    7687      RegisterEventHandlers();
    7788    }
     
    7990    private void RegisterEventHandlers() {
    8091      SymbolicExpressionTreeGrammarParameter.ValueChanged += (o, e) => ConfigureGrammarSymbols();
     92      ModelCreatorParameter.NameChanged += (o, e) => ParameterizeOperators();
    8193    }
    8294
     
    110122    }
    111123
    112     protected new void ParameterizeOperators() {
     124    protected override void ParameterizeOperators() {
    113125      base.ParameterizeOperators();
    114126      if (Parameters.ContainsKey(EstimationLimitsParameterName)) {
    115127        var operators = Parameters.OfType<IValueParameter>().Select(p => p.Value).OfType<IOperator>().Union(Operators);
    116         foreach (var op in operators.OfType<ISymbolicDataAnalysisBoundedOperator>()) {
    117           op.EstimationLimitsParameter.ActualName = EstimationLimitsParameterName;
    118         }
     128        foreach (var op in operators.OfType<ISymbolicDataAnalysisBoundedOperator>())
     129          op.EstimationLimitsParameter.ActualName = EstimationLimitsParameter.Name;
     130        foreach (var op in operators.OfType<ISymbolicClassificationModelCreatorOperator>())
     131          op.ModelCreatorParameter.ActualName = ModelCreatorParameter.Name;
    119132      }
    120133    }
Note: See TracChangeset for help on using the changeset viewer.