plot.rpart(rpart)
plot.rpart()所属R语言包:rpart
Plot an Rpart Object
绘制的软件rpart对象
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Plots an rpart object on the current graphics device.
在当前图形上设备绘图的软件rpart的对象。
用法----------Usage----------
## S3 method for class 'rpart'
plot(x, uniform=FALSE, branch=1, compress=FALSE, nspace,
margin=0, minbranch=.3, ...)
参数----------Arguments----------
参数:x
a fitted object of class rpart, containing a classification, regression, or rate tree.
一个装类的对象rpart,包含一个分类,回归,或速率树的。
参数:uniform
if TRUE, uniform vertical spacing of the nodes is used; this may be less cluttered when fitting a large plot onto a page. The default is to use a non-uniform spacing proportional to the error in the fit.
如果TRUE,均匀的垂直间距的节点,这可能是装修时更简洁到一个页面上的一个大图。默认的是使用在拟合的误差成比例的非均匀间距。
参数:branch
controls the shape of the branches from parent to child node. Any number from 0 to 1 is allowed. A value of 1 gives square shouldered branches, a value of 0 give V shaped branches, with other values being intermediate.
控制形状的树枝从父到子节点。允许在任何数量从0到1。值为1给出了方肩分支,值0给V形分支,与其他值中间。
参数:compress
if FALSE, the leaf nodes will be at the horizontal plot coordinates of 1:nleaves. If TRUE, the routine attempts a more compact arrangement of the tree. The compaction algorithm assumes uniform=TRUE; surprisingly, the result is usually an improvement even when that is not the case.
如果FALSE,叶节点将在该的水平图坐标的1:nleaves。如果TRUE,程序将尝试安排比较紧凑的树。压实算法假定uniform=TRUE;令人惊讶的是,其结果通常是一个改进,即使当该情况并非如此。
参数:nspace
the amount of extra space between a node with children and a leaf, as compared to the minimal space between leaves. Applies to compressed trees only. The default is the value of branch.
额外的空间之间的子节点的节点和叶的量相比,叶片之间的最小空间。适用于压缩树。默认是的branch。
参数:margin
an extra fraction of white space to leave around the borders of the tree. (Long labels sometimes get cut off by the default computation).
一个额外的部分离开的空白边框周围的树。 (长的标签有时会被切掉的默认计算)。
参数:minbranch
set the minimum length for a branch to minbranch times the average branch length. This parameter is ignored if uniform=TRUE. Sometimes a split will give very little improvement, or even (in the classification case) no improvement at all. A tree with branch lengths strictly proportional to improvement leaves no room to squeeze in node labels.
设置最小长度minbranch倍,平均枝长的一个分支。此参数被忽略,如果uniform=TRUE。分裂有时会非常小的改善,甚至是在所有的分类情况下没有改善。一个树的分支长度的严格比例,以改善留下任何余地地挤在节点标签。
参数:...
arguments to be passed to or from other methods. </table>
参数被传递到或从其他方法。 </ TABLE>
Details
详细信息----------Details----------
This function is a method for the generic function plot, for objects of class rpart. The y-coordinate of the top node of the tree will always be 1.
此功能的方法的通用函数plot,的对象类rpart。在树的顶部节点的y坐标将始终为1。
值----------Value----------
The coordinates of the nodes are returned as a list, with components x and y.
节点的坐标的形式返回一个列表,组件x和y。
副作用----------Side Effects----------
An unlabeled plot is produced on the current graphics device.
未标记的图是在当前图形上设备。
参见----------See Also----------
rpart, text.rpart
rpart,text.rpart
实例----------Examples----------
fit <- rpart(Price ~ Mileage + Type + Country, cu.summary)
plot(fit, compress=TRUE)
text(fit, use.n=TRUE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|