Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/17/12 11:18:40 (12 years ago)
Author:
mkommend
Message:

#1951:

  • Added linear scaling parameter to data analysis problems.
  • Adapted interfaces, evaluators and analyzers accordingly.
  • Added OnlineBoundedMeanSquaredErrorCalculator.
  • Adapted symbolic regression sample unit test.
File:
1 edited

Legend:

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

    r8594 r8664  
    2222using HeuristicLab.Common;
    2323using HeuristicLab.Core;
    24 using HeuristicLab.Data;
    2524using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2625using HeuristicLab.Parameters;
     
    3736    private const string ModelCreatorParameterName = "ModelCreator";
    3837    private const string EstimationLimitsParameterName = "EstimationLimits";
    39     private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
    4038
    4139    #region parameter properties
    4240    public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter {
    4341      get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
    44     }
    45     public IValueParameter<BoolValue> ApplyLinearScalingParameter {
    46       get { return (IValueParameter<BoolValue>)Parameters[ApplyLinearScalingParameterName]; }
    4742    }
    4843    public IValueLookupParameter<ISymbolicClassificationModelCreator> ModelCreatorParameter {
     
    5449    #endregion
    5550
    56     #region properties
    57     public BoolValue ApplyLinearScaling {
    58       get { return ApplyLinearScalingParameter.Value; }
    59     }
    60     #endregion
    6151    [StorableConstructor]
    6252    private SymbolicClassificationMultiObjectiveValidationBestSolutionAnalyzer(bool deserializing) : base(deserializing) { }
     
    6555      : base() {
    6656      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The loewr and upper limit for the estimated values produced by the symbolic classification model."));
    67       Parameters.Add(new ValueParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the produced symbolic classification solution should be linearly scaled.", new BoolValue(false)));
    6857      Parameters.Add(new ValueLookupParameter<ISymbolicClassificationModelCreator>(ModelCreatorParameterName, ""));
    6958    }
     
    7261    }
    7362
    74     [StorableHook(HookType.AfterDeserialization)]
    75     private void AfterDeserialization() {
    76       if (!Parameters.ContainsKey(ModelCreatorParameterName))
    77         Parameters.Add(new ValueLookupParameter<ISymbolicClassificationModelCreator>(ModelCreatorParameterName, ""));
    78     }
    7963
    8064    protected override ISymbolicClassificationSolution CreateSolution(ISymbolicExpressionTree bestTree, double[] bestQualities) {
    8165      var model = ModelCreatorParameter.ActualValue.CreateSymbolicClassificationModel((ISymbolicExpressionTree)bestTree.Clone(), SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
    82       if (ApplyLinearScaling.Value) SymbolicClassificationModel.Scale(model, ProblemDataParameter.ActualValue);
     66      if (ApplyLinearScalingParameter.ActualValue.Value) SymbolicClassificationModel.Scale(model, ProblemDataParameter.ActualValue, ProblemDataParameter.ActualValue.TargetVariable);
    8367
    8468      model.RecalculateModelParameters(ProblemDataParameter.ActualValue, ProblemDataParameter.ActualValue.TrainingIndices);
Note: See TracChangeset for help on using the changeset viewer.