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

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

[复制链接]
发表于 2012-9-27 00:02:05 | 显示全部楼层 |阅读模式
mgraph(rminer)
mgraph()所属R语言包:rminer

                                         Mining graph function
                                         矿业图形功能

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

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

Plots a graph given a mining list, list of several mining lists or given the pair y - target and x - predictions.
绘制一个图形,一个mining列表,列表中的几个采矿列表或对Y  - 目标和x  - 预测。


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


mgraph(y, x = NULL, graph, leg = NULL, xval = -1, PDF = "", PTS = -1,
       size = c(5, 5), sort = TRUE, ranges = NULL, data = NULL,
       digits = NULL, TC = -1, intbar = TRUE, lty = 1, col = "black",
       main = "", metric = "MAE", baseline = FALSE, Grid = 0,
       axis = NULL)



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

参数:y
if there are predictions (!is.null(x)), y should be a numeric vector or factor with the target desired responses (or output values).<br> Else, y should be a list returned by the  mining function or a vector list with several mining lists.
如果有预测(!is.null(x))y应该是一个数值向量或与目标所需的响应(或输出值)。<BR>其他因素,y应该是返回一个列表mining函数或向量列表的几个采矿列表。


参数:x
the predictions (should be a numeric vector if task="reg", matrix if task="prob" or factor if task="class" (use if y is not a list).
预测(应该是一个数值向量,如果task="reg",矩阵task="prob"或因素,如果task="class"(使用y如果是不是一个列表)。


参数:graph
type of graph. Options are:  
图形类型。选项有:

ROC &ndash; ROC curve (classification);
ROC -  ROC曲线(分类);

LIFT &ndash; LIFT accumulative curve (classification);
LIFT  -  LIFT累积曲线(分类);

IMP &ndash; relative input importance barplot;
IMP - 相对输入的重视barplot的;

REC &ndash; REC curve (regression);
REC -  REC曲线(回归);

VEC &ndash; variable effect curve;
VEC  - 变效应曲线;

RSC &ndash; regression scatter plot;
RSC“ - 回归散点图;

REP &ndash; regression error plot;
REP - 回归误差图;

REG &ndash; regression plot;
REG  - 回归图;

DLC &ndash; distance line comparison (for comparing errors in one line);
DLC - 长途线路比较(比较一行中的错误);


参数:leg
legend of graph:  
传说中的图:

if NULL &ndash; not used;
如果NULL - 不使用;

if -1 and graph="ROC" or "LIFT"  &ndash; the target class name is used;
如果为-1,graph="ROC" or "LIFT" - 目标类的名称使用;

if -1 and graph="REG"  &ndash; leg=c("Target","Predictions");
如果为-1 graph="REG" - leg=c("Target","Predictions");

if -1 and graph="RSC"  &ndash; leg=c("Predictions");
如果为-1 graph="RSC" - leg=c("Predictions");

if vector with "character" type (text) -- the text of the legend;
如果向量与“性格”的类型(文本) - 文本的传说;

if is list -- $leg = vector with the text of the legend and $pos is the position of the legend (e.g. "top" or c(4,5));
如果是列表 - $leg=向量与文本的传说和$pos是传说中的位置(例如“顶”或c(4,5));


参数:xval
auxiliary value, used by some graphs:  
辅助值,使用一些图表:

VEC &ndash; if -1 means perform several 1-D sensitivity analysis VEC curves, one for each attribute, if >0 means the attribute index (e.g. 1).
VEC - 如果执行数1-D的敏感性分析VEC曲线,为每个属性之一,-1表示如果> 0表示的属性的索引(例如1)。

ROC or LIFT or REC &ndash; if -1 then xval=1. For these graphs, xval is the maximum x-axis value.
ROC或LIFT或REC“ - 如果为-1,然后xval=1。这些图形,xval是最大的X轴值。

IMP &ndash; xval is the x-axis value for the legend of the attributes.
IMP - xval是X轴值的属性的传说。

REG &ndash; xval is the set of plotted examples (e.g. 1:5), if -1 then all examples are used.
REG - xval是绘制的例子(例如,1:5)的组,如果-1,那么所有的例子都使用。

DLC &ndash; xval is the val of the mmetric function.
DLC - xval是val的mmetric功能。


参数:PDF
if "" then the graph is plotted on the screen, else the graph is saved into a pdf file with the name set in this argument.
如果""然后在屏幕上绘制图形,在此参数中设置的名称的PDF文件保存到其他的图形。


参数:PTS
number of points in each line plot. If -1 then PTS=11 (for ROC, REC or LIFT) or PTS=6 (VEC).
每个线图中的点的数量。如果为-1,然后PTS=11(ROC,REC或LIFT)或PTS=6(VEC)。


参数:size
size of the graph, c(width,height), in inches.
的曲线图时,c(宽度,高度),以英寸为单位的大小。


参数:sort
if TRUE then sorts the data (works only for some graphs, e.g. VEC, IMP, REP).
如果TRUE,则排序的数据(仅适用于一些图表,如:VEC,IMP,REP)。


参数:ranges
matrix with the attribute minimum and maximum ranges (only used by VEC).
矩阵的属性最小和最大范围(仅使用VEC)。


参数:data
the training data, for plotting histograms and getting the minimum and maximum attribute ranges if not defined in ranges (only used by VEC).
训练数据,绘制直方图和获得的最小和最大的属性范围,如果没有定义范围(仅使用VEC)。


参数:digits
the number of digits for the axis, can also be defined as c(x-axis digits,y-axis digits) (only used by VEC).
该轴的位数的数目,也可以被定义为c(x-轴数字,y-轴位数)(仅用于VEC)。


参数:TC
target class (for multi-class classification class) within 1,...,Nc, where Nc is the number of classes. If multi-class and TC==-1 then TC is set to  the index of the last class.
目标多类分类的类内类1,...,NC,NC的班级数目。如果是多级和TC == -1,则TC设置为最后一堂课的索引。


参数:intbar
if 95% confidence interval bars (according to t-student distribution) should be plotted as whiskers.
如果95%的置信区间条(根据T-学生分布)应该被绘制成晶须。


参数:lty
the same lty argument of the par function.
同样的ltypar函数的参数。


参数:col
color, as defined in the par function.
颜色,par函数中定义。


参数:main
the title of the graph, as defined in the plot function.
plot函数的曲线图,所定义的标题。


参数:metric
the error metric, as defined in mmetric (used by DLC).
的错误度量的定义,mmetric(使用DLC)中。


参数:baseline
if the baseline should be plotted (used by ROC and LIFT).
如果基准应绘制(使用ROC和LIFT)。


参数:Grid
if >1 then there are GRID light gray squared grid lines in the plot.
如果> 1,则有GRID浅灰色方格线中的图。


参数:axis
Currently only used by IMP: numeric vector with the axis numbers (1 &ndash; bottom, 3 &ndash; top). If NULL then axis=c(1,3).
目前只用于IMP:数字矢量与轴号(1  - 底,3  - 上)。如果NULL然后axis=c(1,3)的。


Details

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

Plots a graph given a mining list, list of several mining lists or given the pair y - target and x - predictions.
绘制一个图形,一个mining列表,列表中的几个采矿列表或对Y  - 目标和x  - 预测。


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

A graph (in screen or pdf file).
一个图的(屏幕或PDF文件)。


注意----------Note----------

See also http://www3.dsi.uminho.pt/pcortez/rminer.html
也http://www3.dsi.uminho.pt/pcortez/rminer.html


(作者)----------Author(s)----------


Paulo Cortez <a href="http://www3.dsi.uminho.pt/pcortez">http://www3.dsi.uminho.pt/pcortez</a>



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


To check for more details about rminer and for citation purposes:<br> P. Cortez.<br> Data Mining with Neural Networks and Support Vector Machines Using the R/rminer Tool.<br> In P. Perner (Ed.), Advances in Data Mining - Applications and Theoretical Aspects 10th Industrial Conference on Data Mining (ICDM 2010), Lecture Notes in Artificial Intelligence 6171, pp. 572-583, Berlin, Germany, July, 2010. Springer. ISBN: 978-3-642-14399-1.<br> @Springer: http://www.springerlink.com/content/e7u36014r04h0334<br> http://www3.dsi.uminho.pt/pcortez/2010-rminer.pdf<br> </ul>

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

fit, predict.fit, mining, mmetric, savemining and Importance.
fit,predict.fit,mining,mmetric,savemining和Importance。


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


### regression[##回归]
y=c(1,5,10,11,7,3,2,1);x=rnorm(length(y),0,1.0)+y
mgraph(y,x,graph="RSC",Grid=10,col=c("blue"))
mgraph(y,x,graph="REG",Grid=10,lty=1,col=c("black","blue"),
       leg=list(pos="topleft",leg=c("target","predictions")))
mgraph(y,x,graph="REP",Grid=10)
mgraph(y,x,graph="REP",Grid=10,sort=FALSE)
x2=rnorm(length(y),0,1.2)+y;x3=rnorm(length(y),0,1.4)+y;
L=vector("list",3); pred=vector("list",1); test=vector("list",1);
pred[[1]]=y; test[[1]]=x; L[[1]]=list(pred=pred,test=test,runs=1)
test[[1]]=x2; L[[2]]=list(pred=pred,test=test,runs=1)
test[[1]]=x3; L[[3]]=list(pred=pred,test=test,runs=1)
mgraph(L,graph="DLC",metric="MAE",leg=c("x","x2","x3"),main="MAE errors")

### regression example with mining[##回归例如采矿]
data(sin1reg)
M1=mining(y~.,sin1reg[,c(1,2,4)],model="mr",Runs=5)
M2=mining(y~.,sin1reg[,c(1,2,4)],model="mlpe",
          mpar=c(3,50),search=4,Runs=5,feature="simp")
L=vector("list",2); L[[1]]=M2; L[[2]]=M1
mgraph(L,graph="REC",xval=0.1,leg=c("mlpe","mr"),main="REC curve")
mgraph(L,graph="DLC",metric="TOLERANCE",xval=0.01,
       leg=c("mlpe","mr"),main="DLC: TOLERANCE plot")
mgraph(M2,graph="IMP",xval=0.01,leg=c("x1","x2"),
       main="sin1reg Input importance",axis=1)
mgraph(M2,graph="VEC",xval=1,main="sin1reg 1-D VEC curve for x1")
mgraph(M2,graph="VEC",xval=1,
       main="sin1reg 1-D VEC curve and histogram for x1",data=sin1reg)

### classification example[##分类示例]
data(iris)
M1=mining(Species~.,iris,model="dt",Runs=5)
M2=mining(Species~.,iris,model="svm",Runs=5)
L=vector("list",2); L[[1]]=M2; L[[2]]=M1
mgraph(M1,graph="ROC",TC=3,leg=-1,baseline=TRUE,Grid=10,main="mr ROC")
mgraph(M1,graph="ROC",TC=3,leg=-1,baseline=TRUE,Grid=10,main="mr ROC",intbar=FALSE)
mgraph(L,graph="ROC",TC=3,leg=c("svm","dt"),baseline=TRUE,Grid=10,
       main="ROC for virginica")
mgraph(L,graph="LIFT",TC=3,leg=list(pos=c(0.4,0.2),leg=c("svm","dt")),
       baseline=TRUE,Grid=10,main="LIFT for virginica")

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-24 03:19 , Processed in 0.024276 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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