Free cookie consent management tool by TermsFeed Policy Generator

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

#2847: made some changes while reviewing

Location:
branches/M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/M5Utilities
Files:
3 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  }
  • branches/M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/M5Utilities/M5StaticUtilities.cs

    r15430 r15549  
    3333        var setSeed = alg.Parameters["SetSeedRandomly"].ActualValue as BoolValue;
    3434        if (seed == null || setSeed == null)
    35           throw new ArgumentException("SetSeedRandomly and Seed do not have their expected Parametertypes");
     35          throw new ArgumentException("The parameters SetSeedRandomly and Seed do not have the expected type");
    3636        setSeed.Value = false;
    3737        seed.Value = random;
  • branches/M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/M5Utilities/M5UpdateParameters.cs

    r15470 r15549  
    2020#endregion
    2121
    22 using System.Collections.Generic;
    2322using HeuristicLab.Core;
    24 using HeuristicLab.Optimization;
    2523using HeuristicLab.Problems.DataAnalysis;
    2624
    2725namespace HeuristicLab.Algorithms.DataAnalysis {
    2826  internal class M5UpdateParameters {
    29     private readonly ILeafType<IRegressionModel> LeafType1;
    30     private readonly IRegressionProblemData ProblemData1;
    31     private readonly IRandom Random1;
     27    private readonly ILeafType<IRegressionModel> leafType;
     28    private readonly IRegressionProblemData problemData;
     29    private readonly IRandom random;
    3230    public ILeafType<IRegressionModel> LeafType {
    33       get { return LeafType1; }
     31      get { return leafType; }
    3432    }
    3533    private IRegressionProblemData ProblemData {
    36       get { return ProblemData1; }
     34      get { return problemData; }
    3735    }
    3836    public IRandom Random {
    39       get { return Random1; }
     37      get { return random; }
    4038    }
    4139    public IDataset Data {
     
    4442
    4543    public M5UpdateParameters(ILeafType<IRegressionModel> modeltype, IRegressionProblemData problemData, IRandom random) {
    46       ProblemData1 = problemData;
    47       Random1 = random;
    48       LeafType1 = modeltype;
     44      this.problemData = problemData;
     45      this.random = random;
     46      leafType = modeltype;
    4947    }
    5048  }
Note: See TracChangeset for help on using the changeset viewer.