Changeset 14029 for branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/GaussianProcessClassification.cs
- Timestamp:
- 07/08/16 14:40:02 (8 years ago)
- Location:
- branches/crossvalidation-2434
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/crossvalidation-2434
- Property svn:mergeinfo changed
-
branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis
- Property svn:mergeinfo changed
-
branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/GaussianProcessClassification.cs
r12504 r14029 25 25 using HeuristicLab.Common; 26 26 using HeuristicLab.Core; 27 using HeuristicLab.Data; 27 28 using HeuristicLab.Optimization; 28 29 using HeuristicLab.Parameters; … … 48 49 49 50 private const string ModelParameterName = "Model"; 51 private const string CreateSolutionParameterName = "CreateSolution"; 50 52 51 53 #region parameter properties … … 55 57 public IFixedValueParameter<GaussianProcessClassificationSolutionCreator> GaussianProcessSolutionCreatorParameter { 56 58 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; } 57 68 } 58 69 #endregion … … 82 93 new GaussianProcessClassificationSolutionCreator())); 83 94 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; 84 98 85 99 ParameterizedModelCreators(); … … 91 105 [StorableHook(HookType.AfterDeserialization)] 92 106 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 93 114 RegisterEventHandlers(); 94 115 }
Note: See TracChangeset
for help on using the changeset viewer.