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

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

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

                                         Fit a supervised data mining model (classification or regression) model
                                         装一个监控数据挖掘模型(分类或回归)模型

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

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

Fit a supervised data mining model (classification or regression) model. Kind of a wrapper function that allows to fit distinct data mining methods under the same coherent function structure. Also, it tunes the hyperparameters of some models (e.g. knn, mlp, mlpe and svm) and performs some feature selection methods.
适合有监督的数据挖掘模型(分类或回归)模型。类的包装功能,允许在同一个连贯的功能结构,以适应不同的数据挖掘方法。此外,它调整的超一些型号(如:knn,mlp,mlpe和svm),并执行一些特征选择方法。


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


fit(x, data = NULL, model = "default", task = "default",
    search = "heuristic", mpar = NULL, feature = "none",
    scale = "default", transform = "none",
    created = NULL, ...)



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

参数:x
a symbolic description (formula) of the model to be fit. If x contains the data, then data=NULL (similar to x in ksvm, kernlab package).
一个象征性的模型来描述(公式)是合适的。 x如果包含数据,那么data=NULL(类似x的ksvm,kernlab包)。


参数:data
an optional data frame (columns denote attributes, rows show examples) containing the training data, when using a formula.
一个可选的数据框包含的训练数据(列表示的属性,行显示的例子),当使用一个公式。


参数:model
a character with the model type name (data mining method). Valid options are:   
字符与模型的类型名称(数据挖掘方法)。有效的选项是:

naive most common class (classification) or mean output value (regression)
naive最常见的类型(分类)或平均输出值(回归)

lr (or logistic) – logistic regression (classification, uses multinom)
lr(或logistic) -  logistic回归分析(分类,使用multinom)

naivebayes – naive bayes (classification, very similar to naiveBayes)
naivebayes  - 朴素贝叶斯分类器(分类,非常类似到naiveBayes)

lda – linear discriminant analysis (classification, uses lda, requires MASS package, i.e. library(MASS))
lda  - 线性判别分析(分类,使用lda,需要MASS包,即library(MASS))

qda – quadratic discriminant analysis (classification, uses qda, requires MASS package)
qda  - 二次判别分析(分类,使用qda,需要MASS包)

dt – decision tree (classification and regression, uses rpart)
dt - 决策树分类和回归(使用rpart)

mr – multiple regression (regression, equivalent to lm but uses nnet with zero hidden nodes and linear output function)
mr - 多元回归分析(回归分析,等价于lm,但使用nnet零隐藏节点和线性输出功能)

bruto – additive spline model (regression, uses bruto, requires mda package, i.e. library(mda))
bruto  - 加样条模型(回归测试,使用bruto,需要mda包,即library(mda))

mars – multivariate adaptive regression splines (regression, uses mars, requires mda package, i.e. library(mda))
mars - 多元自适应回归样条曲线(回归测试,使用mars,需要mda包,即library(mda))

knn – k-nearest neighbor (classification and regression, uses kknn)
knn -  k-近邻分类和回归(使用kknn)

mlp – multilayer perceptron with one hidden layer (classification and regression, uses nnet)
mlp - 多层感知器具有一个隐藏层(分类和回归,使用nnet)

mlpe – multilayer perceptron ensemble (classification and regression, uses nnet)
mlpe - 多层感知器合奏(分类与回归,用nnet)

svm – support vector machine (classification and regression, uses ksvm)
svm - 支持向量机(分类与回归,用ksvm)

randomforest – random forest algorithm (classification and regression, uses and requires randomForest package, i.e.  library(randomForest))
randomforest - 随机森林算法(分类和回归,使用和需要randomForest包,即library(randomForest))的


参数:task
data mining task. Valid options are:  
数据挖掘任务。有效的选项是:

prob (or p) – classification with output probabilities (i.e. the sum of all outputs equals 1).
prob(或p) - 分类与输出概率(即所有输出的总和等于1)。

class (or c) – classification with discrete outputs (factor)  
class(或c) - 分类与离散输出(factor)

reg (or r) – regression (numeric output)  
reg(r) - 回归(数字输出)

