Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: plot
See also: cartsplit dispcart2 tree grcart2

Macro: plotcart2
Description: produces the cut graphic for a CART tree and allows the user interactively to change the tree parameters as well as the projection plane.

Reference(s):

Link:
Usage: plotcart2(x,tree{,xname})
Input:
x n x p, X-variables used in cartsplit
tree list, result of cartsplit
xname textmatrix, names of the variables (optional)

Note:

Example:
randomize(1)
n=100
; Generate some simulated data
xdat=uniform(n,2)
ydat=120.*matrix(n,1)-(xdat[,2]<=0.5).*120-(xdat[,2]>0.5).*(xdat[,1]<=0.5).*20
ydat=ydat+normal(n)
; call CART
type=#(1,1)
opt=cartsplitopt("minsize",1,"mindev",0,"mincut",5)
tr=cartsplit(xdat,ydat,type,opt)
; shows cuts
plotcart2(xdat, tr)
Result:
shows the X1-X2-plane with all cuts in the tree tr

Library: plot
See also: cartsplit dispcart2 tree grcart2

Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Author: 2000-03-17, Sigbert Klinke
(C) MD*TECH Method and Data Technologies, 17.8.2000