- Timestamp:
- 07/16/19 15:23:38 (5 years ago)
- Location:
- trunk/HeuristicLab.Algorithms.DataAnalysis.DecisionTrees/3.4
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Algorithms.DataAnalysis.DecisionTrees/3.4/LeafTypes/LeafBase.cs
r17080 r17139 112 112 public class LeafBuildingState : Item { 113 113 [Storable] 114 public Queue<RegressionNodeModel> nodeQueue = new Queue<RegressionNodeModel>(); 114 private RegressionNodeModel[] storableNodeQueue { get { return nodeQueue.ToArray(); } set { nodeQueue = new Queue<RegressionNodeModel>(value); } } 115 public Queue<RegressionNodeModel> nodeQueue; 115 116 [Storable] 116 public Queue<IReadOnlyList<int>> trainingRowsQueue = new Queue<IReadOnlyList<int>>(); 117 private IReadOnlyList<int>[] storabletrainingRowsQueue { get { return trainingRowsQueue.ToArray(); } set { trainingRowsQueue = new Queue<IReadOnlyList<int>>(value); } } 118 public Queue<IReadOnlyList<int>> trainingRowsQueue; 117 119 118 120 //State.Code values denote the current action (for pausing) … … 130 132 Code = original.Code; 131 133 } 132 public LeafBuildingState() { } 134 public LeafBuildingState() { 135 nodeQueue = new Queue<RegressionNodeModel>(); 136 trainingRowsQueue = new Queue<IReadOnlyList<int>>(); 137 } 133 138 public override IDeepCloneable Clone(Cloner cloner) { 134 139 return new LeafBuildingState(this, cloner); -
trunk/HeuristicLab.Algorithms.DataAnalysis.DecisionTrees/3.4/Pruning/ComplexityPruning.cs
r17080 r17139 204 204 public class PruningState : Item { 205 205 [Storable] 206 public IDictionary<RegressionNodeModel, int> modelComplexities = new Dictionary<RegressionNodeModel, int>(); 207 [Storable] 208 public IDictionary<RegressionNodeModel, int> nodeComplexities = new Dictionary<RegressionNodeModel, int>(); 209 [Storable] 210 public IDictionary<RegressionNodeModel, int> pruningSizes = new Dictionary<RegressionNodeModel, int>(); 211 [Storable] 212 public IDictionary<RegressionNodeModel, double> modelErrors = new Dictionary<RegressionNodeModel, double>(); 213 214 [Storable] 215 public Queue<RegressionNodeModel> nodeQueue = new Queue<RegressionNodeModel>(); 216 [Storable] 217 public Queue<IReadOnlyList<int>> trainingRowsQueue = new Queue<IReadOnlyList<int>>(); 218 [Storable] 219 public Queue<IReadOnlyList<int>> pruningRowsQueue = new Queue<IReadOnlyList<int>>(); 206 public IDictionary<RegressionNodeModel, int> modelComplexities; 207 [Storable] 208 public IDictionary<RegressionNodeModel, int> nodeComplexities; 209 [Storable] 210 public IDictionary<RegressionNodeModel, int> pruningSizes; 211 [Storable] 212 public IDictionary<RegressionNodeModel, double> modelErrors; 213 214 [Storable] 215 private RegressionNodeModel[] storableNodeQueue { get { return nodeQueue.ToArray(); } set { nodeQueue = new Queue<RegressionNodeModel>(value); } } 216 public Queue<RegressionNodeModel> nodeQueue; 217 [Storable] 218 private IReadOnlyList<int>[] storabletrainingRowsQueue { get { return trainingRowsQueue.ToArray(); } set { trainingRowsQueue = new Queue<IReadOnlyList<int>>(value); } } 219 public Queue<IReadOnlyList<int>> trainingRowsQueue; 220 [Storable] 221 private IReadOnlyList<int>[] storablepruningRowsQueue { get { return pruningRowsQueue.ToArray(); } set { pruningRowsQueue = new Queue<IReadOnlyList<int>>(value); } } 222 public Queue<IReadOnlyList<int>> pruningRowsQueue; 220 223 221 224 //State.Code values denote the current action (for pausing) … … 242 245 Code = original.Code; 243 246 } 244 public PruningState() { } 247 public PruningState() { 248 modelComplexities = new Dictionary<RegressionNodeModel, int>(); 249 nodeComplexities = new Dictionary<RegressionNodeModel, int>(); 250 pruningSizes = new Dictionary<RegressionNodeModel, int>(); 251 modelErrors = new Dictionary<RegressionNodeModel, double>(); 252 nodeQueue = new Queue<RegressionNodeModel>(); 253 trainingRowsQueue = new Queue<IReadOnlyList<int>>(); 254 pruningRowsQueue = new Queue<IReadOnlyList<int>>(); 255 } 245 256 public override IDeepCloneable Clone(Cloner cloner) { 246 257 return new PruningState(this, cloner); -
trunk/HeuristicLab.Algorithms.DataAnalysis.DecisionTrees/3.4/Splitting/SplitterBase.cs
r17080 r17139 112 112 [StorableType("BC1149FD-370E-4F3A-92F5-6E519736D09A")] 113 113 public class SplittingState : Item { 114 public Queue<RegressionNodeModel> nodeQueue; 114 115 [Storable] 115 public Queue<RegressionNodeModel> nodeQueue = new Queue<RegressionNodeModel>(); 116 private RegressionNodeModel[] storableNodeQueue { 117 get { return nodeQueue.ToArray(); } 118 set { nodeQueue = new Queue<RegressionNodeModel>(value); } 119 } 120 121 public Queue<IReadOnlyList<int>> trainingRowsQueue; 116 122 [Storable] 117 public Queue<IReadOnlyList<int>> trainingRowsQueue = new Queue<IReadOnlyList<int>>(); 123 private IReadOnlyList<int>[] storableTrainingRowsQueue { 124 get { return trainingRowsQueue.ToArray(); } 125 set { trainingRowsQueue = new Queue<IReadOnlyList<int>>(value); } 126 } 127 118 128 119 129 //State.Code values denote the current action (for pausing) … … 131 141 Code = original.Code; 132 142 } 133 public SplittingState() { } 143 public SplittingState() : base() { 144 nodeQueue = new Queue<RegressionNodeModel>(); 145 trainingRowsQueue = new Queue<IReadOnlyList<int>>(); 146 } 134 147 public override IDeepCloneable Clone(Cloner cloner) { 135 148 return new SplittingState(this, cloner);
Note: See TracChangeset
for help on using the changeset viewer.