mercredi 16 décembre 2015

Inferential Decision Tree

My data at the time t=0 are the following ones:

customer <- c("1","2","3","4","5","6","7","8")
gender <- c("man","man","woman","man","woman","man","woman","man")
amount <- c("100","34","22","42","62","73","8","66")
buy_next_two_months <- c(1,0,0,1,1,1,0,0)
customer_data <- data.frame (customer,gender,amount, buy_next_two_months)

At the time t=1 some selling data are incoming and therefore they are

customer <- c("1","2","3","4","5","6","7","8","9","10","11","12")
gender <- c("man","man","woman","man","woman","man","woman","man","woman","woman","man","man")
amount <- c("100","34","22","42","62","73","8","66","95","43","33","35")

If a build a tree based on rtree developped using the data at t=0 which type of analysis I can perform in oder to apply the model at time t=1 ?

my_model <- randomForest(buy_next_two_months~., data=customer_data)

can I use at "eyes closed" at time t=1 the same model to predict the feature ?

predict(my_model, newdata=customer_data)

Aucun commentaire:

Enregistrer un commentaire