Changeset 13784 for trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions/CovarianceRationalQuadraticIso.cs
 Timestamp:
 04/22/16 13:47:35 (5 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions/CovarianceRationalQuadraticIso.cs
r13721 r13784 139 139 } 140 140 141 private static I Enumerable<double> GetGradient(double[,] x, int i, int j, int[] columnIndices, double scale, double shape, double inverseLength,141 private static IList<double> GetGradient(double[,] x, int i, int j, int[] columnIndices, double scale, double shape, double inverseLength, 142 142 bool fixedInverseLength, bool fixedScale, bool fixedShape) { 143 143 double d = i == j … … 146 146 147 147 double b = 1 + 0.5 * d / shape; 148 if (!fixedInverseLength) yield return scale * Math.Pow(b, shape  1) * d; 149 if (!fixedScale) yield return 2 * scale * Math.Pow(b, shape); 150 if (!fixedShape) yield return scale * Math.Pow(b, shape) * (0.5 * d / b  shape * Math.Log(b)); 148 var g = new List<double>(3); 149 if (!fixedInverseLength) g.Add(scale * Math.Pow(b, shape  1) * d); 150 if (!fixedScale) g.Add(2 * scale * Math.Pow(b, shape)); 151 if (!fixedShape) g.Add(scale * Math.Pow(b, shape) * (0.5 * d / b  shape * Math.Log(b))); 152 return g; 151 153 } 152 154 }
Note: See TracChangeset
for help on using the changeset viewer.