Changeset 13209 for trunk/sources/HeuristicLab.Algorithms.DataAnalysis
- Timestamp:
- 11/17/15 13:17:49 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/GaussianProcessCovarianceOptimizationProblem.cs
r13201 r13209 37 37 [Creatable(CreatableAttribute.Categories.GeneticProgrammingProblems, Priority = 300)] 38 38 [StorableClass] 39 public sealed class GaussianProcessCovarianceOptimizationProblem : SymbolicExpressionTreeProblem, I RegressionProblem, IProblemInstanceConsumer<IRegressionProblemData>, IProblemInstanceExporter<IRegressionProblemData> {39 public sealed class GaussianProcessCovarianceOptimizationProblem : SymbolicExpressionTreeProblem, IStatefulItem, IRegressionProblem, IProblemInstanceConsumer<IRegressionProblemData>, IProblemInstanceExporter<IRegressionProblemData> { 40 40 #region static variables and ctor 41 41 private static readonly CovarianceMaternIso maternIso1; … … 140 140 141 141 // problem stores a few variables for information exchange from Evaluate() to Analyze() 142 private object problemStateLocker = new object();142 private readonly object problemStateLocker = new object(); 143 143 [Storable] 144 144 private double bestQ; … … 184 184 } 185 185 186 p rotected override void OnReset() {187 base.OnReset();186 public void InitializeState() { ClearState(); } 187 public void ClearState() { 188 188 meanFunc = null; 189 189 covFunc = null; … … 193 193 194 194 public override double Evaluate(ISymbolicExpressionTree tree, IRandom random) { 195 196 195 var meanFunction = new MeanConst(); 197 196 var problemData = ProblemData; … … 322 321 var gradients = model.HyperparameterGradients; 323 322 Array.Copy(gradients, grad, gradients.Length); 324 } catch (ArgumentException) { 323 } 324 catch (ArgumentException) { 325 325 // building the GaussianProcessModel might fail, in this case we return the worst possible objective value 326 326 func = 1.0E+300;
Note: See TracChangeset
for help on using the changeset viewer.