Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/07/15 11:57:37 (9 years ago)
Author:
gkronber
Message:

#2261 implemented node expansion using a priority queue (and changed parameter MaxDepth to MaxSize). Moved unit tests to a separate project.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GBT-trunkintegration/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithm.cs

    r12620 r12632  
    4949    #region ParameterNames
    5050    private const string IterationsParameterName = "Iterations";
    51     private const string MaxDepthParameterName = "Maximum Tree Depth";
     51    private const string MaxSizeParameterName = "Maximum Tree Size";
    5252    private const string NuParameterName = "Nu";
    5353    private const string RParameterName = "R";
     
    6464      get { return (IFixedValueParameter<IntValue>)Parameters[IterationsParameterName]; }
    6565    }
    66     public IFixedValueParameter<IntValue> MaxDepthParameter {
    67       get { return (IFixedValueParameter<IntValue>)Parameters[MaxDepthParameterName]; }
     66    public IFixedValueParameter<IntValue> MaxSizeParameter {
     67      get { return (IFixedValueParameter<IntValue>)Parameters[MaxSizeParameterName]; }
    6868    }
    6969    public IFixedValueParameter<DoubleValue> NuParameter {
     
    106106      set { SetSeedRandomlyParameter.Value.Value = value; }
    107107    }
    108     public int MaxDepth {
    109       get { return MaxDepthParameter.Value.Value; }
    110       set { MaxDepthParameter.Value.Value = value; }
     108    public int MaxSize {
     109      get { return MaxSizeParameter.Value.Value; }
     110      set { MaxSizeParameter.Value.Value = value; }
    111111    }
    112112    public double Nu {
     
    155155      Parameters.Add(new FixedValueParameter<IntValue>(SeedParameterName, "The random seed used to initialize the new pseudo random number generator.", new IntValue(0)));
    156156      Parameters.Add(new FixedValueParameter<BoolValue>(SetSeedRandomlyParameterName, "True if the random seed should be set to a random value, otherwise false.", new BoolValue(true)));
    157       Parameters.Add(new FixedValueParameter<IntValue>(MaxDepthParameterName, "Maximal depth of the tree learned in each step (prefer smaller depths if possible)", new IntValue(5)));
     157      Parameters.Add(new FixedValueParameter<IntValue>(MaxSizeParameterName, "Maximal size of the tree learned in each step (prefer smaller sizes if possible)", new IntValue(10)));
    158158      Parameters.Add(new FixedValueParameter<DoubleValue>(RParameterName, "Ratio of training rows selected randomly in each step (0 < R <= 1)", new DoubleValue(0.5)));
    159159      Parameters.Add(new FixedValueParameter<DoubleValue>(MParameterName, "Ratio of variables selected randomly in each step (0 < M <= 1)", new DoubleValue(0.5)));
     
    189189      var lossFunction = ApplicationManager.Manager.GetInstances<ILossFunction>()
    190190        .Single(l => l.ToString() == LossFunctionParameter.Value.Value);
    191       var state = GradientBoostedTreesAlgorithmStatic.CreateGbmState(problemData, lossFunction, (uint)Seed, MaxDepth, R, M, Nu);
     191      var state = GradientBoostedTreesAlgorithmStatic.CreateGbmState(problemData, lossFunction, (uint)Seed, MaxSize, R, M, Nu);
    192192
    193193      var updateInterval = UpdateIntervalParameter.Value.Value;
Note: See TracChangeset for help on using the changeset viewer.