default tries to guess the best task (prob or reg) given the model and output variable type (if factor then prob else reg)
default试图猜测最好的任务(prob或reg)model和输出变量类型(如果考虑因素,那么prob其他reg )


参数:search
used to tune the hyperparameter(s) of the model (only for: knn – number of neighbors (k);  mlp or mlpe – number of hidden nodes (H) or decay; svm – gaussian kernel parameter (sigma); randomforest – mtry parameter). Valid options are:  
用于调整超参数(S)的模式(仅适用于:knn - 的邻居(K),“mlp或mlpe - 隐层节点数(H)衰减,svm  - 高斯内核参数(SIGMA),“randomforest - mtry参数)。有效的选项是:

heuristic – simple heuristic, one search parameter (e.g. k=3 for knn, H=inputs/2 for mlp, sigma=2^-7 for svm)
heuristic - 一种新的启发式算法,一个搜索参数(如K = 3 knn,H =输入/ 2mlp,σ= 2 ^ -7为svm)

heuristic5 – heuristic with a 5 range grid-search (e.g. seq(1,9,2) for knn, seq(0,8,2) for mlp,  2^seq(-15,3,4) for svm, 1:5 for randomforest)
heuristic5 - 启发式与5网格搜索范围内(如:seq(1,9,2)knn,seq(0,8,2)mlp,2^seq(-15,3,4)<X >,svm1:5)

heuristic10 &ndash; heuristic with a 10 range grid-search (e.g. seq(1,10,1) for knn, seq(0,9,1) for mlp,  2^seq(-15,3,2) for svm, 1:10 for randomforest)
heuristic10 - 启发式与10范围内的网格搜索(如:seq(1,10,1)knn,seq(0,9,1)mlp,2^seq(-15,3,2)<X >,svm1:10)

UD, UD1 or UD2 &ndash; uniform design 2-Level with 13 (UD or UD2) or 21 (UD1) searches (for svm).
UD,UD1或UD2  - 均匀设计2级13(UD或UD2)或21(UD1)搜索( svm)。

a-vector &ndash; numeric vector with all hyperparameter values that will be searched within an internal grid-search (the number of searches  is length(search) when convex=0)
A-vector“ - 在一个内部网搜索,将搜索所有的的超参数值,(数字矢量的搜索次数是length(search)convex=0)




a-matrix &ndash; numeric matrix with all hyperparameter values (one different parameter per column) that will be searched within an internal grid-search (the number of searches is nrow(search) when convex=0)
A-matrix  - 数字矩阵,所有的的超参数值(每列一个不同的参数),将在一个内部网搜索搜索(搜索nrow(search)convex=0)

a-list &ndash; a list with:   
A-list“ - 一个列表:

$search &ndash; a-vector with all hyperparameter values or uniform design ranges
$search - vector所有的的超参数值或均匀设计范围

$convex &ndash; number that defines how many searches are performed after a local minimum/maximum is found (if >0, the search can be stopped without testing all grid-search values)  
$convex“ - (如果> 0,则可以停止搜索,没有测试所有网格搜索值的数字,它定义如何执行搜索后,当地的最小/最大)

$smethod &ndash; search method. Valid options are:   
$smethod  - 搜索方法。有效的选项是:

normal &ndash; default value for normal grid search.
normal  - 默认值正常的网格搜索。

2L - nested 2-Level grid search. First level range is set by $search and then the 2nd level performs a fine tuning, with length($search) searches around best value in first level.
2L -  2级嵌套网格搜索。第一级范围由$search“,然后第二级进行微调,length($search)在第一级的最佳值附近搜索。

UD, UD1 or UD2 &ndash; uniform design 2-Level with 13 (UD or UD2) or 21 (UD1) searches (for svm). Under this option, $search should contain the first level ranges, such as c(-15,3,-5,15) for classification (gamma min and max, C min and max,  after which a 2^ transform is applied) or c(-8,0,-1,6,-8,-1) for regression (last two values are epsilon min and max, after which a 2^ transform is applied).
UD,UD1或UD2  - 均匀设计2级13(UD或UD2)或21(UD1)搜索( svm)。根据这个方案,$search应该包含第一级的范围,如“c(-15,3,-5,15)分类(伽玛分钟,最大,最小和最大,后,一个2^的变换)或 c(-8,0,-1,6,-8,-1)回归(最后两个值是小量min和max,后,一个2^的变换)。


