使用连续变量的决策树 [英] Decision tree using continuous variable

查看:747
本文介绍了使用连续变量的决策树的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对使用连续变量的决策树有疑问

I have a question about Decision tree using continuous variable

我听说当输出变量是连续的而输入变量是分类的时, 划分标准是减少方差之类的东西.但是我不知道如果输入变量是连续的

I heard that when output variable is continuous and input variable is categorical, split criteria is reducing variance or something. but I don't know how it work if input variable is continuous

1)输入变量:连续/输出变量:绝对

1) input variable : continuous / output variable : categorical

2)输入变量:连续/输出变量:连续

2) input variable : continuous / output variable : continuous

大约有两种情况,我们如何获得基尼系数或信息获取等分裂条件?

About two cases, how we can get a split criteria like gini index or information gain?

当我在R中使用rpart时,无论输入变量和输出变量如何,它都能正常工作,但我无法详细了解算法

When I use rpart in R, whatever input variable and output variable are, it works well but I can't know an algorithm in detail

推荐答案

1)输入变量:连续/输出变量:类别
C4.5算法解决了这种情况. C4.5

1) input variable : continuous / output variable : categorical
C4.5 algorithm solve this situation. C4.5

为了处理连续的属性,C4.5创建一个阈值,然后将列表分为属性值大于阈值的那些和小于或等于阈值的那些.

In order to handle continuous attributes, C4.5 creates a threshold and then splits the list into those whose attribute value is above the threshold and those that are less than or equal to it.

2)输入变量:连续/输出变量:连续
CART(分类和回归树)算法解决了这种情况. 购物车

2) input variable : continuous / output variable : continuous
CART(classification and regression trees) algorithm solves this situation. CART

案例2是回归问题.您应该枚举属性j,并枚举该属性中的值s,然后将列表分为属性值大于阈值和小于或等于阈值的列表.然后你得到两个区域

Case 2 is the regression problem. You should enumerate the attribute j, and enumerate the values s in that attribute, and then splits the list into those whose attribute value is above the threshold and those that are less than or equal to it. Then you get two areas

找到最佳属性j和最佳拆分值s,其中

Find the best attribute j and the best split value s, which

c_1c_2并按以下方式解决:

c_1 and c_2 and be solved as follows:

然后何时进行回归,

Then when do regression,

其中

这篇关于使用连续变量的决策树的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