Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/19/15 11:45:22 (8 years ago)
Author:
gkronber
Message:

#2385: merged r12934,r13204,r13205,r13270 from trunk to stable

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Algorithms.DataAnalysis

  • stable/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/GaussianProcessClassification.cs

    r12708 r13283  
    2525using HeuristicLab.Common;
    2626using HeuristicLab.Core;
     27using HeuristicLab.Data;
    2728using HeuristicLab.Optimization;
    2829using HeuristicLab.Parameters;
     
    4849
    4950    private const string ModelParameterName = "Model";
     51    private const string CreateSolutionParameterName = "CreateSolution";
    5052
    5153    #region parameter properties
     
    5557    public IFixedValueParameter<GaussianProcessClassificationSolutionCreator> GaussianProcessSolutionCreatorParameter {
    5658      get { return (IFixedValueParameter<GaussianProcessClassificationSolutionCreator>)Parameters[SolutionCreatorParameterName]; }
     59    }
     60    public IFixedValueParameter<BoolValue> CreateSolutionParameter {
     61      get { return (IFixedValueParameter<BoolValue>)Parameters[CreateSolutionParameterName]; }
     62    }
     63    #endregion
     64    #region properties
     65    public bool CreateSolution {
     66      get { return CreateSolutionParameter.Value.Value; }
     67      set { CreateSolutionParameter.Value.Value = value; }
    5768    }
    5869    #endregion
     
    8293        new GaussianProcessClassificationSolutionCreator()));
    8394      Parameters[SolutionCreatorParameterName].Hidden = true;
     95      // TODO: it would be better to deactivate the solution creator when this parameter is changed
     96      Parameters.Add(new FixedValueParameter<BoolValue>(CreateSolutionParameterName, "Flag that indicates if a solution should be produced at the end of the run", new BoolValue(true)));
     97      Parameters[CreateSolutionParameterName].Hidden = true;
    8498
    8599      ParameterizedModelCreators();
     
    91105    [StorableHook(HookType.AfterDeserialization)]
    92106    private void AfterDeserialization() {
     107      // BackwardsCompatibility3.3
     108      #region Backwards compatible code, remove with 3.4
     109      if (!Parameters.ContainsKey(CreateSolutionParameterName)) {
     110        Parameters.Add(new FixedValueParameter<BoolValue>(CreateSolutionParameterName, "Flag that indicates if a solution should be produced at the end of the run", new BoolValue(true)));
     111        Parameters[CreateSolutionParameterName].Hidden = true;
     112      }
     113      #endregion
    93114      RegisterEventHandlers();
    94115    }
Note: See TracChangeset for help on using the changeset viewer.