Changeset 8678 for trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceScale.cs
- Timestamp:
- 09/21/12 18:45:15 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceScale.cs
r8620 r8678 72 72 this.scaleParameter = new HyperParameter<DoubleValue>("Scale", "The scale parameter."); 73 73 this.covParameter = new ValueParameter<ICovarianceFunction>("CovarianceFunction", "The covariance function that should be scaled.", new CovarianceSquaredExponentialIso()); 74 cov = covParameter.Value; 74 75 75 76 Parameters.Add(this.scaleParameter); … … 106 107 } 107 108 108 public double GetCovariance(double[,] x, int i, int j ) {109 return sf2 * cov.GetCovariance(x, i, j );109 public double GetCovariance(double[,] x, int i, int j, IEnumerable<int> columnIndices) { 110 return sf2 * cov.GetCovariance(x, i, j, columnIndices); 110 111 } 111 112 112 public IEnumerable<double> GetGradient(double[,] x, int i, int j ) {113 yield return 2 * sf2 * cov.GetCovariance(x, i, j );114 foreach (var g in cov.GetGradient(x, i, j ))113 public IEnumerable<double> GetGradient(double[,] x, int i, int j, IEnumerable<int> columnIndices) { 114 yield return 2 * sf2 * cov.GetCovariance(x, i, j, columnIndices); 115 foreach (var g in cov.GetGradient(x, i, j, columnIndices)) 115 116 yield return sf2 * g; 116 117 } 117 118 118 public double GetCrossCovariance(double[,] x, double[,] xt, int i, int j ) {119 return sf2 * cov.GetCrossCovariance(x, xt, i, j );119 public double GetCrossCovariance(double[,] x, double[,] xt, int i, int j, IEnumerable<int> columnIndices) { 120 return sf2 * cov.GetCrossCovariance(x, xt, i, j, columnIndices); 120 121 } 121 122 }
Note: See TracChangeset
for help on using the changeset viewer.