【问题标题】:Explaining the numbers in a decision tree解释决策树中的数字
【发布时间】:2016-08-21 10:17:03
【问题描述】:

使用著名的 Iris 数据集和 Julia 决策树分类器,我得到以下树。

using RDatasets
using DecisionTree
iris = dataset("datasets", "iris")
features = convert(Array, iris[:, 1:4])
labels = convert(Array, iris[:, 5]);
model = build_tree(labels, features)
model = prune_tree(model, 0.9)

print_tree(model)
Feature 3, Threshold 3.0
L-> setosa : 50/50
R-> Feature 4, Threshold 1.8
    L-> Feature 3, Threshold 5.0
        L-> versicolor : 47/48
        R-> Feature 4, Threshold 1.6
            L-> virginica : 3/3
            R-> Feature 1, Threshold 7.2
                L-> versicolor : 2/2
                R-> virginica : 1/1
    R-> Feature 3, Threshold 4.9
        L-> Feature 1, Threshold 6.0
            L-> versicolor : 1/1
            R-> virginica : 2/2
        R-> virginica : 43/43

我无法真正解释某些分支之后的数字,例如“setosa:50/50”或“virginica:3/3”。

有人能解释一下这些是什么意思吗?

【问题讨论】:

    标签: statistics julia decision-tree


    【解决方案1】:

    看起来在节点“setosa : 50/50”上,50朵花被正确分类(50朵花变成了这个节点,50朵是setosa) versicolor : 47/48 表示其中之一是Virginica 或setosa。

    【讨论】:

      猜你喜欢
      • 2014-06-15
      • 2019-01-14
      • 2019-11-19
      • 1970-01-01
      • 2017-06-27
      • 2014-06-26
      • 2021-12-10
      • 1970-01-01
      • 2018-06-13
      相关资源
      最近更新 更多