Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9632 for stable


Ignore:
Timestamp:
06/15/13 11:20:48 (11 years ago)
Author:
gkronber
Message:

#2059: merged revisions r9534, r9536:9537 r9543 from trunk into the stable branch

Location:
stable
Files:
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Algorithms.DataAnalysis

  • stable/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions/CovariancePiecewisePolynomial.cs

    r9534 r9632  
    4242    }
    4343
    44     public IValueParameter<IntValue> VParameter {
    45       get { return (IValueParameter<IntValue>)Parameters["V"]; }
     44    public IConstrainedValueParameter<IntValue> VParameter {
     45      get { return (IConstrainedValueParameter<IntValue>)Parameters["V"]; }
    4646    }
    4747
     
    6161
    6262      Parameters.Add(new OptionalValueParameter<DoubleValue>("Length", "The length parameter of the isometric piecewise polynomial covariance function."));
    63       Parameters.Add(new OptionalValueParameter<DoubleValue>("Scale", "The scale parameter of the Polynomial covariance function."));
     63      Parameters.Add(new OptionalValueParameter<DoubleValue>("Scale", "The scale parameter of the piecewise polynomial covariance function."));
    6464
    6565      var validValues = new ItemSet<IntValue>(new IntValue[] {
     
    140140      var cov = new ParameterizedCovarianceFunction();
    141141      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));
    143143        return scale * Math.Pow(Math.Max(1 - k, 0), exp + v) * f(k);
    144144      };
    145145      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));
    147147        return scale * Math.Pow(Math.Max(1 - k, 0), exp + v) * f(k);
    148148      };
     
    152152
    153153    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));
    155155      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));
    156156      yield return 2.0 * scale * Math.Pow(Math.Max(1 - k, 0), exp + v) * f(k);
  • stable/HeuristicLab.Algorithms.DataAnalysis/3.4/HeuristicLab.Algorithms.DataAnalysis-3.4.csproj

    r9620 r9632  
    124124    </Compile>
    125125    <Compile Include="FixedDataAnalysisAlgorithm.cs" />
     126    <Compile Include="GaussianProcess\CovarianceFunctions\CovariancePiecewisePolynomial.cs" />
    126127    <Compile Include="GaussianProcess\CovarianceFunctions\CovarianceNeuralNetwork.cs" />
    127128    <Compile Include="GaussianProcess\CovarianceFunctions\CovariancePolynomial.cs" />
Note: See TracChangeset for help on using the changeset viewer.