我已经按照本教程进行操作,并且能够重现结果。 但是,最后一张图使我感到困惑。 我大部分时间都了解概率,但是为什么会有负数 ? 由于响应是存活的,如何解释预测中的数字? 如何将这些数字转换为是和否?
https://www.h2o.ai/blog/finally-you-can-plot-h2o-decision-trees-in-r/
EIDT 11/19/2019:顺便说一句,我确实在Cross Validated上找到了类似的帖子。 答案不确定,因为它以问号结尾。 https://stats.stackexchange.com/questions/374569/may-somebody-help-with-interpretation-of-trees-from-h2o-gbm-see-as-photo-attach
我使用树中的逻辑过滤了数据,并查看了子集的唯一预测。 我能够找到“是”和“否”预测的阈值。 我还更改了原始代码(第34行开始),以便叶子显示数字的最终结果。 但是,这只是破解情节的一种方法。 如果有人可以告诉我数字是如何得出的,那将是很好的。
if(class(left_node)[[1]] == 'H2OLeafNode') leftLabel = ifelse([email protected] >= threshold, 'Yes', 'No') else leftLabel = [email protected]_feature if(class(right_node)[[1]] == 'H2OLeafNode') rightLabel = ifelse([email protected] >= threshold, 'Yes', 'No') else rightLabel = [email protected]_feature