Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/15/12 16:47:25 (11 years ago)
Author:
mkommend
Message:

#1763: merged changes from trunk into the tree simplifier branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.TreeSimplifier/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveTrainingBestSolutionAnalyzer.cs

    r7259 r8915  
    2222using HeuristicLab.Common;
    2323using HeuristicLab.Core;
    24 using HeuristicLab.Data;
    2524using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2625using HeuristicLab.Parameters;
     
    3837    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter";
    3938    private const string EstimationLimitsParameterName = "EstimationLimits";
    40     private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
    4139    #region parameter properties
    4240    public ILookupParameter<IRegressionProblemData> ProblemDataParameter {
     
    4846    public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter {
    4947      get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
    50     }
    51     public IValueParameter<BoolValue> ApplyLinearScalingParameter {
    52       get { return (IValueParameter<BoolValue>)Parameters[ApplyLinearScalingParameterName]; }
    53     }
    54     #endregion
    55 
    56     #region properties
    57     public BoolValue ApplyLinearScaling {
    58       get { return ApplyLinearScalingParameter.Value; }
    5948    }
    6049    #endregion
     
    6857      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The symbolic data analysis tree interpreter for the symbolic expression tree."));
    6958      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The lower and upper limit for the estimated values produced by the symbolic regression model."));
    70       Parameters.Add(new ValueParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the produced symbolic regression solution should be linearly scaled.", new BoolValue(true)));
    7159    }
    7260    public override IDeepCloneable Clone(Cloner cloner) {
     
    7664    protected override ISymbolicRegressionSolution CreateSolution(ISymbolicExpressionTree bestTree, double bestQuality) {
    7765      var model = new SymbolicRegressionModel((ISymbolicExpressionTree)bestTree.Clone(), SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
    78       if (ApplyLinearScaling.Value)
    79         SymbolicRegressionModel.Scale(model, ProblemDataParameter.ActualValue);
     66      if (ApplyLinearScalingParameter.ActualValue.Value) SymbolicRegressionModel.Scale(model, ProblemDataParameter.ActualValue, ProblemDataParameter.ActualValue.TargetVariable);
    8067      return new SymbolicRegressionSolution(model, (IRegressionProblemData)ProblemDataParameter.ActualValue.Clone());
    8168    }
Note: See TracChangeset for help on using the changeset viewer.