Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/19/17 16:57:03 (6 years ago)
Author:
gkronber
Message:

#2847: made some changes while reviewing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/M5Utilities/M5CreationParameters.cs

    r15470 r15549  
    2828namespace HeuristicLab.Algorithms.DataAnalysis {
    2929  internal class M5CreationParameters {
    30     private readonly ISplitType Impurity1;
    31     private readonly IPruningType Pruningtype1;
    32     private readonly ILeafType<IRegressionModel> LeafType1;
    33     private readonly int MinLeafSize1;
    34     private readonly IRegressionProblemData ProblemData1;
    35     private readonly IRandom Random1;
    36     private readonly ResultCollection Results1;
     30    private readonly ISplitType impurity;
     31    private readonly IPruningType pruningType;
     32    private readonly ILeafType<IRegressionModel> leafType;
     33    private readonly int minLeadSize;
     34    private readonly IRegressionProblemData problemData;
     35    private readonly IRandom random;
     36    private readonly ResultCollection results;
    3737    public ISplitType Split {
    38       get { return Impurity1; }
     38      get { return impurity; }
    3939    }
    4040    public IPruningType Pruningtype {
    41       get { return Pruningtype1; }
     41      get { return pruningType; }
    4242    }
    4343    public ILeafType<IRegressionModel> LeafType {
    44       get { return LeafType1; }
     44      get { return leafType; }
    4545    }
    4646    public int MinLeafSize {
    47       get { return MinLeafSize1; }
     47      get { return minLeadSize; }
    4848    }
    4949    private IRegressionProblemData ProblemData {
    50       get { return ProblemData1; }
     50      get { return problemData; }
    5151    }
    5252    public IRandom Random {
    53       get { return Random1; }
     53      get { return random; }
    5454    }
    5555    public ResultCollection Results {
    56       get { return Results1; }
     56      get { return results; }
    5757    }
    5858
     
    7272    public M5CreationParameters(IPruningType pruning, int minleafSize, ILeafType<IRegressionModel> modeltype,
    7373      IRegressionProblemData problemData, IRandom random, ISplitType split, ResultCollection results) {
    74       Impurity1 = split;
    75       Pruningtype1 = pruning;
    76       ProblemData1 = problemData;
    77       Random1 = random;
    78       LeafType1 = modeltype;
    79       Results1 = results;
     74      impurity = split;
     75      pruningType = pruning;
     76      this.problemData = problemData;
     77      this.random = random;
     78      leafType = modeltype;
     79      this.results = results;
    8080      var pruningLeaf = pruning.ModelType(LeafType);
    81       MinLeafSize1 = Math.Max(pruningLeaf == null ? 0 : pruningLeaf.MinLeafSize(problemData), Math.Max(minleafSize, modeltype.MinLeafSize(problemData)));
     81      minLeadSize = Math.Max(pruningLeaf == null ? 0 : pruningLeaf.MinLeafSize(problemData), Math.Max(minleafSize, modeltype.MinLeafSize(problemData)));
    8282    }
    8383  }
Note: See TracChangeset for help on using the changeset viewer.