参数:mpar
vector with extra model parameters (used for modeling, search and feature selection) with:          
矢量额外的模型参数(用于建模,搜索和功能选择):

c(vmethod,vpar,metric) &ndash; if model= knn or randomforest;
C(vmethod,VPAR,metric) - 如果model=knn或randomforest;

c(C,epsilon,vmethod,vpar,metric) &ndash; if svm;
C(C,ε,vmethod,VPAR,metric) - 如果svm;

c(Nr,Me,vmethod,vpar,metric) &ndash; if mlp or mlpe and search for H is used; or
C(NR,我vmethod,VPAR,metric) - 如果mlp或mlpe和search为H;

c(Nr,Me,vmethod,vpar,metric,H) &ndash; if mlp or mlpe and search for decay is used.
C(NR,我vmethod“,VPAR,metric,H) - ,如果mlp或mlpe和search腐烂使用。

C and epsilon are default values for svm (if any of these is =NA then heuristics are used to set the value).<br> Nr is the number of mlp runs or mlpe individual models, while Me is the maximum number of epochs (if any of these is =NA then heuristics are used to set the value).<br> In the fit function, vmethod can only be set to: "all", "holdout", "holdoutorder", "kfold" or "kfoldo". For help on vmethod and vpar see mining.<br> metric is the internal error function (e.g. used by search to select the best model), valid options are explained in mmetric.  When mpar=NULL then default values are used. If there are NA values (e.g. mpar=c(NA,NA)) then default values are used.
C和小量的默认值svm(如果这些=NA然后启发式用来设置值)。参考Nr是mlp运行mlpe个别车型,而我是时代的最大数量(如果这些=NA然后启发式是用来设置值)。<BR>在fit功能中,vmethod只能设置为:“所有”,“抵抗”,“holdoutorder”,“kfold”或“kfoldo”。如需帮助在vmethod和vPar中看到mining。参考metric是内部误差函数(例如,使用搜索选择的最佳模式),有效的选项说明在mmetric。当mpar=NULL然后默认值。如果有是NA的值(例如mpar=c(NA,NA)),那么默认值是用来。


参数:feature
feature selection and sensitivity analysis control. Valid fit function options are:   
功能选择和控制敏感性分析。有效的fit功能选项:

none &ndash; no feature selection;
none  - 没有特征选择;

a-vector &ndash; vector with c(fmethod,deletions,Runs,vmethod,vpar,defaultsearch)
A-vector  - 矢量与C(fmethod,删除,运行,vmethod,VPAR,defaultsearch的)

a-vector &ndash; vector with c(fmethod,deletions,Runs,vmethod,vpar)
A-vector  - 矢量与C(fmethod,删除,的运行,vmethod,VPAR的)

fmethod sets the type. Valid options are:   
fmethod设置类型。有效的选项是:

sbs &ndash; standard backward selection;
sbs  - 选择标准落后;

sabs &ndash; sensitivity analysis backward selection (faster);
sabs敏感性分析 - 逆向选择(快);

sabsv &ndash; equal to sabs but uses variance for sensitivity importance measure;
sabsv - sabs,但使用的灵敏度重要性测量的方差;

sabsr &ndash; equal to sabs but uses range for sensitivity importance measure;
sabsr - sabs但使用范围的灵敏度重要性的措施;

sabsg &ndash; equal to sabs (uses gradient for sensitivity importance measure);
sabsg - 等于sabs(使用梯度灵敏度重要性度量);

