2

我正在尝试使用 R 中 kernlab 包的 ksvm 函数进行 epsilon-SVM 回归。我想将参数 C(正则化常数)和 epsilon(不敏感)作为向量(向量长度 = 训练数据长度)。但我无法弄清楚如何做到这一点。请提出一些方法。

4

1 回答 1

2

Why do you assume that you can do it? According to documentation of ksvm you can only weight classes, not particular samples. Such modification is accessible in for example sklearn python library (as samples' weights).

To artificialy implement per samples C-weights you could oversample your data. It will be very inefficient (especially if you have large differences in C values), but it can be applied to almost any SVM library.

于 2013-08-31T19:37:17.203 回答