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: cartsplitclass cartsplitregr cartpredict cartdrawpdfclass cartdrawpdfregr

Quantlet: cartdisptree
Description: plots the regression/classification tree of CART in a display.

Reference(s):

Link:
Usage: cartdisptree(tr,string)
Input:
tr list of vectors, data structure representing a binary tree, output from cartsplitregr or cartsplitclass. See cartsplitclass or cartsplitregr for detailed description.
string string, optional, either "NumberOfPoints", "Impurity" or "Class", default: see notes below

Note:

Example:
; loads the library xclust
library("xclust")
; generates an artifcal data set
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)
; runs CART on our data
tr=cartsplitclass(x,y,0,1)
; plots CART tree
cartdisptree(tr)

Result:
shows the tree with the splitting rules



Author: R. Timofeev, A. Andriyashin 20050115 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006