deletions is the maximum number of feature deletions (if -1 not used).<br> Runs is the number of runs for each feature set evaluation (e.g. 1).<br> For help on vmethod and vpar see mining.<br> defaultsearch is one hyperparameter used during the feature selection search, after selecting the best feature set then search is used (faster).  If not defined, then search is used during feature selection (may be slow).<br> When feature is a vector then default values are used to fill missing values or NA values.
缺失是功能缺失(如果为-1未使用)的最大数量。,参考运行是运行的每个功能进行评估(例如1)。<BR>帮助vmethod和VPAR看到mining 。参考defaultsearch是一个超参数选择搜索过程中使用的功能后,选择最佳的功能设置,则search(快)。如果没有定义,那么search过程中使用的功能选择(可能是缓慢的)。参考功能是一个向量,然后使用默认值填补遗漏值或NA值时。


参数:scale
if data needs to be scaled (i.e. for mlp or mlpe). Valid options are:   
如果数据需要进行调整(即mlp或mlpe)。有效的选项是:

default &ndash; uses scaling when needed (i.e. for mlp or mlpe)
default  - 在需要的时候使用缩放(即mlp或mlpe)

none &ndash; no scaling;  
none  - 不结垢;

inputs &ndash; standardizes (0 mean, 1 st. deviation) input attributes;  
inputs - 标准化(0表示,1日。偏差),输入属性;

all &ndash; standardizes (0 mean, 1 st. deviation) input and output attributes;
all - 规范(0表示,1日。偏差)输入和输出属性;

If needed, the predict function of rminer performs the inverse scaling.
如果需要的话,predict功能的rminer进行逆缩放。


参数:transform
if the output data needs to be transformed (e.g. log transform). Valid options are:   
如果需要转换(如:log变换)的输出数据。有效的选项是:

none &ndash; no transform;  
none  - 没有转化;

log &ndash; y=(log(y+1)) (the inverse function is applied in the predict function);
log - 为y =(log(y +1)的)(施加在predict函数的逆函数);

positive &ndash; all predictions are positive (negative values are turned into zero);
positive“ - 所有的预测为正(负数值变成零);

logpositive &ndash; both log and logpositive;  
logpositive - 两个log和logpositive;


参数:created
time stamp for the model. By default, the system time is used. Else, you can specify another time.
时间邮票的模型。默认情况下,使用系统的时间。否则,你可以指定一个时间。


参数:...
additional and specific parameters send to each fit function model (e.g. dt, randomforest). For example, the rpart function is used for dt,  thus you can add: control=rpart.control(cp=.05).
额外的,具体的参数发送到每个拟合函数模型(如:dt,randomforest)。例如,rpart函数用于dt,因此你可以添加:control=rpart.control(cp=.05)。


Details

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

Fits a classification or regression model given a data.frame (see [Cortez, 2010] for more details):  
适用于数据框(有关详细信息,请参阅[2010]科尔特斯,)的分类或回归模型:

Neural Network: mlp trains Nr multilayer perceptrons (with Me epochs, H hidden nodes  and decay value according to the nnet function) and selects the best network according to minimum penalized error ($value). mlpe uses an ensemble of Nr networks and the final prediction is given by the average of all outputs. To tune mlp or mlpe you can use the search parameter, which performs a grid search for H or decay.
神经网络:mlpNR训练,多层感知器(我的时代,H隐藏节点和衰减值根据nnet功能),并选择最佳的网络根据最低处罚错误的($value) 。 mlpe使用的合奏NR网络和所有输出的平均最终的预测。要调整mlp或mlpe,“你可以使用search参数,进行网格搜索H或腐烂。




Support Vector Machine: svm adopts the gaussian kernel. For classification tasks, you can use search to tune sigma (gaussian kernel parameter)  and C (complexity parameter). For regression, the epsilon insensitive function is adopted and there is an additional hyperparameter epsilon.
支持向量机:svm采用高斯核。分类任务,你可以使用search调整Σ(高斯内核参数)和C(复杂参数)。对于回归的epsilon不敏感的功能采用,并有一个额外的超参数小量。




Other methods: Random Forest -- if needed, you can tune the mtry parameter using search; k-nearest neighbor &ndash; use search to tune k. </ul>
其他方法:随机森林 - 如果需要的话,你可以调整mtry参数使用searchk-近邻 - 使用search调整K表。 </ ul>


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

Returns a model object. You can check all model elements with str(M), where M is a model object. The slots are:   
返回一个模型对象。您可以查看所有的模型元素与str(M),其中M是一个模型对象。插槽是:

