Changeset 15549
- Timestamp:
- 12/19/17 16:57:03 (7 years ago)
- 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 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 } -
branches/M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/M5Utilities/M5StaticUtilities.cs
r15430 r15549 33 33 var setSeed = alg.Parameters["SetSeedRandomly"].ActualValue as BoolValue; 34 34 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"); 36 36 setSeed.Value = false; 37 37 seed.Value = random; -
branches/M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/M5Utilities/M5UpdateParameters.cs
r15470 r15549 20 20 #endregion 21 21 22 using System.Collections.Generic;23 22 using HeuristicLab.Core; 24 using HeuristicLab.Optimization;25 23 using HeuristicLab.Problems.DataAnalysis; 26 24 27 25 namespace HeuristicLab.Algorithms.DataAnalysis { 28 26 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; 32 30 public ILeafType<IRegressionModel> LeafType { 33 get { return LeafType1; }31 get { return leafType; } 34 32 } 35 33 private IRegressionProblemData ProblemData { 36 get { return ProblemData1; }34 get { return problemData; } 37 35 } 38 36 public IRandom Random { 39 get { return Random1; }37 get { return random; } 40 38 } 41 39 public IDataset Data { … … 44 42 45 43 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; 49 47 } 50 48 }
Note: See TracChangeset
for help on using the changeset viewer.