找回密码
 注册
查看: 5336|回复: 0

R语言 RWeka包 Weka_classifier_trees()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-29 20:56:24 | 显示全部楼层 |阅读模式
Weka_classifier_trees(RWeka)
Weka_classifier_trees()所属R语言包:RWeka

                                        R/Weka Classifier Trees
                                         R / Weka中分类树

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

R interfaces to Weka regression and classification tree learners.
R接口Weka中回归和分类树的学习者。


用法----------Usage----------


J48(formula, data, subset, na.action,
    control = Weka_control(), options = NULL)
LMT(formula, data, subset, na.action,
    control = Weka_control(), options = NULL)
M5P(formula, data, subset, na.action,
    control = Weka_control(), options = NULL)
DecisionStump(formula, data, subset, na.action,
              control = Weka_control(), options = NULL)



参数----------Arguments----------

参数:formula
a symbolic description of the model to be fit.
一个象征性的模型来描述是合适的。


参数:data
an optional data frame containing the variables in the model.
一个可选的数据框包含在模型中的变量。


参数:subset
an optional vector specifying a subset of observations to be used in the fitting process.
一个可选的矢量指定的装配过程中可以使用的观测值的一个子集。


参数:na.action
a function which indicates what should happen when the data contain NAs.
一个函数,它表示当数据包含NA的,应该发生什么。


参数:control
an object of class Weka_control giving options to be passed to the Weka learner.  Available options can be obtained on-line using the Weka Option Wizard WOW, or the Weka documentation.
对象的类Weka_control提供选项将被传递给Weka中学习。可用的选项可以使用在WEKA选项向导WOW,或在WEKA文档上线。


参数:options
a named list of further options, or NULL (default).  See Details.
一个名为进一步的选项列表,或NULL(默认)。查看详细信息。


Details

详细信息----------Details----------

There are a predict method for predicting from the fitted models, and a summary method based on evaluate_Weka_classifier.
有一个predict从拟合模型的预测方法,并summary方法的基础上evaluate_Weka_classifier。

There is also a plot method for fitted binary Weka_trees via the facilities provided by package party. This converts the Weka_tree to a BinaryTree and then simply calls the plot method of this class (see plot.BinaryTree) with slight modifications to the default arguments.
还有一个plot提供的设施包Weka_tree的装二进制party的方法通过。转换Weka_tree到BinaryTree“,然后简单地调用这个类图法(见plot.BinaryTree)稍作修改默认的参数。

Provided the Weka classification tree learner implements the “Drawable” interface (i.e., provides a graph method), write_to_dot can be used to create a DOT representation of the tree for visualization via Graphviz or the Rgraphviz package.
Weka中分类树学习者提供了实现“可绘”界面(即提供一个graph方法),write_to_dot可以用来创建一个DOT通过的Graphviz可视化表示的树或Rgraphviz包。

J48 generates unpruned or pruned C4.5 decision trees (Quinlan, 1993).
J48生成未修剪或修剪C4.5决策树(昆兰,1993年)。

LMT implements “Logistic Model Trees” (Landwehr, 2003; Landwehr et al., 2005).
LMT实现“Logistic模型树”(2003年后备军,后备军等人,2005)。

M5P (where the P stands for "prime") generates M5 model trees using the M5' algorithm, which was introduced in Wang & Witten (1997) and enhances the original M5 algorithm by Quinlan (1992).
M5P(P代表首要)生成M5模型树使用M5的算法,该算法中引入了汪威腾(1997)和由Quinlan增强原M5算法的的( 1992)。

DecisionStump implements decision stumps (trees with a single split only), which are frequently used as base learners for meta learners such as Boosting.
DecisionStump实现决策的树桩(只与一个分割的树木),这是经常被用来作为基本学习如提高学习者元。

The model formulae should only use the + and - operators to indicate the variables to be included or not used, respectively.
模型公式应该只使用+和-运营商表示的变量或不使用,分别。

Argument options allows further customization.  Currently, options model and instances (or partial matches for these) are used: if set to TRUE, the model frame or the corresponding Weka instances, respectively, are included in the fitted model object, possibly speeding up subsequent computations on the object.  By default, neither is included.
参数options可以进一步定制。目前,选项model和instances(或部分匹配的这些):如果设置为TRUE,模型的框架或相应的的WEKA情况下,分别拟合模型对象,可能加快后续计算的对象。默认情况下,也不是。


