Changeset 15678 for branches/2883_GBTModelStorage/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithmStatic.cs
- Timestamp:
- 01/30/18 16:39:01 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2883_GBTModelStorage/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithmStatic.cs
r15583 r15678 33 33 34 34 public interface IGbmState { 35 IRegressionModel GetModel( );35 IRegressionModel GetModel(bool shallow = true); 36 36 double GetTrainLoss(); 37 37 double GetTestLoss(); … … 100 100 } 101 101 102 public IRegressionModel GetModel( ) {102 public IRegressionModel GetModel(bool shallow = true) { 103 103 #pragma warning disable 618 104 104 var model = new GradientBoostedTreesModel(models, weights); … … 107 107 // to the number of iterations + 1 (for the constant model) 108 108 // wrap the actual model in a surrogate that enables persistence and lazy recalculation of the model if necessary 109 return new GradientBoostedTreesModelSurrogate(problemData, randSeed, lossFunction, weights.Count - 1, maxSize, r, m, nu, model); 109 if (shallow) { 110 return new GradientBoostedTreesModelSurrogate(problemData, randSeed, lossFunction, weights.Count - 1, maxSize, r, m, nu, model); 111 } else { 112 return model; 113 } 110 114 } 111 115 public IEnumerable<KeyValuePair<string, double>> GetVariableRelevance() {
Note: See TracChangeset
for help on using the changeset viewer.