Changeset 16069 for branches/M5Regression
- Timestamp:
- 08/08/18 09:59:35 (6 years ago)
- Location:
- branches/M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/MetaModels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/MetaModels/RegressionNodeModel.cs
r15830 r16069 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using System.Threading;26 25 using HeuristicLab.Common; 27 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 33 32 #region Properties 34 33 public double PruningStrength = double.NaN; 35 36 [Storable]37 34 private IReadOnlyList<string> Variables { 38 35 get { … … 52 49 internal bool IsLeaf { get; private set; } 53 50 [Storable] 54 internal IRegressionModel Model { get; privateset; }51 private IRegressionModel Model { get; set; } 55 52 56 53 [Storable] … … 168 165 169 166 private double GetEstimatedVariance(IDataset dataset, int row) { 170 if (!IsLeaf) 171 return ((IConfidenceRegressionModel)(dataset.GetDoubleValue(SplitAttribute, row) <= SplitValue ? Left : Right)).GetEstimatedVariances(dataset, row.ToEnumerable()).Single(); 172 return ((IConfidenceRegressionModel)Model).GetEstimatedVariances(dataset, new[] {row}).First(); 167 return !IsLeaf ? ((IConfidenceRegressionModel)(dataset.GetDoubleValue(SplitAttribute, row) <= SplitValue ? Left : Right)).GetEstimatedVariances(dataset, row.ToEnumerable()).Single() : ((IConfidenceRegressionModel)Model).GetEstimatedVariances(dataset, new[] {row}).First(); 173 168 } 174 169 -
branches/M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/MetaModels/RegressionNodeTreeModel.cs
r15830 r16069 26 26 using HeuristicLab.Common; 27 27 using HeuristicLab.Core; 28 using HeuristicLab.Data;29 28 using HeuristicLab.Optimization; 30 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Note: See TracChangeset
for help on using the changeset viewer.