Library: | xclust |
See also: | cartsplit cartcv leafnum maketr pred prederr prune prunecv pruneseq prunetot ssr kuva |
Macro: | cartsplitopt | |
Description: | sets optional parameters for cartsplit (spliting of for classification and regression trees) |
Usage: | opt = cartsplitopt (s1 {, s2{, s3, ...}}) | |
Input: | ||
s1, s3 s5 | string | |
s2, s4, s6 | numerical values | |
Output: | ||
opt | list of optional parameters |
The following string values can be used:
minsize the number of observations in child nodes must exceed or to be equal to minsize for a split to be allowed mincut nodes of size mincut or larger are candidates for a split; the growing continues if there are at least mincut observations in a node mindev if the deviance of the node (sum of mean squared errors, value of cs.var) is less or equal to mindev, the node will not be splitted anymore
; loads the library xclust library ("xclust") ; generate some data, y depends deterministically from x1: ; if 0 <= x1 < 0.5 then y=0, if 0.5 <= x1 <= 1, then y=1 x1=#(0.1, 0.2, 0.3, 0.4, 0.45, 0.6, 0.7, 0.8, 0.9, 0.95) x2=uniform(10,1) x=x1~x2 y=#(0,0,0,0,0,1,1,1,1,1) opt = cartsplitopt ("minsize", 1, "mindev", 0, "mincut", 1) cs = cartsplit (x, y, #(1,1), opt) ; show the results cs
produces an optional parameters which contains the default values used in cartsplit without optional parameter
Library: | xclust |
See also: | cartsplit cartcv leafnum maketr pred prederr prune prunecv pruneseq prunetot ssr kuva |