- Timestamp:
- 11/05/15 07:49:41 (9 years ago)
- Location:
- trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/GaussianProcessBase.cs
r13118 r13119 21 21 #endregion 22 22 23 using System;24 using System.Linq;25 23 using HeuristicLab.Algorithms.GradientDescent; 26 24 using HeuristicLab.Common; … … 31 29 using HeuristicLab.Parameters; 32 30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 33 using HeuristicLab.PluginInfrastructure;34 31 using HeuristicLab.Problems.DataAnalysis; 35 32 -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/GaussianProcessClassificationModelCreator.cs
r12012 r13119 62 62 public override IOperation Apply() { 63 63 try { 64 var model = Create(ProblemData, Hyperparameter.ToArray(), MeanFunction, CovarianceFunction );64 var model = Create(ProblemData, Hyperparameter.ToArray(), MeanFunction, CovarianceFunction, ScaleInputValues); 65 65 ModelParameter.ActualValue = model; 66 66 NegativeLogLikelihoodParameter.ActualValue = new DoubleValue(model.NegativeLogLikelihood); 67 67 HyperparameterGradientsParameter.ActualValue = new RealVector(model.HyperparameterGradients); 68 68 return base.Apply(); 69 } 70 catch (ArgumentException) { } 71 catch (alglib.alglibexception) { } 69 } catch (ArgumentException) { } catch (alglib.alglibexception) { } 72 70 NegativeLogLikelihoodParameter.ActualValue = new DoubleValue(1E300); 73 71 HyperparameterGradientsParameter.ActualValue = new RealVector(Hyperparameter.Count()); … … 75 73 } 76 74 77 public static IGaussianProcessModel Create(IClassificationProblemData problemData, double[] hyperparameter, IMeanFunction meanFunction, ICovarianceFunction covarianceFunction ) {78 return new GaussianProcessModel(problemData.Dataset, problemData.TargetVariable, problemData.AllowedInputVariables, problemData.TrainingIndices, hyperparameter, meanFunction, covarianceFunction );75 public static IGaussianProcessModel Create(IClassificationProblemData problemData, double[] hyperparameter, IMeanFunction meanFunction, ICovarianceFunction covarianceFunction, bool scaleInputs = true) { 76 return new GaussianProcessModel(problemData.Dataset, problemData.TargetVariable, problemData.AllowedInputVariables, problemData.TrainingIndices, hyperparameter, meanFunction, covarianceFunction, scaleInputs); 79 77 } 80 78 }
Note: See TracChangeset
for help on using the changeset viewer.