Tree Implementations

More on this soon

source

Tree

 Tree ()

Tree class enable building all simpe single tree models


source

CARTRegressionTree

 CARTRegressionTree (objective:str='class', min_samples_split:int=20,
                     min_sample_leaf:int=10, max_compete:int=4,
                     min_impurity:float=0.01, max_depth:int=inf,
                     max_surrogates:int=2, surrogate_style:int=2,
                     parallelize:str='feature', tree_growth:str='cart',
                     feature_weights:Union[float,int,list]=None,
                     loss:Union[str,float]=None,
                     verbose:Union[bool,int]=False,
                     digits:Optional[int]=2)

Super class of all kinds of tree.

Type Default Details
objective str class defining objective of the whole tree building.
min_samples_split int 20 The minimum number of samples needed to make a split when building a tree.
min_sample_leaf int 10 Minimum sample required to have a leaf node
max_compete int 4 the number of competitor splits retained in the output. It is useful to know not just which split was chosen, but which variable came in second, third, etc.
min_impurity float 0.01 The minimum impurity required to split the tree further. this is equivalent to complexity in CART
max_depth int inf The maximum depth of a tree.
max_surrogates int 2 more on this to make it generalized and not CART Specific
surrogate_style int 2 more on this to make it generalized and not CART Specific
parallelize str feature follow form LightGBMs behavior
tree_growth str cart follow binary structure if cart else follow multiple structure as C4.5
feature_weights Union None weight of each feature in the split. Default is set to 1 for all features
loss Union None String of loss or function which defines the loss. This amounts to Loss function that is used for Gradient Boosting models to calculate impurity.
verbose Union False Verbosity for tree building
digits Optional 2 To round the values before doing a split

source

CART

 CART (objective:str='class', min_samples_split:int=20,
       min_sample_leaf:int=10, max_compete:int=4, min_impurity:float=0.01,
       max_depth:int=inf, max_surrogates:int=2, surrogate_style:int=2,
       parallelize:str='feature', tree_growth:str='cart',
       feature_weights:Union[float,int,list]=None,
       loss:Union[str,float]=None, verbose:Union[bool,int]=False,
       digits:Optional[int]=2)

Super class of all kinds of tree.

Type Default Details
objective str class defining objective of the whole tree building.
min_samples_split int 20 The minimum number of samples needed to make a split when building a tree.
min_sample_leaf int 10 Minimum sample required to have a leaf node
max_compete int 4 the number of competitor splits retained in the output. It is useful to know not just which split was chosen, but which variable came in second, third, etc.
min_impurity float 0.01 The minimum impurity required to split the tree further. this is equivalent to complexity in CART
max_depth int inf The maximum depth of a tree.
max_surrogates int 2 more on this to make it generalized and not CART Specific
surrogate_style int 2 more on this to make it generalized and not CART Specific
parallelize str feature follow form LightGBMs behavior
tree_growth str cart follow binary structure if cart else follow multiple structure as C4.5
feature_weights Union None weight of each feature in the split. Default is set to 1 for all features
loss Union None String of loss or function which defines the loss. This amounts to Loss function that is used for Gradient Boosting models to calculate impurity.
verbose Union False Verbosity for tree building
digits Optional 2 To round the values before doing a split

source

C45

 C45 (objective:str='class', min_samples_split:int=20,
      min_sample_leaf:int=10, max_compete:int=4, min_impurity:float=0.01,
      max_depth:int=inf, max_surrogates:int=2, surrogate_style:int=2,
      parallelize:str='feature', tree_growth:str='cart',
      feature_weights:Union[float,int,list]=None,
      loss:Union[str,float]=None, verbose:Union[bool,int]=False,
      digits:Optional[int]=2)

Super class of all kinds of tree.

Type Default Details
objective str class defining objective of the whole tree building.
min_samples_split int 20 The minimum number of samples needed to make a split when building a tree.
min_sample_leaf int 10 Minimum sample required to have a leaf node
max_compete int 4 the number of competitor splits retained in the output. It is useful to know not just which split was chosen, but which variable came in second, third, etc.
min_impurity float 0.01 The minimum impurity required to split the tree further. this is equivalent to complexity in CART
max_depth int inf The maximum depth of a tree.
max_surrogates int 2 more on this to make it generalized and not CART Specific
surrogate_style int 2 more on this to make it generalized and not CART Specific
parallelize str feature follow form LightGBMs behavior
tree_growth str cart follow binary structure if cart else follow multiple structure as C4.5
feature_weights Union None weight of each feature in the split. Default is set to 1 for all features
loss Union None String of loss or function which defines the loss. This amounts to Loss function that is used for Gradient Boosting models to calculate impurity.
verbose Union False Verbosity for tree building
digits Optional 2 To round the values before doing a split