1 //------------------------------------------------------------------------------ 2 // GBM by Greg Ridgeway Copyright (C) 2003 3 // 4 // File: node_continuous.h 5 // 6 // License: GNU GPL (version 2 or later) 7 // 8 // Contents: a node with a continuous split 9 // 10 // Owner: gregr.rand.org 11 // 12 // History: 3/26/2001 gregr created 13 // 2/14/2003 gregr: adapted for R implementation 14 // 15 //------------------------------------------------------------------------------ 16 17 #ifndef NODECONTINUOUS_H 18 #define NODECONTINUOUS_H 19 20 #include <float.h> 21 #include "node_nonterminal.h" 22 23 class CNodeContinuous : public CNodeNonterminal 24 { 25 public: 26 27 CNodeContinuous(); 28 ~CNodeContinuous(); 29 30 GBMRESULT PrintSubtree(unsigned long cIndent); 31 GBMRESULT TransferTreeToRList(int &iNodeID, 32 CDataset *pData, 33 int *aiSplitVar, 34 double *adSplitPoint, 35 int *aiLeftNode, 36 int *aiRightNode, 37 int *aiMissingNode, 38 double *adErrorReduction, 39 double *adWeight, 40 double *adPred, 41 VEC_VEC_CATEGORIES &vecSplitCodes, 42 int cCatSplitsOld, 43 double dShrinkage); 44 45 signed char WhichNode(CDataset *pData, 46 unsigned long iObs); 47 signed char WhichNode(double *adX, 48 unsigned long cRow, 49 unsigned long cCol, 50 unsigned long iRow); 51 52 GBMRESULT RecycleSelf(CNodeFactory *pNodeFactory); 53 54 double dSplitValue; 55 }; 56 57 typedef CNodeContinuous *PCNodeContinuous; 58 59 #endif // NODECONTINUOUS_H 60 61 62 63