Library: | xclust |
See also: | cartdrawpdfregr |
Quantlet: | cartdrawpdfclass | |
Description: | generates TEX classification tree (to the file) |
Usage: | cartdrawpdfclass(VarMatrix,ClassVector,SplitRule,MinSize, FilePath) | |
Input: | ||
VarMatrix | n x m matrix, variables | |
ClassVector | n x 1 vector, classes | |
SplitRule | scalar, splitting rule either 0 (Ginni) or 1 (Twoing) | |
MinSize | scalar, stop condition, minimum number of observations in terminal node | |
FilePath | Complete path to the file, including the name of the file, e.g. c:\tree.tex |
library("xclust"); x = #(1,2,3,4,40,50,60,80,90, 100, 110, 300, 500)~#(10,0,40,60,100,1,-91,20,20,34, 1, 3, -5); y = #(1,1,1,1,2,1,1,2,3,2, 3, 3, 3) //Plot tree in TeX //Change for the appropriate file name here: filename = "c:\ClassificationTree.tex" cartdrawpdfclass(x,y,1,1, filename);
Generates TEX file. Can be then compiled Tex->PS->PDF (Not Tex -> PDF)