Changeset 9357 for trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions
- Timestamp:
- 04/15/13 10:43:42 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions/CovarianceLinearArd.cs
r8982 r9357 90 90 91 91 private static IEnumerable<double> GetGradient(double[,] x, int i, int j, double[] inverseLength, IEnumerable<int> columnIndices) { 92 if (columnIndices == null) columnIndices = Enumerable.Range(0, x.GetLength(1));93 94 92 int k = 0; 95 93 foreach (int columnIndex in columnIndices) { -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions/CovarianceMask.cs
r8982 r9357 74 74 75 75 public ParameterizedCovarianceFunction GetParameterizedCovarianceFunction(double[] p, IEnumerable<int> columnIndices) { 76 if (columnIndices != null)77 throw new InvalidOperationException("Stacking of masking covariance functions is not supported.");78 76 var cov = CovarianceFunctionParameter.Value; 79 77 var selectedDimensions = SelectedDimensionsParameter.Value; 80 78 81 return cov.GetParameterizedCovarianceFunction(p, selectedDimensions );79 return cov.GetParameterizedCovarianceFunction(p, selectedDimensions.Intersect(columnIndices)); 82 80 } 83 81 } -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions/CovariancePeriodic.cs
r9211 r9357 141 141 yield return 2.0 * k * scale * Math.Exp(-2 * r * r) *Math.Sin(2*k) * inverseLength * inverseLength; 142 142 yield return 2.0 * scale * Math.Exp(-2 * gradient); 143 /*144 * double s = Math.Log(scale) / 2.0;145 double l = Math.Log(1.0 / inverseLength);146 double p = Math.Log(period);147 143 148 double v;149 {150 v = i == j ? 0.0 : Math.PI * GetDistance(x, x, i, j, columnIndices) * Math.Exp(-p);151 double sin = Math.Sin(v);152 double sin2 = sin * sin;153 yield return 4.0 * sin2 * Math.Exp(-2.0 * Math.Exp(-2 * l) * sin2 - 2 * l + 2 * s);154 }155 {156 double pi_d = i == j ? 0.0 : Math.PI * GetDistance(x, x, i, j, columnIndices);157 double sin = Math.Sin(Math.Exp(-p)*pi_d);158 double sin2 = Math.Sin(2*Math.Exp(-p)*pi_d);159 yield return 2*pi_d*sin2*Math.Exp(-2*Math.Exp(-2*l)*sin*sin - 2*l - p + 2*s);160 }161 {162 double pi_d = i == j ? 0.0 : Math.PI * GetDistance(x, x, i, j, columnIndices);163 double sin = Math.Sin(Math.Exp(-p) * pi_d);164 yield return 2 * Math.Exp(2 * scale - 2 * Math.Exp(-2 * l) * sin * sin);165 }*/166 144 } 167 145 -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions/CovarianceRationalQuadraticArd.cs
r9108 r9357 133 133 134 134 private static IEnumerable<double> GetGradient(double[,] x, int i, int j, IEnumerable<int> columnIndices, double scale, double shape, double[] inverseLength) { 135 if (columnIndices == null) columnIndices = Enumerable.Range(0, x.GetLength(1));136 135 double d = i == j 137 136 ? 0.0 -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions/CovarianceSquaredExponentialArd.cs
r9108 r9357 115 115 // order of returned gradients must match the order in GetParameterValues! 116 116 private static IEnumerable<double> GetGradient(double[,] x, int i, int j, IEnumerable<int> columnIndices, double scale, double[] inverseLength) { 117 if (columnIndices == null) columnIndices = Enumerable.Range(0, x.GetLength(1));118 117 double d = i == j 119 118 ? 0.0
Note: See TracChangeset
for help on using the changeset viewer.