0

I am using R for creating a decision tree using CART. I did it using

feature_vectors <- read.table("C:/Users/DVS/Desktop/TagMe!-Data/Train/feature_vectors.txt", quote="\"")
set.seed(1234)
ind <- sample(2, nrow(winequality.red), replace=TRUE, prob=c(0.7, 0.3))
trainData <- winequality.red[ind==1,]
testData <- winequality.red[ind==2,]
myFormula <- quality ~ fixed.acidity + volatile.acidity + citric.acid + residual.sugar + chlorides + free.sulfur.dioxide + total.sulfur.dioxide + density + pH + sulphates + alcohol
table(predict(wine_ctree), trainData$quality)
print(wine_ctree)
plot(wine_ctree)

Now, I Need to Print a list of candidate attributes possible for Root node. ie node with minimal deviation in (im)purity values from Selected Root Node. Is there any way to use built in functions or do I have to modify the source?

Cœur
  • 37,241
  • 25
  • 195
  • 267
dvs
  • 511
  • 1
  • 10
  • 27
  • I hope you get root node by split,look at dis http://stackoverflow.com/questions/13011496/splits-and-root-node-of-binary-decision-treecart/13892682#13892682 – Aashu Apr 07 '14 at 06:03
  • so, label function returns the list..? – dvs Apr 07 '14 at 06:07

0 Answers0