2

I am trying to use ksvm function of kernlab package in R for epsilon-SVM regression. I want to put parameters C(regularization constant) and epsilon (insensitivity) as vectors(length of vector = training data length). But I am not able to figure out how to do this. Please suggest some way.

lejlot
  • 64,777
  • 8
  • 131
  • 164
manofsins
  • 1,583
  • 2
  • 10
  • 12

1 Answers1

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.

lejlot
  • 64,777
  • 8
  • 131
  • 164