kI'm trying to build a decision tree model on a dataset that only has categorical values, an example fragment of the dataset is below. My training dataset consists of 40 observations
Repository PrimaryLanguage BuildTools IntegrationRequired Active 1 repo-name-1 Java Maven yes yes 2 repo-name-2 Python setuptools yes yes 3 repo-name-3 YAML None no yes 4 repo-name-4 Java Gradle yes yes 5 repo-name-5 Shell None no no
The goal is to determine if a repo requires integration based on what type of language, and build tools it uses or if it is even active.
r code to build the tree model -
ml <- rpart(IntegrationRequired~PrimaryLanguage + BuildTools + Active, data=train, control = rpart.control("minsplit" = 2), method='class')
But my tree generates very few branches, and it splits nodes based on entire column instead of values in that column. How do I fix this or I should look at other algorithms like kmeans? Any help is deeply appreciated.