I am using mlr3proba
package of R
for machine learning survival analysis.
My dataset contains factor, numeric and integer features.
To implement SVM
I wrote the code below:
task <- TaskSurv$new(id = "id", backend = dataset, time = time, event = status)
train <- sample(task$nrow, 0.8 * task$nrow)
test <- setdiff(seq_len(task$nrow), train)
resampling <- rsmp("cv", folds = 10)
learner <- lrn("surv.svm", gamma.mu ="0.1")
learner$train(task, row_ids = train)
But when I run the last line of code, It shows the error below:
Error in -ub: invalid argument to unary operator
When I run SVM
in main survivalsvm
package, it works, but in mlr3proba
does not work.