Changeset 13981 for stable/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/MeanFunctions/MeanLinear.cs
- Timestamp:
- 07/02/16 14:38:40 (8 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 13438,13721,13724,13784,13891
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Algorithms.DataAnalysis
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Algorithms.DataAnalysis merged: 13438,13721,13724,13784,13891
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/MeanFunctions/MeanLinear.cs
r12009 r13981 21 21 22 22 using System; 23 using System.Collections.Generic;24 23 using System.Linq; 25 24 using HeuristicLab.Common; … … 70 69 } 71 70 72 public ParameterizedMeanFunction GetParameterizedMeanFunction(double[] p, IEnumerable<int>columnIndices) {71 public ParameterizedMeanFunction GetParameterizedMeanFunction(double[] p, int[] columnIndices) { 73 72 double[] weights; 74 int[] columns = columnIndices .ToArray();73 int[] columns = columnIndices; 75 74 GetParameter(p, out weights); 76 75 var mf = new ParameterizedMeanFunction(); … … 78 77 // sanity check 79 78 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()); 81 80 }; 82 81 mf.Gradient = (x, i, k) => {
Note: See TracChangeset
for help on using the changeset viewer.