值----------Value----------

A list inheriting from classes Weka_tree and Weka_classifiers with components including
继承类Weka_tree和Weka_classifiers组件,包括列表


参数:classifier
a reference (of class jobjRef) to a Java object obtained by applying the Weka buildClassifier method to build the specified model using the given control options.
参考(类jobjRef),通过应用在WEKA buildClassifier方法来建立模型使用给定的控制选项指定的Java对象。


参数:predictions
a numeric vector or factor with the model predictions for the training instances (the results of calling the Weka classifyInstance method for the built classifier and each instance).
一个数值向量或因子与培训实例(在WEKA classifyInstance内置分类方法,每个实例调用的结果)的模型预测。


参数:call
the matched call.
匹配的呼叫。


参考文献----------References----------

Logistic Model Trees. Master's thesis, Institute for Computer Science, University of Freiburg, Germany. http://www.informatik.uni-freiburg.de/~ml/thesis_landwehr2003.html
Logistic Model Trees. Machine Learning, 59, 161–205.
C4.5: Programs for Machine Learning. Morgan Kaufmann Publishers, San Mateo, CA.
Learning with continuous classes. Proceedings of the Australian Joint Conference on Artificial Intelligence, 343–348. World Scientific, Singapore.
Induction of model trees for predicting continuous classes. Proceedings of the European Conference on Machine Learning. University of Economics, Faculty of Informatics and Statistics, Prague.
Data Mining: Practical Machine Learning Tools and Techniques. 2nd Edition, Morgan Kaufmann, San Francisco.

参见----------See Also----------

Weka_classifiers
Weka_classifiers


实例----------Examples----------


m1 <- J48(Species ~ ., data = iris)

## print and summary[#打印和总结]
m1
summary(m1) # calls evaluate_Weka_classifier()[调用evaluate_Weka_classifier()]
table(iris$Species, predict(m1)) # by hand[手工]

## visualization[#可视化]
## use party package[#使用方包]
if(require("party", quietly = TRUE)) plot(m1)
## or Graphviz[#或Graphviz的]
write_to_dot(m1)
## or Rgraphviz[#或Rgraphviz]
## Not run: [#不运行:]
library("Rgraphviz")
ff <- tempfile()
write_to_dot(m1, ff)
plot(agread(ff))

## End(Not run)[#(不执行)]

## Using some Weka data sets ...[#使用一些Weka数据集...]

## J48[#J48]
DF2 <- read.arff(system.file("arff", "contact-lenses.arff",
                             package = "RWeka"))
m2 <- J48(`contact-lenses` ~ ., data = DF2)
m2
table(DF2$`contact-lenses`, predict(m2))
if(require("party", quietly = TRUE)) plot(m2)

## M5P[#M5P]
DF3 <- read.arff(system.file("arff", "cpu.arff", package = "RWeka"))
m3 <- M5P(class ~ ., data = DF3)
m3
if(require("party", quietly = TRUE)) plot(m3)

## Logistic Model Tree.[#Logistic模型树。]
DF4 <- read.arff(system.file("arff", "weather.arff", package = "RWeka"))
m4 <- LMT(play ~ ., data = DF4)
m4
table(DF4$play, predict(m4))

## Larger scale example.[#较大规模的例子。]
if(require("mlbench", quietly = TRUE)
   &amp;&amp; require("party", quietly = TRUE)) {
    ## Predict diabetes status for Pima Indian women[预测糖尿病皮马印第安人妇女地位]
    data("PimaIndiansDiabetes", package = "mlbench")
    ## Fit J48 tree with reduced error pruning[#适合J48减少错误修剪的树]
    m5 <- J48(diabetes ~ ., data = PimaIndiansDiabetes,
              control = Weka_control(R = TRUE))
    plot(m5)
    ## (Make sure that the plotting device is big enough for the tree.)[(请确保打印设备是足够大的树。)]
}

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-28 19:05 , Processed in 0.020436 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表