@formula &ndash; the x;
@formula - x;

@model &ndash; the model;
@model - model;

@task &ndash; the task;
@task - task;

@mpar &ndash; data.frame with the best model parameters (interpretation depends on model);
@mpar - 数据框的最好的模型参数(解释依赖于model);

@attributes &ndash; the attributes used by the model;
@attributes - 属性,所使用的模型;

@scale &ndash; the scale;
@scale - scale;

@transform &ndash; the transform;
@transform - transform;

@created &ndash; the date when the model was created;
@created  - 创建模型时的日期;

@time &ndash; computation effort to fit the model;
@time - 计算模型,以适应;

@object &ndash; the R object model (e.g. rpart, nnet, ...);
@object -  R对象模型(例如rpart,nnet,...);

@outindex &ndash; the output index (of @attributes);
@outindex  - 输出索引(@属性);

@levels &ndash; if task=="prob"||task=="class" stores the output levels;  </ul>
@levels - 如果task=="prob"||task=="class"存储的输出电平; </ ul>


注意----------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>

For the sabs feature selection:<br> P. Cortez, A. Cerdeira, F. Almeida, T. Matos and J. Reis.<br> Modeling wine preferences by data mining from physicochemical properties.<br> In Decision Support Systems, Elsevier, 47(4):547-553, 2009.<br> http://dx.doi.org/10.1016/j.dss.2009.05.016<br>

For the uniform design details:<br> C.M. Huang, Y.J. Lee, D.K.J. Lin and S.Y. Huang.<br> Model selection for support vector machines via uniform design,<br> In Computational Statistics &amp; Data Analysis, 52(1):335-346, 2007.<br> </ul>

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

mining, predict.fit, mgraph, mmetric, savemining, CasesSeries, lforecast, holdout and Importance. Check all rminer functions using: help(package=rminer).
mining,predict.fit,mgraph,mmetric,savemining,CasesSeries,lforecast,holdout和Importance。检查所有rminer的功能:help(package=rminer)。


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


### simple regression (with a formula) example.[##简单的回归(公式)的例子。]
x1=rnorm(200,100,20); x2=rnorm(200,100,20)
y=0.7*sin(x1/(25*pi))+0.3*sin(x2/(25*pi))
M=fit(y~x1+x2,model="mlpe",search=2)
new1=rnorm(100,100,20); new2=rnorm(100,100,20)
ynew=0.7*sin(new1/(25*pi))+0.3*sin(new2/(25*pi))
P=predict(M,data.frame(x1=new1,x2=new2,y=rep(NA,100)))
print(mmetric(ynew,P,"MAE"))

### simple classification example.[##简单分类的例子。]
data(iris)
M=fit(Species~.,iris,model="dt")
P=predict(M,iris)
print(mmetric(iris$Species,P,"CONF"))
print(mmetric(iris$Species,P,"ACC"))
print(mmetric(iris$Species,P,"AUC"))
print(metrics(iris$Species,P))
mgraph(iris$Species,P,graph="ROC",TC=2,main="versicolor ROC",
baseline=TRUE,leg="Versicolor",Grid=10)

### classification example with discrete classes, probabilities and holdout[##分类例如,离散的类,概率和保留的]
H=holdout(iris$Species,ratio=2/3)
M=fit(Species~.,iris[H$tr,],model="svm",task="class")
M2=fit(Species~.,iris[H$tr,],model="svm",task="prob")
P=predict(M,iris[H$ts,])
P2=predict(M2,iris[H$ts,])
print(mmetric(iris$Species[H$ts],P,"CONF"))
print(mmetric(iris$Species[H$ts],P2,"CONF"))
print(mmetric(iris$Species[H$ts],P,"CONF",TC=1))
print(mmetric(iris$Species[H$ts],P2,"CONF",TC=1))
print(mmetric(iris$Species[H$ts],P2,"AUC"))

