Changeset 15549 for branches/M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/M5Utilities/M5CreationParameters.cs
- Timestamp:
- 12/19/17 16:57:03 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/M5Utilities/M5CreationParameters.cs
r15470 r15549 28 28 namespace HeuristicLab.Algorithms.DataAnalysis { 29 29 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; 37 37 public ISplitType Split { 38 get { return Impurity1; }38 get { return impurity; } 39 39 } 40 40 public IPruningType Pruningtype { 41 get { return Pruningtype1; }41 get { return pruningType; } 42 42 } 43 43 public ILeafType<IRegressionModel> LeafType { 44 get { return LeafType1; }44 get { return leafType; } 45 45 } 46 46 public int MinLeafSize { 47 get { return MinLeafSize1; }47 get { return minLeadSize; } 48 48 } 49 49 private IRegressionProblemData ProblemData { 50 get { return ProblemData1; }50 get { return problemData; } 51 51 } 52 52 public IRandom Random { 53 get { return Random1; }53 get { return random; } 54 54 } 55 55 public ResultCollection Results { 56 get { return Results1; }56 get { return results; } 57 57 } 58 58 … … 72 72 public M5CreationParameters(IPruningType pruning, int minleafSize, ILeafType<IRegressionModel> modeltype, 73 73 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; 80 80 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))); 82 82 } 83 83 }
Note: See TracChangeset
for help on using the changeset viewer.