predict.survivalsvm: Suvirvalsvm predictions

Description Usage Arguments Value Author(s) See Also Examples

Description

Predictions of objects of class survivalsvm.

Usage

1
2
## 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.

Value

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

typeofsurvivalsvm Type of survivalsvm object that is fitted in the model,
typeofkernel type of kernel used to fit the model,
parameterofkernel Kernel parameters used to fit the model,
opt.meth solver used to fit the model,
predicted values predicted.

Author(s)

Cesaire J. K. Fouodo

See Also

survivalsvm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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)

Example output

Loading required package: survival


survivalsvm prediction

Type of survivalsvm                      : regression 
Type of kernel                           : add_kernel 
Optimization solver used in model        : quadprog 
predicted risk ranks                     : 13.89 14.95 11.12 15.6 10.7 ...
survivalsvm version                      : 0.0.5 

survivalsvm documentation built on May 2, 2019, 9:29 a.m.