- Timestamp:
- 02/06/20 17:08:41 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/GaussianProcessBase.cs
r17180 r17427 22 22 23 23 using System.Linq; 24 using HEAL.Attic; 24 25 using HeuristicLab.Algorithms.GradientDescent; 25 26 using HeuristicLab.Common; … … 29 30 using HeuristicLab.Optimization; 30 31 using HeuristicLab.Parameters; 31 using H EAL.Attic;32 using HeuristicLab.PluginInfrastructure; 32 33 using HeuristicLab.Problems.DataAnalysis; 33 34 … … 57 58 58 59 #region parameter properties 59 public I ValueParameter<IMeanFunction> MeanFunctionParameter {60 get { return (I ValueParameter<IMeanFunction>)Parameters[MeanFunctionParameterName]; }61 } 62 public I ValueParameter<ICovarianceFunction> CovarianceFunctionParameter {63 get { return (I ValueParameter<ICovarianceFunction>)Parameters[CovarianceFunctionParameterName]; }60 public IConstrainedValueParameter<IMeanFunction> MeanFunctionParameter { 61 get { return (IConstrainedValueParameter<IMeanFunction>)Parameters[MeanFunctionParameterName]; } 62 } 63 public IConstrainedValueParameter<ICovarianceFunction> CovarianceFunctionParameter { 64 get { return (IConstrainedValueParameter<ICovarianceFunction>)Parameters[CovarianceFunctionParameterName]; } 64 65 } 65 66 public IValueParameter<IntValue> MinimizationIterationsParameter { … … 106 107 : base() { 107 108 Problem = problem; 108 Parameters.Add(new ValueParameter<IMeanFunction>(MeanFunctionParameterName, "The mean function to use.", new MeanConst()));109 Parameters.Add(new ValueParameter<ICovarianceFunction>(CovarianceFunctionParameterName, "The covariance function to use.", new CovarianceSquaredExponentialIso()));109 Parameters.Add(new ConstrainedValueParameter<IMeanFunction>(MeanFunctionParameterName, "The mean function to use.")); 110 Parameters.Add(new ConstrainedValueParameter<ICovarianceFunction>(CovarianceFunctionParameterName, "The covariance function to use.")); 110 111 Parameters.Add(new ValueParameter<IntValue>(MinimizationIterationsParameterName, "The number of iterations for likelihood optimization with LM-BFGS.", new IntValue(20))); 111 112 Parameters.Add(new ValueParameter<IntValue>(SeedParameterName, "The random seed used to initialize the new pseudo random number generator.", new IntValue(0))); … … 193 194 194 195 solutionCreator.OperatorParameter.ActualName = SolutionCreatorParameterName; 196 197 foreach (var meanfunction in ApplicationManager.Manager.GetInstances<IMeanFunction>().OrderBy(s => s.ItemName)) 198 MeanFunctionParameter.ValidValues.Add(meanfunction); 199 200 var defaultMeanFunction = MeanFunctionParameter.ValidValues.OfType<MeanConst>().FirstOrDefault(); 201 if (defaultMeanFunction != null) { 202 MeanFunctionParameter.Value = defaultMeanFunction; 203 } 204 205 foreach (var covarianceFunction in ApplicationManager.Manager.GetInstances<ICovarianceFunction>().OrderBy(s => s.ItemName)) 206 CovarianceFunctionParameter.ValidValues.Add(covarianceFunction); 207 208 var defaultCovarianceFunctionParameter = CovarianceFunctionParameter.ValidValues.OfType<CovarianceSquaredExponentialIso>().FirstOrDefault(); 209 if (defaultCovarianceFunctionParameter != null) { 210 CovarianceFunctionParameter.Value = defaultCovarianceFunctionParameter; 211 } 195 212 } 196 213
Note: See TracChangeset
for help on using the changeset viewer.