Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/04/15 16:03:36 (9 years ago)
Author:
gkronber
Message:

#2261: preparations for trunk integration (adapt to current trunk version, add license headers, add comments, improve code quality)

File:
1 edited

Legend:

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

    r12371 r12590  
    2525using System.Diagnostics.Contracts;
    2626using System.Linq;
    27 using GradientBoostedTrees;
    2827using HeuristicLab.Problems.DataAnalysis;
    2928using HeuristicLab.Random;
     
    3433
    3534    public interface IGbmState {
    36 
    3735      IRegressionModel GetModel();
    3836      double GetTrainLoss();
     
    4240
    4341    // created through factory method
     42    // GbmState details are private API users can only use methods from IGbmState
    4443    private class GbmState : IGbmState {
    4544      internal IRegressionProblemData problemData { get; set; }
    46       internal MersenneTwister random { get; set; }
     45      internal MersenneTwister random { get; private set; }
    4746      internal ILossFunction lossFunction { get; set; }
    4847      internal int maxDepth { get; set; }
     
    5049      internal double r { get; set; }
    5150      internal double m { get; set; }
    52       internal RegressionTreeBuilder treeBuilder;
     51      internal readonly RegressionTreeBuilder treeBuilder;
    5352
    5453
     
    156155    }
    157156
    158     // allow dynamic adaptation of maxDepth, nu and r
     157    // allow dynamic adaptation of maxDepth, nu and r (even though this is not used)
    159158    public static void MakeStep(IGbmState state, int maxDepth, double nu, double r, double m) {
    160159      var gbmState = state as GbmState;
Note: See TracChangeset for help on using the changeset viewer.