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

Quantlet: cartpredict
Description: classifies the data in accordance with constructed Tree.

Reference(s):

Link:
Usage: ClassVector = cartpredict(Tree,Data)
Input:
Tree Complex tree structure, list of different parameters Tree can be generated using CartClassificationSplit or CartRegressionSplit commands
Data new observations to classify [f x k], should meet dimensions of Learning Sample
Output:
ClassVector vector of classes / response value with dimensions [f x 1].

Example:
library("xclust");
x1 = #(0.898473738, 0.852630806, 0.539114276, 0.241251175, 0.476125641, 0.284315731, 0.0181318590)
x2 = #(0.255756912, 0.303028656, 0.146633917, 0.121365982, 0.4111506, 0.97609203, 0.514180304)
x = x1~x2;
y = #(1, 1, 1, 0, 1, 2, 1)
tr = cartsplitclass(x,y,0,1);
newdata = #(1, -2)~#(2, -3)
classvector = cartpredict(tr, newdata)
classvector

Result:
Contents of classvector
[1,]        2
[2,]        0



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