Changeset 13921 for trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesModelSurrogate.cs
- Timestamp:
- 06/19/16 19:56:11 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesModelSurrogate.cs
r13157 r13921 22 22 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Core; … … 54 55 private int maxSize; 55 56 57 public string TargetVariable { 58 get { return trainingProblemData.TargetVariable; } 59 } 60 61 public IEnumerable<string> VariablesUsedForPrediction { 62 get { return actualModel.Models.SelectMany(x => x.VariablesUsedForPrediction).Distinct().OrderBy(x => x); } 63 } 56 64 57 65 [StorableConstructor] … … 73 81 74 82 // create only the surrogate model without an actual model 75 public GradientBoostedTreesModelSurrogate(IRegressionProblemData trainingProblemData, uint seed, ILossFunction lossFunction, int iterations, int maxSize, double r, double m, double nu) 83 public GradientBoostedTreesModelSurrogate(IRegressionProblemData trainingProblemData, uint seed, 84 ILossFunction lossFunction, int iterations, int maxSize, double r, double m, double nu) 76 85 : base("Gradient boosted tree model", string.Empty) { 77 86 this.trainingProblemData = trainingProblemData; … … 86 95 87 96 // wrap an actual model in a surrograte 88 public GradientBoostedTreesModelSurrogate(IRegressionProblemData trainingProblemData, uint seed, ILossFunction lossFunction, int iterations, int maxSize, double r, double m, double nu, IGradientBoostedTreesModel model) 97 public GradientBoostedTreesModelSurrogate(IRegressionProblemData trainingProblemData, uint seed, 98 ILossFunction lossFunction, int iterations, int maxSize, double r, double m, double nu, 99 IGradientBoostedTreesModel model) 89 100 : this(trainingProblemData, seed, lossFunction, iterations, maxSize, r, m, nu) { 90 101 this.actualModel = model; … … 104 115 return new RegressionSolution(this, (IRegressionProblemData)problemData.Clone()); 105 116 } 106 107 117 108 118 private IGradientBoostedTreesModel RecalculateModel() {
Note: See TracChangeset
for help on using the changeset viewer.