Changeset 17080 for trunk/HeuristicLab.Algorithms.DataAnalysis.DecisionTrees/3.4/MetaModels/RegressionNodeTreeModel.cs
- Timestamp:
- 07/05/19 11:08:57 (5 years ago)
- File:
-
- 1 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);
Note: See TracChangeset
for help on using the changeset viewer.