- Timestamp:
- 07/05/19 11:08:57 (5 years ago)
- Location:
- trunk/HeuristicLab.Algorithms.DataAnalysis.DecisionTrees/3.4/MetaModels
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Algorithms.DataAnalysis.DecisionTrees/3.4/MetaModels/RegressionNodeTreeModel.cs
r16847 r17080 71 71 #region IM5Model 72 72 public void Build(IReadOnlyList<int> trainingRows, IReadOnlyList<int> pruningRows, IScope statescope, ResultCollection results, CancellationToken cancellationToken) { 73 var regressionTreeParams = (RegressionTreeParameters)statescope.Variables[ M5Regression.RegressionTreeParameterVariableName].Value;73 var regressionTreeParams = (RegressionTreeParameters)statescope.Variables[DecisionTreeRegression.RegressionTreeParameterVariableName].Value; 74 74 //start with one node 75 75 if (Root == null) … … 87 87 88 88 public void Update(IReadOnlyList<int> rows, IScope statescope, CancellationToken cancellationToken) { 89 var regressionTreeParams = (RegressionTreeParameters)statescope.Variables[ M5Regression.RegressionTreeParameterVariableName].Value;89 var regressionTreeParams = (RegressionTreeParameters)statescope.Variables[DecisionTreeRegression.RegressionTreeParameterVariableName].Value; 90 90 regressionTreeParams.LeafModel.Build(this, rows, statescope, cancellationToken); 91 91 } 92 92 93 93 public static void Initialize(IScope stateScope) { 94 var param = (RegressionTreeParameters)stateScope.Variables[ M5Regression.RegressionTreeParameterVariableName].Value;94 var param = (RegressionTreeParameters)stateScope.Variables[DecisionTreeRegression.RegressionTreeParameterVariableName].Value; 95 95 stateScope.Variables.Add(new Variable(RootVariableName, RegressionNodeModel.CreateNode(param.TargetVariable, param))); 96 96 } … … 98 98 99 99 public void BuildModel(IReadOnlyList<int> trainingRows, IReadOnlyList<int> pruningRows, IScope statescope, ResultCollection results, CancellationToken cancellationToken) { 100 var regressionTreeParams = (RegressionTreeParameters)statescope.Variables[ M5Regression.RegressionTreeParameterVariableName].Value;100 var regressionTreeParams = (RegressionTreeParameters)statescope.Variables[DecisionTreeRegression.RegressionTreeParameterVariableName].Value; 101 101 //start with one node 102 102 Root = RegressionNodeModel.CreateNode(regressionTreeParams.TargetVariable, regressionTreeParams); -
trunk/HeuristicLab.Algorithms.DataAnalysis.DecisionTrees/3.4/MetaModels/RegressionRuleModel.cs
r16847 r17080 83 83 84 84 public void Build(IReadOnlyList<int> trainingRows, IReadOnlyList<int> pruningRows, IScope statescope, ResultCollection results, CancellationToken cancellationToken) { 85 var regressionTreeParams = (RegressionTreeParameters)statescope.Variables[ M5Regression.RegressionTreeParameterVariableName].Value;85 var regressionTreeParams = (RegressionTreeParameters)statescope.Variables[DecisionTreeRegression.RegressionTreeParameterVariableName].Value; 86 86 variables = regressionTreeParams.AllowedInputVariables.ToList(); 87 87 … … 109 109 110 110 public void Update(IReadOnlyList<int> rows, IScope statescope, CancellationToken cancellationToken) { 111 var regressionTreeParams = (RegressionTreeParameters)statescope.Variables[ M5Regression.RegressionTreeParameterVariableName].Value;111 var regressionTreeParams = (RegressionTreeParameters)statescope.Variables[DecisionTreeRegression.RegressionTreeParameterVariableName].Value; 112 112 int np; 113 113 RuleModel = regressionTreeParams.LeafModel.BuildModel(rows, regressionTreeParams, cancellationToken, out np); -
trunk/HeuristicLab.Algorithms.DataAnalysis.DecisionTrees/3.4/MetaModels/RegressionRuleSetModel.cs
r16847 r17080 77 77 #region IM5Model 78 78 public void Build(IReadOnlyList<int> trainingRows, IReadOnlyList<int> pruningRows, IScope stateScope, ResultCollection results, CancellationToken cancellationToken) { 79 var regressionTreeParams = (RegressionTreeParameters)stateScope.Variables[ M5Regression.RegressionTreeParameterVariableName].Value;79 var regressionTreeParams = (RegressionTreeParameters)stateScope.Variables[DecisionTreeRegression.RegressionTreeParameterVariableName].Value; 80 80 var ruleSetState = (RuleSetState)stateScope.Variables[RuleSetStateVariableName].Value; 81 81
Note: See TracChangeset
for help on using the changeset viewer.