楼主: 尘星1109
3859 5

[问答] 用R软件的kernlab包做SVM时报错 [推广有奖]

  • 0关注
  • 0粉丝

本科生

3%

还不是VIP/贵宾

-

威望
0
论坛币
0 个
通用积分
1.0000
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
298 点
帖子
16
精华
0
在线时间
122 小时
注册时间
2009-5-12
最后登录
2022-9-16

楼主
尘星1109 学生认证  发表于 2014-2-22 19:49:18 |AI写论文
2论坛币
用R软件的kernlab包做SVM时出现model.frame.default、数据不是矩阵是什么意思?该这么改正啊?急求!

关键词:kernlab r软件 Lab SVM Default 软件

本帖被以下文库推荐

自强不息

沙发
jiabiao1602 发表于 2014-2-23 01:03:32
是不是你在抽样建模 导致因变量与自变量的样本量不一致了?

藤椅
lww1993 发表于 2014-3-16 20:52:33
你给一下程序,还有数据的形式,然后把错误写出,不太明白你的意思

板凳
jgchen1966 发表于 2014-3-16 22:31:27
二种输入格式:ksvm(x,data),数据data可用data.frame ,x 为公式,另一种ksvm (x,y),其中的x 须取matrix 否则就有楼主的报错了。。。
鹑居鷇食,鸟行无彰

报纸
jgchen1966 发表于 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.
鹑居鷇食,鸟行无彰

地板
jgchen1966 发表于 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.
鹑居鷇食,鸟行无彰

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-16 20:48