Changeset 8403 for trunk/sources/HeuristicLab.Algorithms.DataAnalysis
- Timestamp:
- 08/02/12 19:37:10 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceSEard.cs
r8401 r8403 73 73 this.symmetric = false; 74 74 75 this.l = new double[hyp.Length - 1]; 76 Array.Copy(hyp, l, l.Length); 75 this.l = hyp.Take(hyp.Length - 1).Select(Math.Exp).ToArray(); 77 76 this.sf2 = Math.Exp(2 * hyp[hyp.Length - 1]); 77 sf2 = Math.Min(10E6, sf2); // upper limit for the scale 78 78 79 sd = null; 79 80 } … … 90 91 var sd = new double[rows]; 91 92 for (int i = 0; i < rows; i++) { 92 sd[i] = Util.SqrDist(Util.GetRow(x, i).Select((e, k) => e / l[k]), Util.GetRow(xt, i).Select((e, k) => e / l[k])); 93 sd[i] = Util.SqrDist( 94 Util.GetRow(x, i).Select((e, k) => e / l[k]), 95 Util.GetRow(xt, i).Select((e, k) => e / l[k])); 93 96 } 94 97 return sd.Select(d => sf2 * Math.Exp(-d / 2.0)).ToArray();
Note: See TracChangeset
for help on using the changeset viewer.