Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/21/11 00:19:08 (13 years ago)
Author:
mkommend
Message:

#1418: Changed data type of estimation limits and corrected some bugs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveTrainingBestSolutionAnalyzer.cs

    r5747 r5770  
    2020#endregion
    2121
    22 using System.Collections.Generic;
    23 using System.Linq;
    2422using HeuristicLab.Common;
    2523using HeuristicLab.Core;
    2624using HeuristicLab.Data;
    2725using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    28 using HeuristicLab.Operators;
    29 using HeuristicLab.Optimization;
    3026using HeuristicLab.Parameters;
    3127using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    4137    private const string ProblemDataParameterName = "ProblemData";
    4238    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter";
    43     private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
    44     private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
     39    private const string EstimationLimitsParameterName = "EstimationLimits";
    4540    private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
     41
    4642    #region parameter properties
    4743    public ILookupParameter<IClassificationProblemData> ProblemDataParameter {
     
    5147      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
    5248    }
    53     public IValueLookupParameter<DoubleValue> UpperEstimationLimitParameter {
    54       get { return (IValueLookupParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
    55     }
    56 
    57     public IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter {
    58       get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
     49    public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter {
     50      get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
    5951    }
    6052    public IValueParameter<BoolValue> ApplyLinearScalingParameter {
     
    6254    }
    6355    #endregion
     56
    6457    #region properties
    65     public IClassificationProblemData ProblemData {
    66       get { return ProblemDataParameter.ActualValue; }
    67     }
    68     public ISymbolicDataAnalysisExpressionTreeInterpreter SymbolicDataAnalysisTreeInterpreter {
    69       get { return SymbolicDataAnalysisTreeInterpreterParameter.ActualValue; }
    70     }
    71     public DoubleValue UpperEstimationLimit {
    72       get { return UpperEstimationLimitParameter.ActualValue; }
    73     }
    74     public DoubleValue LowerEstimationLimit {
    75       get { return LowerEstimationLimitParameter.ActualValue; }
    76     }
    7758    public BoolValue ApplyLinearScaling {
    7859      get { return ApplyLinearScalingParameter.Value; }
     
    8768      Parameters.Add(new LookupParameter<IClassificationProblemData>(ProblemDataParameterName, "The problem data for the symbolic classification solution."));
    8869      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The symbolic data analysis tree interpreter for the symbolic expression tree."));
    89       Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperEstimationLimitParameterName, "The upper limit for the estimated values produced by the symbolic classification model."));
    90       Parameters.Add(new ValueLookupParameter<DoubleValue>(LowerEstimationLimitParameterName, "The lower limit for the estimated values produced by the symbolic classification model."));
     70      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The lower and upper limit for the estimated values produced by the symbolic classification model."));
    9171      Parameters.Add(new ValueParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the produced symbolic classification solution should be linearly scaled.", new BoolValue(false)));
    9272    }
     
    9676
    9777    protected override ISymbolicClassificationSolution CreateSolution(ISymbolicExpressionTree bestTree, double[] bestQuality) {
    98       var model = new SymbolicDiscriminantFunctionClassificationModel(bestTree, SymbolicDataAnalysisTreeInterpreter, LowerEstimationLimit.Value, UpperEstimationLimit.Value);
    99       var solution = new SymbolicDiscriminantFunctionClassificationSolution(model, ProblemData);
     78      var model = new SymbolicDiscriminantFunctionClassificationModel(bestTree, SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
     79      var solution = new SymbolicDiscriminantFunctionClassificationSolution(model, ProblemDataParameter.ActualValue);
    10080      if (ApplyLinearScaling.Value) {
    10181        solution.ScaleModel();
Note: See TracChangeset for help on using the changeset viewer.