predict.survivalsvm function

Suvirvalsvm predictions

Suvirvalsvm predictions

Predictions of objects of class survivalsvm.

## S3 method for class 'survivalsvm' predict(object, newdata, subset = NULL, ...)

Arguments

  • object: [survivalsvm(1)]

    Object of class survivalsvm, fitted with survivalsvm.

  • newdata: [data.frame(1)]

    Data frame of observations.

  • subset: [vector(1)]

    Indexes of data points of used to make the prediction.

  • ...: [any]

    Further arguments passed to or from other methods.

Returns

[survivalsvmprediction(1)] Object of class survivalsvmprediction, with elements:

typeofsurvivalsvmType of survivalsvm object that is fitted in the model,
typeofkerneltype of kernel used to fit the model,
parameterofkernelKernel parameters used to fit the model,
opt.methsolver used to fit the model,
predictedvalues predicted.

Examples

require(survival) set.seed(123) n <- nrow(veteran) train.index <- sample(1:n, 0.7*n, replace = FALSE) test.index <- setdiff(1:n, train.index) survsvm.reg <- survivalsvm(Surv(veteran$diagtime, veteran$status) ~ ., subset = train.index, data = veteran, type = "regression", gamma.mu = 1, opt.meth = "quadprog", kernel = "add_kernel") pred.survsvm.reg <- predict(object = survsvm.reg, newdata = veteran, subset = test.index) print(pred.survsvm.reg)

See Also

survivalsvm

Author(s)

Cesaire J. K. Fouodo

  • Maintainer: Cesaire J. K. Fouodo
  • License: GPL
  • Last published: 2025-04-04