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
Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePenaltyScoreEvaluator.cs

    r8551 r8594  
    2525using HeuristicLab.Data;
    2626using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
     27using HeuristicLab.Parameters;
    2728using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2829
     
    3031  [Item("Penalty Score Evaluator", "Calculates the penalty score of a symbolic classification solution.")]
    3132  [StorableClass]
    32   public class SymbolicClassificationSingleObjectivePenaltyScoreEvaluator : SymbolicClassificationSingleObjectiveEvaluator {
     33  public class SymbolicClassificationSingleObjectivePenaltyScoreEvaluator : SymbolicClassificationSingleObjectiveEvaluator, ISymbolicClassificationModelCreatorOperator {
     34    private const string ModelCreatorParameterName = "ModelCreator";
    3335    public override bool Maximization { get { return false; } }
     36
     37    public IValueLookupParameter<ISymbolicClassificationModelCreator> ModelCreatorParameter {
     38      get { return (IValueLookupParameter<ISymbolicClassificationModelCreator>)Parameters[ModelCreatorParameterName]; }
     39    }
     40    ILookupParameter<ISymbolicClassificationModelCreator> ISymbolicClassificationModelCreatorOperator.ModelCreatorParameter {
     41      get { return ModelCreatorParameter; }
     42    }
    3443
    3544    [StorableConstructor]
    3645    protected SymbolicClassificationSingleObjectivePenaltyScoreEvaluator(bool deserializing) : base(deserializing) { }
    3746    protected SymbolicClassificationSingleObjectivePenaltyScoreEvaluator(SymbolicClassificationSingleObjectivePenaltyScoreEvaluator original, Cloner cloner) : base(original, cloner) { }
    38     public SymbolicClassificationSingleObjectivePenaltyScoreEvaluator() : base() { }
     47    public SymbolicClassificationSingleObjectivePenaltyScoreEvaluator()
     48      : base() {
     49      Parameters.Add(new ValueLookupParameter<ISymbolicClassificationModelCreator>(ModelCreatorParameterName, ""));
     50    }
    3951
    4052    public override IDeepCloneable Clone(Cloner cloner) {
    4153      return new SymbolicClassificationSingleObjectivePenaltyScoreEvaluator(this, cloner);
    4254    }
     55
     56    [StorableHook(HookType.AfterDeserialization)]
     57    private void AfterDeserialization() {
     58      if (!Parameters.ContainsKey(ModelCreatorParameterName))
     59        Parameters.Add(new ValueLookupParameter<ISymbolicClassificationModelCreator>(ModelCreatorParameterName, ""));
     60    }
     61
    4362
    4463    public override IOperation Apply() {
     
    6685      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
    6786      EstimationLimitsParameter.ExecutionContext = context;
     87      ModelCreatorParameter.ExecutionContext = context;
    6888
    69       var model = new SymbolicDiscriminantFunctionClassificationModel(tree, SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
    70       model.SetAccuracyMaximizingThresholds(problemData);
     89      var model = ModelCreatorParameter.ActualValue.CreateSymbolicClassificationModel(tree, SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
     90      model.RecalculateModelParameters(problemData, rows);
    7191      double penalty = Calculate(model, problemData, rows);
    7292
    7393      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
    7494      EstimationLimitsParameter.ExecutionContext = null;
     95      ModelCreatorParameter.ExecutionContext = null;
    7596
    7697      return penalty;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs

    r8175 r8594  
    3535    private const string EstimationLimitsParameterName = "EstimationLimits";
    3636    private const string EstimationLimitsParameterDescription = "The lower and upper limit for the estimated value that can be returned by the symbolic classification model.";
     37    private const string ModelCreatorParameterName = "ModelCreator";
    3738
    3839    #region parameter properties
     
    4041      get { return (IFixedValueParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
    4142    }
     43    public IValueParameter<ISymbolicClassificationModelCreator> ModelCreatorParameter {
     44      get { return (IValueParameter<ISymbolicClassificationModelCreator>)Parameters[ModelCreatorParameterName]; }
     45    }
    4246    #endregion
    4347    #region properties
    4448    public DoubleLimit EstimationLimits {
    4549      get { return EstimationLimitsParameter.Value; }
     50    }
     51    public ISymbolicClassificationModelCreator ModelCreator {
     52      get { return ModelCreatorParameter.Value; }
    4653    }
    4754    #endregion
     
    5764      : base(new ClassificationProblemData(), new SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator(), new SymbolicDataAnalysisExpressionTreeCreator()) {
    5865      Parameters.Add(new FixedValueParameter<DoubleLimit>(EstimationLimitsParameterName, EstimationLimitsParameterDescription));
     66      Parameters.Add(new ValueParameter<ISymbolicClassificationModelCreator>(ModelCreatorParameterName, "", new AccuracyMaximizingThresholdsModelCreator()));
    5967
    6068      EstimationLimitsParameter.Hidden = true;
     
    7179    [StorableHook(HookType.AfterDeserialization)]
    7280    private void AfterDeserialization() {
    73       RegisterEventHandlers();
    74       // compatibility
     81
     82      if (!Parameters.ContainsKey(ModelCreatorParameterName))
     83        Parameters.Add(new ValueParameter<ISymbolicClassificationModelCreator>(ModelCreatorParameterName, "", new AccuracyMaximizingThresholdsModelCreator()));
     84
    7585      bool changed = false;
    7686      if (!Operators.OfType<SymbolicClassificationSingleObjectiveTrainingParetoBestSolutionAnalyzer>().Any()) {
     
    8393      }
    8494      if (changed) ParameterizeOperators();
     95      RegisterEventHandlers();
    8596    }
    8697
    8798    private void RegisterEventHandlers() {
    8899      SymbolicExpressionTreeGrammarParameter.ValueChanged += (o, e) => ConfigureGrammarSymbols();
     100      ModelCreatorParameter.NameChanged += (o, e) => ParameterizeOperators();
    89101    }
    90102
     
    125137      if (Parameters.ContainsKey(EstimationLimitsParameterName)) {
    126138        var operators = Parameters.OfType<IValueParameter>().Select(p => p.Value).OfType<IOperator>().Union(Operators);
    127         foreach (var op in operators.OfType<ISymbolicDataAnalysisBoundedOperator>()) {
     139        foreach (var op in operators.OfType<ISymbolicDataAnalysisBoundedOperator>())
    128140          op.EstimationLimitsParameter.ActualName = EstimationLimitsParameter.Name;
    129         }
     141        foreach (var op in operators.OfType<ISymbolicClassificationModelCreatorOperator>())
     142          op.ModelCreatorParameter.ActualName = ModelCreatorParameter.Name;
    130143      }
    131144    }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveTrainingBestSolutionAnalyzer.cs

    r8550 r8594  
    3434  [StorableClass]
    3535  public sealed class SymbolicClassificationSingleObjectiveTrainingBestSolutionAnalyzer : SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer<ISymbolicClassificationSolution>,
    36     ISymbolicDataAnalysisInterpreterOperator, ISymbolicDataAnalysisBoundedOperator {
     36    ISymbolicDataAnalysisInterpreterOperator, ISymbolicDataAnalysisBoundedOperator, ISymbolicClassificationModelCreatorOperator {
    3737    private const string ProblemDataParameterName = "ProblemData";
     38    private const string ModelCreatorParameterName = "ModelCreator";
    3839    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter";
    3940    private const string EstimationLimitsParameterName = "UpperEstimationLimit";
     
    4243    public ILookupParameter<IClassificationProblemData> ProblemDataParameter {
    4344      get { return (ILookupParameter<IClassificationProblemData>)Parameters[ProblemDataParameterName]; }
     45    }
     46    public IValueLookupParameter<ISymbolicClassificationModelCreator> ModelCreatorParameter {
     47      get { return (IValueLookupParameter<ISymbolicClassificationModelCreator>)Parameters[ModelCreatorParameterName]; }
     48    }
     49    ILookupParameter<ISymbolicClassificationModelCreator> ISymbolicClassificationModelCreatorOperator.ModelCreatorParameter {
     50      get { return ModelCreatorParameter; }
    4451    }
    4552    public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter {
     
    6572      : base() {
    6673      Parameters.Add(new LookupParameter<IClassificationProblemData>(ProblemDataParameterName, "The problem data for the symbolic classification solution."));
     74      Parameters.Add(new ValueLookupParameter<ISymbolicClassificationModelCreator>(ModelCreatorParameterName, ""));
    6775      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The symbolic data analysis tree interpreter for the symbolic expression tree."));
    6876      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The lower and upper limit for the estimated values produced by the symbolic classification model."));
    6977      Parameters.Add(new ValueParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the produced symbolic classification solution should be linearly scaled.", new BoolValue(false)));
    7078    }
     79
    7180    public override IDeepCloneable Clone(Cloner cloner) {
    7281      return new SymbolicClassificationSingleObjectiveTrainingBestSolutionAnalyzer(this, cloner);
    7382    }
     83    [StorableHook(HookType.AfterDeserialization)]
     84    private void AfterDeserialization() {
     85      if (!Parameters.ContainsKey(ModelCreatorParameterName))
     86        Parameters.Add(new ValueLookupParameter<ISymbolicClassificationModelCreator>(ModelCreatorParameterName, ""));
     87    }
    7488
    7589    protected override ISymbolicClassificationSolution CreateSolution(ISymbolicExpressionTree bestTree, double bestQuality) {
    76       var model = new SymbolicDiscriminantFunctionClassificationModel((ISymbolicExpressionTree)bestTree.Clone(), SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
    77       if (ApplyLinearScaling.Value) SymbolicDiscriminantFunctionClassificationModel.Scale(model, ProblemDataParameter.ActualValue);
     90      var model = ModelCreatorParameter.ActualValue.CreateSymbolicClassificationModel((ISymbolicExpressionTree)bestTree.Clone(), SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
     91      if (ApplyLinearScaling.Value) SymbolicClassificationModel.Scale(model, ProblemDataParameter.ActualValue);
    7892
    79       model.SetAccuracyMaximizingThresholds(ProblemDataParameter.ActualValue);
    80       return new SymbolicDiscriminantFunctionClassificationSolution(model, (IClassificationProblemData)ProblemDataParameter.ActualValue.Clone());
     93      model.RecalculateModelParameters(ProblemDataParameter.ActualValue, ProblemDataParameter.ActualValue.TrainingIndices);
     94      return model.CreateClassificationSolution((IClassificationProblemData)ProblemDataParameter.ActualValue.Clone());
    8195    }
    8296  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveTrainingParetoBestSolutionAnalyzer.cs

    r8550 r8594  
    3333  [Item("SymbolicClassificationSingleObjectiveTrainingParetoBestSolutionAnalyzer", "An operator that collects the training Pareto-best symbolic classification solutions for single objective symbolic classification problems.")]
    3434  [StorableClass]
    35   public sealed class SymbolicClassificationSingleObjectiveTrainingParetoBestSolutionAnalyzer : SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer<IClassificationProblemData, ISymbolicClassificationSolution> {
     35  public sealed class SymbolicClassificationSingleObjectiveTrainingParetoBestSolutionAnalyzer : SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer<IClassificationProblemData, ISymbolicClassificationSolution>, ISymbolicClassificationModelCreatorOperator {
    3636    private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
     37    private const string ModelCreatorParameterName = "ModelCreator";
    3738    #region parameter properties
    3839    public IValueParameter<BoolValue> ApplyLinearScalingParameter {
    3940      get { return (IValueParameter<BoolValue>)Parameters[ApplyLinearScalingParameterName]; }
     41    }
     42    public IValueLookupParameter<ISymbolicClassificationModelCreator> ModelCreatorParameter {
     43      get { return (IValueLookupParameter<ISymbolicClassificationModelCreator>)Parameters[ModelCreatorParameterName]; }
     44    }
     45    ILookupParameter<ISymbolicClassificationModelCreator> ISymbolicClassificationModelCreatorOperator.ModelCreatorParameter {
     46      get { return ModelCreatorParameter; }
    4047    }
    4148    #endregion
     
    5360      : base() {
    5461      Parameters.Add(new ValueParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the produced symbolic classification solution should be linearly scaled.", new BoolValue(false)));
     62      Parameters.Add(new ValueLookupParameter<ISymbolicClassificationModelCreator>(ModelCreatorParameterName, ""));
    5563    }
    5664    public override IDeepCloneable Clone(Cloner cloner) {
     
    5866    }
    5967
     68    [StorableHook(HookType.AfterDeserialization)]
     69    private void AfterDeserialization() {
     70      if (!Parameters.ContainsKey(ModelCreatorParameterName))
     71        Parameters.Add(new ValueLookupParameter<ISymbolicClassificationModelCreator>(ModelCreatorParameterName, ""));
     72    }
     73
    6074    protected override ISymbolicClassificationSolution CreateSolution(ISymbolicExpressionTree bestTree) {
    61       var model = new SymbolicDiscriminantFunctionClassificationModel((ISymbolicExpressionTree)bestTree.Clone(), SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
    62       if (ApplyLinearScaling.Value) SymbolicDiscriminantFunctionClassificationModel.Scale(model, ProblemDataParameter.ActualValue);
     75      var model = ModelCreatorParameter.ActualValue.CreateSymbolicClassificationModel((ISymbolicExpressionTree)bestTree.Clone(), SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
     76      if (ApplyLinearScaling.Value) SymbolicClassificationModel.Scale(model, ProblemDataParameter.ActualValue);
    6377
    64       model.SetAccuracyMaximizingThresholds(ProblemDataParameter.ActualValue);
    65       return new SymbolicDiscriminantFunctionClassificationSolution(model, (IClassificationProblemData)ProblemDataParameter.ActualValue.Clone());
     78      model.RecalculateModelParameters(ProblemDataParameter.ActualValue, ProblemDataParameter.ActualValue.TrainingIndices);
     79      return model.CreateClassificationSolution((IClassificationProblemData)ProblemDataParameter.ActualValue.Clone());
    6680    }
    6781  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveValidationBestSolutionAnalyzer.cs

    r8550 r8594  
    3434  [StorableClass]
    3535  public sealed class SymbolicClassificationSingleObjectiveValidationBestSolutionAnalyzer : SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer<ISymbolicClassificationSolution, ISymbolicClassificationSingleObjectiveEvaluator, IClassificationProblemData>,
    36   ISymbolicDataAnalysisBoundedOperator {
     36  ISymbolicDataAnalysisBoundedOperator, ISymbolicClassificationModelCreatorOperator {
    3737    private const string EstimationLimitsParameterName = "EstimationLimits";
    3838    private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
     39    private const string ModelCreatorParameterName = "ModelCreator";
    3940
    4041    #region parameter properties
     
    4445    public IValueParameter<BoolValue> ApplyLinearScalingParameter {
    4546      get { return (IValueParameter<BoolValue>)Parameters[ApplyLinearScalingParameterName]; }
     47    }
     48    public IValueLookupParameter<ISymbolicClassificationModelCreator> ModelCreatorParameter {
     49      get { return (IValueLookupParameter<ISymbolicClassificationModelCreator>)Parameters[ModelCreatorParameterName]; }
     50    }
     51    ILookupParameter<ISymbolicClassificationModelCreator> ISymbolicClassificationModelCreatorOperator.ModelCreatorParameter {
     52      get { return ModelCreatorParameter; }
    4653    }
    4754    #endregion
     
    5966      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The lower and upper limit for the estimated values produced by the symbolic classification model."));
    6067      Parameters.Add(new ValueParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the produced symbolic classification solution should be linearly scaled.", new BoolValue(false)));
     68      Parameters.Add(new ValueLookupParameter<ISymbolicClassificationModelCreator>(ModelCreatorParameterName, ""));
    6169    }
    6270    public override IDeepCloneable Clone(Cloner cloner) {
     
    6472    }
    6573
     74    [StorableHook(HookType.AfterDeserialization)]
     75    private void AfterDeserialization() {
     76      if (!Parameters.ContainsKey(ModelCreatorParameterName))
     77        Parameters.Add(new ValueLookupParameter<ISymbolicClassificationModelCreator>(ModelCreatorParameterName, ""));
     78    }
     79
    6680    protected override ISymbolicClassificationSolution CreateSolution(ISymbolicExpressionTree bestTree, double bestQuality) {
    67       var model = new SymbolicDiscriminantFunctionClassificationModel((ISymbolicExpressionTree)bestTree.Clone(), SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
    68       if (ApplyLinearScaling.Value) SymbolicDiscriminantFunctionClassificationModel.Scale(model, ProblemDataParameter.ActualValue);
     81      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);
    6983
    70       model.SetAccuracyMaximizingThresholds(ProblemDataParameter.ActualValue);
    71       return new SymbolicDiscriminantFunctionClassificationSolution(model, (IClassificationProblemData)ProblemDataParameter.ActualValue.Clone());
     84      model.RecalculateModelParameters(ProblemDataParameter.ActualValue, ProblemDataParameter.ActualValue.TrainingIndices);
     85      return model.CreateClassificationSolution((IClassificationProblemData)ProblemDataParameter.ActualValue.Clone());
    7286    }
    7387  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveValidationParetoBestSolutionAnalyzer.cs

    r8550 r8594  
    3333  [Item("SymbolicClassificationSingleObjectiveValidationParetoBestSolutionAnalyzer", "An operator that collects the validation Pareto-best symbolic classification solutions for single objective symbolic classification problems.")]
    3434  [StorableClass]
    35   public sealed class SymbolicClassificationSingleObjectiveValidationParetoBestSolutionAnalyzer : SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer<ISymbolicClassificationSolution, ISymbolicClassificationSingleObjectiveEvaluator, IClassificationProblemData> {
     35  public sealed class SymbolicClassificationSingleObjectiveValidationParetoBestSolutionAnalyzer : SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer<ISymbolicClassificationSolution, ISymbolicClassificationSingleObjectiveEvaluator, IClassificationProblemData>, ISymbolicClassificationModelCreatorOperator {
    3636    private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
     37    private const string ModelCreatorParameterName = "ModelCreator";
    3738    #region parameter properties
    3839    public IValueParameter<BoolValue> ApplyLinearScalingParameter {
    3940      get { return (IValueParameter<BoolValue>)Parameters[ApplyLinearScalingParameterName]; }
     41    }
     42    public IValueLookupParameter<ISymbolicClassificationModelCreator> ModelCreatorParameter {
     43      get { return (IValueLookupParameter<ISymbolicClassificationModelCreator>)Parameters[ModelCreatorParameterName]; }
     44    }
     45    ILookupParameter<ISymbolicClassificationModelCreator> ISymbolicClassificationModelCreatorOperator.ModelCreatorParameter {
     46      get { return ModelCreatorParameter; }
    4047    }
    4148    #endregion
     
    5360      : base() {
    5461      Parameters.Add(new ValueParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the produced symbolic classification solution should be linearly scaled.", new BoolValue(false)));
     62      Parameters.Add(new ValueLookupParameter<ISymbolicClassificationModelCreator>(ModelCreatorParameterName, ""));
    5563    }
    5664    public override IDeepCloneable Clone(Cloner cloner) {
     
    5866    }
    5967
     68    [StorableHook(HookType.AfterDeserialization)]
     69    private void AfterDeserialization() {
     70      if (!Parameters.ContainsKey(ModelCreatorParameterName))
     71        Parameters.Add(new ValueLookupParameter<ISymbolicClassificationModelCreator>(ModelCreatorParameterName, ""));
     72    }
     73
    6074    protected override ISymbolicClassificationSolution CreateSolution(ISymbolicExpressionTree bestTree) {
    61       var model = new SymbolicDiscriminantFunctionClassificationModel((ISymbolicExpressionTree)bestTree.Clone(), SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
    62       if (ApplyLinearScaling.Value) SymbolicDiscriminantFunctionClassificationModel.Scale(model, ProblemDataParameter.ActualValue);
     75      var model = ModelCreatorParameter.ActualValue.CreateSymbolicClassificationModel((ISymbolicExpressionTree)bestTree.Clone(), SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
     76      if (ApplyLinearScaling.Value) SymbolicClassificationModel.Scale(model, ProblemDataParameter.ActualValue);
    6377
    64       model.SetAccuracyMaximizingThresholds(ProblemDataParameter.ActualValue);
    65       return new SymbolicDiscriminantFunctionClassificationSolution(model, (IClassificationProblemData)ProblemDataParameter.ActualValue.Clone());
     78      model.RecalculateModelParameters(ProblemDataParameter.ActualValue, ProblemDataParameter.ActualValue.TrainingIndices);
     79      return model.CreateClassificationSolution((IClassificationProblemData)ProblemDataParameter.ActualValue.Clone());
    6680    }
    6781  }
Note: See TracChangeset for help on using the changeset viewer.