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: xclust
See also: cartsplit dispcarttree grcarttree plotcart2

Macro: plotcarttree
Description: Plots the regression tree of CART.

Reference(s):

Link:
Usage: plotcarttree (cs {, stri})
Input:
cs list of vectors: data structure which represents a binary tree and is produced by cartsplit procedure, contains vectors .. cs.val, cs.vec, cs.mean, cs.ssr, cs.nelem. See cartsplit for the description of cs.
stri string: optional argument, either missing, "nelem", "ssr" or "mean".

Note:

Example:
; loads the library xclust
library ("xclust")
; generate an artifcal dataset
x1=#(0,0,0,0,1,1,1,1,1,2)
x2=#(0,0,0,0,0,0,0,1,1,1)
x=x1~x2
y=#(0,0,0,0,100,100,100,120,120,120)
; run CART on our data
cs=cartsplit(x,y,#(0,1))
; plot CART tree
plotcarttree(cs)
Result:
shows the tree with the splitting rules

Library: xclust
See also: cartsplit dispcarttree grcarttree plotcart2

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: 1999 Jussi Klemelae, 2000-04-15, Sigbert Klinke
(C) MD*TECH Method and Data Technologies, 17.8.2000