Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/02/16 14:38:40 (8 years ago)
Author:
gkronber
Message:

#2591: merged r13438 (#2541), r13721, r13724, r13784, r13891 from trunk to stable

Location:
stable
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Algorithms.DataAnalysis

  • stable/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/MeanFunctions/MeanConst.cs

    r12009 r13981  
    7676    }
    7777
    78     public ParameterizedMeanFunction GetParameterizedMeanFunction(double[] p, IEnumerable<int> columnIndices) {
     78    public ParameterizedMeanFunction GetParameterizedMeanFunction(double[] p, int[] columnIndices) {
    7979      double c;
    8080      GetParameters(p, out c);
  • stable/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/MeanFunctions/MeanLinear.cs

    r12009 r13981  
    2121
    2222using System;
    23 using System.Collections.Generic;
    2423using System.Linq;
    2524using HeuristicLab.Common;
     
    7069    }
    7170
    72     public ParameterizedMeanFunction GetParameterizedMeanFunction(double[] p, IEnumerable<int> columnIndices) {
     71    public ParameterizedMeanFunction GetParameterizedMeanFunction(double[] p, int[] columnIndices) {
    7372      double[] weights;
    74       int[] columns = columnIndices.ToArray();
     73      int[] columns = columnIndices;
    7574      GetParameter(p, out weights);
    7675      var mf = new ParameterizedMeanFunction();
     
    7877        // sanity check
    7978        if (weights.Length != columns.Length) throw new ArgumentException("The number of rparameters must match the number of variables for the linear mean function.");
    80         return Util.ScalarProd(weights, Util.GetRow(x, i, columns));
     79        return Util.ScalarProd(weights, Util.GetRow(x, i, columns).ToArray());
    8180      };
    8281      mf.Gradient = (x, i, k) => {
  • stable/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/MeanFunctions/MeanModel.cs

    r13146 r13981  
    7373    }
    7474
    75     public ParameterizedMeanFunction GetParameterizedMeanFunction(double[] p, IEnumerable<int> columnIndices) {
     75    public ParameterizedMeanFunction GetParameterizedMeanFunction(double[] p, int[] columnIndices) {
    7676      if (p.Length > 0) throw new ArgumentException("No parameters allowed for model-based mean function.", "p");
    7777      var solution = RegressionSolution;
    7878      var variableNames = solution.ProblemData.AllowedInputVariables.ToArray();
    79       if (variableNames.Length != columnIndices.Count())
     79      if (variableNames.Length != columnIndices.Length)
    8080        throw new ArgumentException("The number of input variables does not match in MeanModel");
    8181      var variableValues = variableNames.Select(_ => new List<double>() { 0.0 }).ToArray(); // or of zeros
  • stable/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/MeanFunctions/MeanProduct.cs

    r12009 r13981  
    7373
    7474
    75     public ParameterizedMeanFunction GetParameterizedMeanFunction(double[] p, IEnumerable<int> columnIndices) {
     75    public ParameterizedMeanFunction GetParameterizedMeanFunction(double[] p, int[] columnIndices) {
    7676      var factorMf = new List<ParameterizedMeanFunction>();
    7777      int totalNumberOfParameters = GetNumberOfParameters(numberOfVariables);
  • stable/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/MeanFunctions/MeanSum.cs

    r12009 r13981  
    6868    }
    6969
    70     public ParameterizedMeanFunction GetParameterizedMeanFunction(double[] p, IEnumerable<int> columnIndices) {
     70    public ParameterizedMeanFunction GetParameterizedMeanFunction(double[] p, int[] columnIndices) {
    7171      var termMf = new List<ParameterizedMeanFunction>();
    7272      int totalNumberOfParameters = GetNumberOfParameters(numberOfVariables);
  • stable/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/MeanFunctions/MeanZero.cs

    r12009 r13981  
    2020#endregion
    2121using System;
    22 using System.Collections.Generic;
    23 using System.Linq;
    2422using HeuristicLab.Common;
    2523using HeuristicLab.Core;
     
    5048    }
    5149
    52     public ParameterizedMeanFunction GetParameterizedMeanFunction(double[] p, IEnumerable<int> columnIndices) {
     50    public ParameterizedMeanFunction GetParameterizedMeanFunction(double[] p, int[] columnIndices) {
    5351      if (p.Length > 0) throw new ArgumentException("No parameters allowed for zero mean function.", "p");
    5452      var mf = new ParameterizedMeanFunction();
Note: See TracChangeset for help on using the changeset viewer.