- Timestamp:
- 05/04/15 11:54:43 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GBT/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/RegressionTreeModel.cs
r12372 r12375 15 15 // trees are represented as a flat array 16 16 // object-graph-travesal has problems if this is defined as a struct. TODO investigate... 17 [StorableClass]18 public classTreeNode {17 //[StorableClass] 18 public struct TreeNode { 19 19 public readonly static string NO_VARIABLE = string.Empty; 20 [Storable]20 //[Storable] 21 21 public string varName; // name of the variable for splitting or -1 if terminal node 22 [Storable]22 //[Storable] 23 23 public double val; // threshold 24 [Storable]24 //[Storable] 25 25 public int leftIdx; 26 [Storable]26 //[Storable] 27 27 public int rightIdx; 28 28 29 public TreeNode() { 30 varName = NO_VARIABLE; 31 leftIdx = -1; 32 rightIdx = -1; 29 //public TreeNode() { 30 // varName = NO_VARIABLE; 31 // leftIdx = -1; 32 // rightIdx = -1; 33 //} 34 //[StorableConstructor] 35 //private TreeNode(bool deserializing) { } 36 public override int GetHashCode() 37 { 38 return (leftIdx * rightIdx) ^ val.GetHashCode(); 33 39 } 34 [StorableConstructor]35 private TreeNode(bool deserializing) { }36 40 } 37 41
Note: See TracChangeset
for help on using the changeset viewer.