Changeset 13891 for trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions
- Timestamp:
- 06/11/16 13:29:45 (8 years ago)
- Location:
- trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions/CovarianceProduct.cs
r13784 r13891 94 94 public static IList<double> GetGradient(double[,] x, int i, int j, List<ParameterizedCovarianceFunction> factorFunctions) { 95 95 var covariances = factorFunctions.Select(f => f.Covariance(x, i, j)).ToArray(); 96 var gr = new List<double>( factorFunctions.Sum(f => f.CovarianceGradient(x, i, j).Count));96 var gr = new List<double>(); 97 97 for (int ii = 0; ii < factorFunctions.Count; ii++) { 98 98 foreach (var g in factorFunctions[ii].CovarianceGradient(x, i, j)) { -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions/CovarianceSum.cs
r13784 r13891 88 88 sum.CrossCovariance = (x, xt, i, j) => functions.Select(e => e.CrossCovariance(x, xt, i, j)).Sum(); 89 89 sum.CovarianceGradient = (x, i, j) => { 90 var g = new List<double>( functions.Sum(e => e.CovarianceGradient(x, i, j).Count));90 var g = new List<double>(); 91 91 foreach (var e in functions) 92 92 g.AddRange(e.CovarianceGradient(x, i, j));
Note: See TracChangeset
for help on using the changeset viewer.