Changeset 8484 for trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceNoise.cs
- Timestamp:
- 08/14/12 13:25:17 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceNoise.cs
r8473 r8484 21 21 22 22 using System; 23 using System.Collections.Generic; 23 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; … … 59 60 this.sf2 = Math.Exp(2 * hyp[0]); 60 61 } 61 public void SetData(double[,] x) { 62 // nothing to do 62 63 public double GetCovariance(double[,] x, int i, int j) { 64 return sf2; 63 65 } 64 66 65 66 public void SetData(double[,] x, double[,] xt) { 67 // nothing to do 67 public IEnumerable<double> GetGradient(double[,] x, int i, int j) { 68 yield return 2 * sf2; 68 69 } 69 70 70 public double GetCovariance(int i, int j) { 71 if (i == j) return sf2; 72 else return 0.0; 73 } 74 75 public double GetGradient(int i, int j, int k) { 76 if (k != 0) throw new ArgumentException("CovarianceConst has only one hyperparameters", "k"); 77 if (i == j) 78 return 2 * sf2; 79 else 80 return 0.0; 71 public double GetCrossCovariance(double[,] x, double[,] xt, int i, int j) { 72 return 0.0; 81 73 } 82 74 }
Note: See TracChangeset
for help on using the changeset viewer.