我使用R来创建使用CART的决策树。 我是用
做的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)
现在,我需要打印Root节点可能的候选属性列表。即来自所选根节点的(im)纯度值的最小偏差的节点。有没有办法使用内置函数或我必须修改源?