Skip to content
Prev 363465 / 398502 Next

Chaid Decision Tree

Hi,


I am running a chaid tree using titanic dataset (see attachment)



setwd("C:/Users/miguel")

titanic <- read.csv("train.csv")
titanic.s <- subset( titanic, select = -c(PassengerId, Name ) )

ctrl <- chaid_control(minsplit = 20, minbucket = 5, minprob = 0)
chaidTitanic <- chaid(Survived ~ ., data = titanic, control = ctrl)



It looks like I get the following error

Error: is.factor(x) is not TRUE



can you please help me here? I am not able to follow this type of error. if you can rewrite the sentence for me, It will be much appreciated


Thanks
Message-ID: <DB3PR01MB25166973BC09C0909D4E7B5ADE80@DB3PR01MB251.eurprd01.prod.exchangelabs.com>
In-Reply-To: <DB3PR01MB251BA38597990C687C51F10ADE80@DB3PR01MB251.eurprd01.prod.exchangelabs.com>