Changeset 15967 for branches/M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/M5Regression.cs
- Timestamp:
- 06/20/18 09:53:28 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/M5Regression.cs
r15833 r15967 220 220 var pruningRows = (IntArray)stateScope.Variables[PruningSetVariableName].Value; 221 221 if (1 > trainingRows.Length) 222 return new PreconstructedLinearModel(new Dictionary<string, double>(), new Dictionary<string, double>(), new Dictionary<string, double>(),0, regressionTreeParams.TargetVariable);222 return new PreconstructedLinearModel(new Dictionary<string, double>(), 0, regressionTreeParams.TargetVariable); 223 223 if (regressionTreeParams.MinLeafSize > trainingRows.Length) { 224 224 var targets = regressionTreeParams.Data.GetDoubleValues(regressionTreeParams.TargetVariable).ToArray(); 225 return new PreconstructedLinearModel(new Dictionary<string, double>(), new Dictionary<string, double>(), new Dictionary<string, double>(), targets.Average(), regressionTreeParams.TargetVariable, targets.Variance(), targets.Length);225 return new PreconstructedLinearModel(new Dictionary<string, double>(), targets.Average(), regressionTreeParams.TargetVariable); 226 226 } 227 227 model.Build(trainingRows.ToArray(), pruningRows.ToArray(), stateScope, results, cancellationToken);
Note: See TracChangeset
for help on using the changeset viewer.