Weka_classifier_functions(RWeka)
Weka_classifier_functions()所属R语言包:RWeka
R/Weka Classifier Functions
R / Weka中分类器的功能
译者:生物统计家园网 机器人LoveR
描述----------Description----------
R interfaces to Weka regression and classification function learners.
R接口Weka中回归和分类功能学习者。
用法----------Usage----------
LinearRegression(formula, data, subset, na.action,
control = Weka_control(), options = NULL)
Logistic(formula, data, subset, na.action,
control = Weka_control(), options = NULL)
SMO(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。
LinearRegression builds suitable linear regression models, using the Akaike criterion for model selection.
LinearRegression建立合适的线性回归模型,使用的Akaike模型选择准则。
Logistic builds multinomial logistic regression models based on ridge estimation (le Cessie and van Houwelingen, 1992).
Logistic建立多元logistic回归模型岭估计的(LE Cessie面包车Houwelingen,1992年)的基础上。
SMO implements John C. Platt's sequential minimal optimization algorithm for training a support vector classifier using polynomial or <acronym>RBF</acronym> kernels. Multi-class problems are solved using pairwise classification.
SMO实现了约翰·C. Platt的序列最小优化算法训练支持向量分类,利用多项式或<acronym>RBF </首字母缩写>内核。多类问题都解决了使用成对的分类。
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_functions and Weka_classifiers with components including
继承类Weka_functions和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----------
Fast training of Support Vector Machines using Sequential Minimal Optimization. In B. Schoelkopf, C. Burges, and A. Smola (eds.), Advances in Kernel Methods — Support Vector Learning. MIT Press.
Data Mining: Practical Machine Learning Tools and Techniques. 2nd Edition, Morgan Kaufmann, San Francisco.
参见----------See Also----------
Weka_classifiers
Weka_classifiers
实例----------Examples----------
## Linear regression:[#线性回归:]
## Using standard data set 'mtcars'.[#使用标准的数据设置“mtcars”。]
LinearRegression(mpg ~ ., data = mtcars)
## Compare to R:[#比较为R:]
step(lm(mpg ~ ., data = mtcars), trace = 0)
## Using standard data set 'chickwts'.[#使用标准的数据设置“chickwts”。]
LinearRegression(weight ~ feed, data = chickwts)
## (Note the interactions!)[(注意互动!)]
## Logistic regression:[#Logistic回归:]
## Using standard data set 'infert'.[#使用标准的数据设置“infert”。]
STATUS <- factor(infert$case, labels = c("control", "case"))
Logistic(STATUS ~ spontaneous + induced, data = infert)
## Compare to R:[#比较为R:]
glm(STATUS ~ spontaneous + induced, data = infert, family = binomial())
## Sequential minimal optimization algorithm for training a support[#顺序最小优化算法训练的支持]
## vector classifier, using am RBF kernel with a non-default gamma[#向量分类机,使用AM RBF内核与一个非默认的Gamma]
## parameter (argument '-G') instead of the default polynomial kernel[#参数(参数“-G),而不是默认的多项式核]
## (from a question on r-help):[#(R-的问题):]
SMO(Species ~ ., data = iris,
control = Weka_control(K =
list("weka.classifiers.functions.supportVector.RBFKernel", G = 2)))
## In fact, by some hidden magic it also "works" to give the "base" name[#事实上,一些隐藏的魔法也“作品”给“碱基”名称]
## of the Weka kernel class:[#在WEKA核心类:]
SMO(Species ~ ., data = iris,
control = Weka_control(K = list("RBFKernel", G = 2)))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|