### classification example with hyperparameter selection[##分类例如,超参数选择]
# SVM [SVM]
M=fit(Species~.,iris,model="svm",search=2^-3,mpar=c(3)) # C=3, gamma=2^-3[C = 3,γ= 2 ^ -3]
print(M@mpar) # gamma, C, epsilon (not used here)[伽马,C,ε(未使用)]
M=fit(Species~.,iris,model="svm",search="heuristic10") # 10 grid search for gamma[10格搜索伽马]
print(M@mpar) # gamma, C, epsilon (not used here)[伽马,C,ε(未使用)]
M=fit(Species~.,iris,model="svm",search="heuristic10") # 10 grid search for gamma[10格搜索伽马]
print(M@mpar) # gamma, C, epsilon (not used here)[伽马,C,ε(未使用)]
M=fit(Species~.,iris,model="svm",search=2^seq(-15,3,2),
      mpar=c(NA,NA,"holdout",2/3,"AUC")) # same 0 grid search for gamma[相同的伽玛0网格搜索]
print(M@mpar) # gamma, C, epsilon (not used here)[伽马,C,ε(未使用)]
search=svmgrid(task="prob") # grid search as suggested by the libsvm authors[网格搜索的libsvm的作者所建议的]
M=fit(Species~.,iris,model="svm",search=search) # []
print(M@mpar) # gamma, C, epsilon (not used here)[伽马,C,ε(未使用)]
M=fit(Species~.,iris,model="svm",search="UD") # 2 level 13 point uniform-design[2级13点均匀设计]
print(M@mpar) # gamma, C, epsilon (not used here)[伽马,C,ε(未使用)]
# MLPE[MLPE]
M=fit(Species~.,iris,model="mlpe",search="heuristic5") # 5 grid search for H[5格的H搜索]
print(M@mpar)
M=fit(Species~.,iris,model="mlpe",search="heuristic5",
      mpar=c(3,100,"kfold",3,"AUC",2)) # 5 grid search for decay, inner 3-fold[5格搜索衰减,内部3倍]
print(M@mpar)
# faster grid search [更快的网格搜索]
M=fit(Species~.,iris,model="mlpe",search=list(smethod="normal",convex=1,search=0:9))
print(M@mpar)
# 2 level grid with total of 5 searches[2级网格,共5搜索]
M=fit(Species~.,iris,model="mlpe",search=list(smethod="2L",search=c(4,8,12)))
print(M@mpar)
# 2 level grid for decay[2级网格衰减]
search=list(smethod="2L",search=c(0,0.1,0.2));mpar=c(3,100,"holdout",3,"AUC",2)
M=fit(Species~.,iris,model="mlpe",search=search,mpar=mpar)
print(M@mpar)
### regression example[##回归的例子]
data(sin1reg)
M=fit(y~.,data=sin1reg,model="svm",search="heuristic")
P=predict(M,sin1reg)
print(mmetric(sin1reg$y,P,"MAE"))
mgraph(sin1reg$y,P,graph="REC",Grid=10)
# uniform design[均匀设计]
M=fit(y~.,data=sin1reg,model="svm",search="UD")
print(M@mpar)
# sensitivity analysis feature selection[灵敏度分析功能选择]
M=fit(y~.,data=sin1reg,model="svm",search="heuristic5",feature="sabs")
print(M@mpar)
print(M@attributes) # selected attributes (1 and 2 are the relevant inputs)[选定的属性(1和2是有关输入)]
P=predict(M,sin1reg); print(mmetric(sin1reg$y,P,"MAE"))
# sensitivity analysis feature selection[灵敏度分析功能选择]
M=fit(y~.,data=sin1reg,model="mlp",search=2,feature=c("sabs",-1,1,"kfold",3))
print(M@mpar)
print(M@attributes)

M=fit(y~.,data=sin1reg,model="svm",search="heuristic")
P=predict(M,data.frame(x1=-1000,x2=0,x3=0,y=NA)) # P should be negative...[P应该是负...]
print(P)
M=fit(y~.,data=sin1reg,model="svm",search="heuristic",transform="positive")
P=predict(M,data.frame(x1=-1000,x2=0,x3=0,y=NA)) # P is not negative...[P是负...]
print(P)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-23 17:20 , Processed in 0.025723 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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