- Timestamp:
- 06/12/13 15:02:47 (12 years ago)
- Location:
- branches/HivePerformance/sources
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HivePerformance/sources
- Property svn:mergeinfo changed
/trunk/sources merged: 9540,9542-9544,9552-9555,9568-9569,9587,9590-9592,9600,9607-9608,9610-9611,9613
- Property svn:mergeinfo changed
-
branches/HivePerformance/sources/HeuristicLab.Algorithms.DataAnalysis
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Algorithms.DataAnalysis merged: 9542-9544
- Property svn:mergeinfo changed
-
branches/HivePerformance/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions/CovarianceNeuralNetwork.cs
r9539 r9616 120 120 AutoDiff.Term s1 = 1; 121 121 AutoDiff.Term s2 = 1; 122 for each (var k in columnIndices) {122 for (int k = 0; k < columnIndices.Count(); k++) { 123 123 x1[k] = new AutoDiff.Variable(); 124 124 x2[k] = new AutoDiff.Variable(); -
branches/HivePerformance/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions/CovarianceNoise.cs
r9539 r9616 87 87 var cov = new ParameterizedCovarianceFunction(); 88 88 cov.Covariance = (x, i, j) => i == j ? scale : 0.0; 89 cov.CrossCovariance = (x, xt, i, j) => 0.0;89 cov.CrossCovariance = (x, xt, i, j) => Util.SqrDist(x, i, xt, j, 1.0, columnIndices) < 1e-9 ? scale : 0.0; 90 90 cov.CovarianceGradient = (x, i, j) => Enumerable.Repeat(i == j ? 2.0 * scale : 0.0, 1); 91 91 return cov; -
branches/HivePerformance/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions/CovariancePiecewisePolynomial.cs
r9539 r9616 140 140 var cov = new ParameterizedCovarianceFunction(); 141 141 cov.Covariance = (x, i, j) => { 142 double k = Math.Sqrt(Util.SqrDist(x, i, x, j, 1.0 / length ));142 double k = Math.Sqrt(Util.SqrDist(x, i, x, j, 1.0 / length, columnIndices)); 143 143 return scale * Math.Pow(Math.Max(1 - k, 0), exp + v) * f(k); 144 144 }; 145 145 cov.CrossCovariance = (x, xt, i, j) => { 146 double k = Math.Sqrt(Util.SqrDist(x, i, xt, j, 1.0 / length ));146 double k = Math.Sqrt(Util.SqrDist(x, i, xt, j, 1.0 / length, columnIndices)); 147 147 return scale * Math.Pow(Math.Max(1 - k, 0), exp + v) * f(k); 148 148 }; … … 152 152 153 153 private static IEnumerable<double> GetGradient(double[,] x, int i, int j, double length, double scale, int v, double exp, Func<double, double> f, Func<double, double> df, IEnumerable<int> columnIndices) { 154 double k = Math.Sqrt(Util.SqrDist(x, i, x, j, 1.0 / length ));154 double k = Math.Sqrt(Util.SqrDist(x, i, x, j, 1.0 / length, columnIndices)); 155 155 yield return scale * Math.Pow(Math.Max(1.0 - k, 0), exp + v - 1) * k * ((exp + v) * f(k) - Math.Max(1 - k, 0) * df(k)); 156 156 yield return 2.0 * scale * Math.Pow(Math.Max(1 - k, 0), exp + v) * f(k);
Note: See TracChangeset
for help on using the changeset viewer.