全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
3808 5
2014-02-22
悬赏 2 个论坛币 未解决
用R软件的kernlab包做SVM时出现model.frame.default、数据不是矩阵是什么意思?该这么改正啊?急求!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2014-2-23 01:03:32
是不是你在抽样建模 导致因变量与自变量的样本量不一致了?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-3-16 20:52:33
你给一下程序,还有数据的形式,然后把错误写出,不太明白你的意思
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-3-16 22:31:27
二种输入格式:ksvm(x,data),数据data可用data.frame ,x 为公式,另一种ksvm (x,y),其中的x 须取matrix 否则就有楼主的报错了。。。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-3-16 22:47:30
其实 ,ksvm() 的说明书说得很明白(见下面),我发现本论坛上许多R 使用者,好象是不读说明书的。我们因为对域知识知得不多因而用ML,如我们对ML也不再深入了解,我们真得不用上学就能成先知先觉了??
ksvm(x,data,.....) 或ksvm(x,y=HULL,..........)
x      a symbolic description of the model to be fit. When not using a formula x can
be a matrix or vector containing the training data or a kernel matrix of class
kernelMatrix of the training data or a list of character vectors (for use with the
string kernel). Note, that the intercept is always excluded, whether given in the
formula or not.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-3-16 22:49:17
其实 ,ksvm() 的说明书说得很明白(见下面),我发现本论坛上许多R 使用者,好象是不读说明书的。我们因为对域知识知得不多因而用ML,如我们对ML也不再深入了解,我们真得不用上学就能成先知先觉了??
ksvm(x,data=NULL,.....) 或ksvm(x,y=NULL,..........)
x      a symbolic description of the model to be fit. When not using a formula x can
be a matrix or vector containing the training data or a kernel matrix of class
kernelMatrix of the training data or a list of character vectors (for use with the
string kernel). Note, that the intercept is always excluded, whether given in the
formula or not.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群