Type: | Package |
Title: | Survival Support Vector Analysis |
Version: | 0.0.6 |
Date: | 2025-04-03 |
Description: | Performs support vectors analysis for data sets with survival outcome. Three approaches are available in the package: The regression approach takes censoring into account when formulating the inequality constraints of the support vector problem. In the ranking approach, the inequality constraints set the objective to maximize the concordance index for comparable pairs of observations. The hybrid approach combines the regression and ranking constraints in the same model. |
Imports: | pracma, kernlab, Matrix, stats, Hmisc |
Suggests: | testthat, quadprog |
Depends: | survival |
License: | GPL-2 | GPL-3 [expanded from: GPL] |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.2 |
URL: | https://github.com/imbs-hl/survivalsvm |
BugReports: | https://github.com/imbs-hl/survivalsvm/issues |
NeedsCompilation: | no |
Packaged: | 2025-04-03 17:00:38 UTC; fouodo |
Author: | Cesaire J. K. Fouodo [aut, cre] |
Maintainer: | Cesaire J. K. Fouodo <cesaire.kuetefouodo@uni-luebeck.de> |
Repository: | CRAN |
Date/Publication: | 2025-04-04 14:20:02 UTC |
Diffmatrix
.
Description
constructs objects of class Diffmatrix
.
Usage
Diffmatrix(Type = NULL, Mat = NULL)
Arguments
Type |
[ |
Mat |
[ |
Value
[Diffmatrix(1)
]
Mutated object of class Diffmatrix
containing elements:
Type | type of differences bildet between neighbors and |
Mat | matrix used to perform differences between comparable data points. |
HybridObj
(hybrid approach)
Description
Constructs object of class VB2FitObj
.
Usage
HybridObj(
Alpha = NULL,
Beta = NULL,
Betastar = NULL,
Delta = NULL,
Xtrain = NULL,
DifMat = NULL,
Kernel = NULL,
OptMeth = NULL,
b0 = NULL
)
Arguments
Alpha |
[ |
Beta |
[ |
Betastar |
[ |
Delta |
[ |
Xtrain |
[ |
DifMat |
[ |
Kernel |
[ |
OptMeth |
[ |
b0 |
[ |
Value
[HybridObj(1)
]
Object of class Hybrid
containing elements:
Alpha | Solution of the quadratic optimization problem, |
Xtrain | Matrix of training points, |
DifMat | Matrix used to made differences between neighbouring points. |
Kernel | Kernel matrix, an object of class Kernel , |
OptMeth | Program used to solve the quadratic optimization problem. |
Kernel
Description
Constructor of objects of class Kernel
.
Usage
Kernel(Type = NULL, Mat = NULL, Kernpar = NULL, bincat = NULL)
Arguments
Type |
[ |
Mat |
[ |
Kernpar |
[ |
bincat |
[ |
Value
[Kernel(1)
]
Object of class Kernel, with elements:
Type | type of kernel, |
Mat | matrix used to perform differences between comparable data points. |
Author(s)
Cesaire J. K. Fouodo
survivalsvm (regression approach)
Description
Constructs object of class RegFitObj
.
Usage
RegFitObj(Beta = NULL, SV = NULL, Kernel = NULL, OptMeth = NULL, b0 = NULL)
Arguments
Beta |
[ |
SV |
[ |
Kernel |
[ |
OptMeth |
[ |
b0 |
[ |
Value
[RegFitObj
(1)]
object of class RegFitObj
containing elements:
survivalsvm (ranking approach)
Description
Constructs object of class VB1FitObj
.
Usage
VB1FitObj(
Alpha = NULL,
Xtrain = NULL,
DifMat = NULL,
Kernel = NULL,
OptMeth = NULL
)
Arguments
Alpha |
[ |
Xtrain |
[ |
DifMat |
[ |
Kernel |
[ |
OptMeth |
[ |
Value
[VB1FitObj
]
Object of class RegFitObj
containing elements:
Alpha | solution of the quadratic optimization problem, |
Xtrain | matrix of training data points, |
DifMat | matrix used to maked differences between neighbor points, |
Kernel | kernel matrix, an object of class Kernel , |
OptMeth | program used to solve the quadratic optimization problem. |
survivalsvm (ranking approach)
Description
Constructs object of class VB2FitObj
.
Usage
VB2FitObj(
Alpha = NULL,
Xtrain = NULL,
DifMat = NULL,
Kernel = NULL,
OptMeth = NULL
)
Arguments
Alpha |
[ |
Xtrain |
[ |
DifMat |
[ |
Kernel |
[ |
OptMeth |
[ |
Value
VB2FitObj
Object of class RegFitObj
containing elements:
Alpha | solution of the quadratic optimization problem, |
Xtrain | matrix of training points, |
DifMat | matrix used to maked differences between neighbor points, |
Kernel | kernel matrix, an object of class Kernel , |
OptMeth | program used to solve the quadratic optimization problem. |
cindex
Description
computes the concordance index.
Usage
conindex(obj, Y)
Arguments
obj |
[ |
Y |
[ |
Value
[Integer
]
Concordance index.
VB1FitObj
(ranking approach)
Description
Creator of the generic accessor getAlpha
.
Usage
getAlpha(vb1o)
Arguments
vb1o |
[ |
Author(s)
Cesaire J. K. Fouodo
VB1FitObj
(ranking approach)
Description
Creator of the generic accessor Beta
.
Usage
## S3 method for class 'VB1FitObj'
getAlpha(vb1o)
Arguments
vb1o |
[ |
Value
[vector(1)
]
Alpha field of the object of class VB1FitObj
taken in the argument.
Author(s)
Cesaire J. K. Fouodo
VB1FitObj
(ranking approach)
Description
Accessor for the field Alpha
for the object taken in an argument.
Usage
## Default S3 method:
getAlpha(vb1o)
Arguments
vb1o |
[ |
Value
NULL
.
Author(s)
Cesaire J. K. Fouodo
RegFitObj
(regression approach)
Description
Creator of the generic accessor getBeta
.
Usage
getBeta(rfo)
Arguments
rfo |
[ |
Author(s)
Cesaire J. K. Fouodo
Hybrid
(hybrid approach)
Description
Creator of the generic accessor Beta
.
Usage
## S3 method for class 'HybridObj'
getBeta(rfo)
Arguments
rfo |
[ |
Value
[vector(1)
]
Beta field of the object of class Hybrid
taken in the argument.
Author(s)
Cesaire J. K. Fouodo
RegFitObj
Description
Creator of the generic accessor Beta
.
Usage
## S3 method for class 'RegFitObj'
getBeta(rfo)
Arguments
rfo |
[ |
Value
[vector(1)
]
Beta field of the object of class RegFitObj
taken in the argument.
Author(s)
Cesaire J. K. Fouodo
Class RegFitObj
(regression approach)
Description
Accessor for the field Beta
for the object taken in an argument.
Usage
## Default S3 method:
getBeta(rfo)
Arguments
rfo |
[ |
Value
NULL
.
Author(s)
Cesaire J. K. Fouodo
Hybrid
(hybrid approach)
Description
Creator of the generic accessor getBetastar
.
Usage
getBetastar(hybo)
Arguments
hybo |
[ |
Author(s)
Cesaire J. K. Fouodo
Hybrid
(hybrid approach)
Description
Creator of the generic accessor Betastar
.
Usage
## S3 method for class 'HybridObj'
getBetastar(hybo)
Arguments
hybo |
[ |
Value
[vector(1)
]
Betastar field of the object of class Hybrid
taken in the argument.
Author(s)
Cesaire J. K. Fouodo
Hybrid
(hybrid approach)
Description
Accessor for the field Betastar
for the object taken in an argument.
Usage
## Default S3 method:
getBetastar(hybo)
Arguments
hybo |
[ |
Value
NULL
.
Author(s)
Cesaire J. K. Fouodo
Kernel
Description
Accessor for the field Bincat
for the object taken in the argument.
Usage
getBinca.default(kern)
Arguments
kern |
[ |
Value
NULL
.
Author(s)
Cesaire J. K. Fouodo
Kernel
Description
Creator of the generic accessor getBincat
.
Usage
getBincat(kern)
Arguments
kern |
[ |
Author(s)
Cesaire J. K. Fouodo
Kernel
Description
Accessor for the field Bincat
of the object of class Kernel
taken in an argument.
Usage
## S3 method for class 'Kernel'
getBincat(kern)
Arguments
kern |
[ |
Value
Index of binary/categorical variables.
Author(s)
Cesaire J. K. Fouodo
Hybrid
(hybrid approach)
Description
Creator of the generic accessor getDelta
.
Usage
getDelta(hybo)
Arguments
hybo |
[ |
Author(s)
Cesaire J. K. Fouodo
Hybrid
(hybrid approach)
Description
Creator of the generic accessor Delta
.
Usage
## S3 method for class 'HybridObj'
getDelta(hybo)
Arguments
hybo |
[ |
Value
[vector(1)
]
Delta field of the object of class Hybrid
taken in the argument.
Author(s)
Cesaire J. K. Fouodo
Hybrid
(hybrid approach)
Description
Accessor for the field Delta
for the object taken in an argument.
Usage
## Default S3 method:
getDelta(hybo)
Arguments
hybo |
[ |
Value
NULL
.
Author(s)
Cesaire J. K. Fouodo
VB1FitObj
(ranking approach)
Description
Creator of the generic accessor getDifMat
.
Usage
getDifMat(vb1o)
Arguments
vb1o |
[ |
Author(s)
Cesaire J. K. Fouodo
VB1FitObj
(ranking approach)
Description
access to the matrix in the DifMat
field.
Usage
## S3 method for class 'VB1FitObj'
getDifMat(vb1o)
Arguments
vb1o |
[ |
Value
DifMat [Diffmatrix(1)
]
field of the object of class VB1FitObj
taken in the argument.
Author(s)
Cesaire J. K. Fouodo
VB1FitObj
(ranking approach)
Description
Accessor for the field DifMat
for the object taken in an argument.
Usage
## Default S3 method:
getDifMat(vb1o)
Arguments
vb1o |
[ |
Value
NULL
.
Author(s)
Cesaire J. K. Fouodo
RegFitObj
(regression approach)
Description
Creator of the generic accessor getKernel
.
Usage
getKernel(rfo)
Arguments
rfo |
[ |
Author(s)
Cesaire J. K. Fouodo
RegFitObj
Description
Creator of the generic accessor Kernel
.
Usage
## S3 method for class 'RegFitObj'
getKernel(rfo)
Arguments
rfo |
[ |
Value
[Kernel
]
kernel.
Author(s)
Cesaire J. K. Fouodo
VB1FitObj
(ranking approach)
Description
access the object of class Kernel
in the Kernel
field.
Usage
## S3 method for class 'VB1FitObj'
getKernel(rfo)
Arguments
rfo |
[ |
Value
Kernel [Kernel(1)
]
Field of the object of class VB1FitObj
taken in the argument.
Author(s)
Cesaire J. K. Fouodo
RegFitObj
Description
Accessor for the field Kernel
for the object taken in an argument.
Usage
## Default S3 method:
getKernel(rfo)
Arguments
rfo |
[ |
Value
NULL
.
Author(s)
Cesaire J. K. Fouodo
Kernel
Description
Creator of the generic accessor getKernpar
.
Usage
getKernpar(kern)
Arguments
kern |
[ |
Author(s)
Cesaire J. K. Fouodo
Kernel
Description
Accessor for the field Kernpar
of the object of class Kernel
taken in an argument.
Usage
## S3 method for class 'Kernel'
getKernpar(kern)
Arguments
kern |
[ |
Value
[vector(1)
]
The kernel parameters.
Author(s)
Cesaire J. K. Fouodo
Kernel
Description
Accessor for the field Kernpar
for the object taken in an argument.
Usage
## Default S3 method:
getKernpar(kern)
Arguments
kern |
[ |
Value
NULL
.
Author(s)
Cesaire J. K. Fouodo
getLogrank
Description
computes the logrank statistic.
Usage
getLogrank(obj, t, delta)
Arguments
obj |
[ |
t |
[ |
delta |
[ |
Value
list of:
chi_sq | chi-squared statistic and |
chi_p | chi-squared probality. |
Kernel
Description
Creator of the generic accessor getMat
.
Usage
getMat(obj)
Arguments
obj |
[ |
Author(s)
Cesaire J. K. Fouodo
Diffmatrix
.
Description
To get the matrix used to perform differences between comparable data points for object of class Diffmatrix.
Usage
## S3 method for class 'Diffmatrix'
getMat(obj)
Arguments
obj |
[ |
Value
The matrix used to perform differences between comparable data points.
Kernel
Description
Accessor for the field Mat
of the object of class Kernel
taken in an argument.
Usage
## S3 method for class 'Kernel'
getMat(obj)
Arguments
obj |
[ |
Value
[matrix(1)
]
The kernel matrix.
Author(s)
Cesaire J. K. Fouodo
Kernel
Description
Accessor for the field Mat
for the object taken in an argument.
Usage
## Default S3 method:
getMat(obj)
Arguments
obj |
[ |
Value
NULL
.
Author(s)
Cesaire J. K. Fouodo
RegFitObj
(regression approach)
Description
Creator of the generic accessor getOptMeth
.
Usage
getOptMeth(rfo)
Arguments
rfo |
[ |
Author(s)
Cesaire J. K. Fouodo
Class RegFitObj
(regression approach)
Description
Creator of the generic accessor OptMeth
.
Usage
## S3 method for class 'RegFitObj'
getOptMeth(rfo)
Arguments
rfo |
[ |
Value
[character(1)] the named of the optimization program.
Author(s)
Cesaire J. K. Fouodo
VB1FitObj
(ranking approach)
Description
access to the method in OptMeth
field.
Usage
## S3 method for class 'VB1FitObj'
getOptMeth(rfo)
Arguments
rfo |
[ |
Value
[character(1)
]
OptMeth field of the object of class VB1FitObj
taken in the argument.
Author(s)
Cesaire J. K. Fouodo
RegFitObj
Description
Accessor for the field OptMeth
for the object taken in an argument.
Usage
## Default S3 method:
getOptMeth(rfo)
Arguments
rfo |
[ |
Value
NULL
.
Author(s)
Cesaire J. K. Fouodo
RegFitObj
(regression approach)
Description
Creator of the generic accessor getSV
.
Usage
getSV(rfo)
Arguments
rfo |
[ |
Author(s)
Cesaire J. K. Fouodo
RegFitObj
Description
Creator of the generic accessor SV
.
Usage
## S3 method for class 'RegFitObj'
getSV(rfo)
Arguments
rfo |
[ |
Value
[matrix
]
the matrix of support vectors.
Author(s)
Cesaire J. K. Fouodo
Class RegFitObj
(regression approach)
Description
Accessor for the field SV
for the object taken in an argument.
Usage
## Default S3 method:
getSV(rfo)
Arguments
rfo |
[ |
Value
NULL
.
Author(s)
Cesaire J. K. Fouodo
Get the type of current object.
Description
Creator of the generic accessor getType
.
Usage
getType(obj)
Arguments
obj |
[ |
Author(s)
Cesaire J. K. Fouodo
Diffmatrix
.
Description
Mutator for objects of class Diffmatrix
.
Usage
## S3 method for class 'Diffmatrix'
getType(obj)
Arguments
obj |
[ |
Value
[character(1)
]
Type of Diffmatrix
Kernel
Description
Accessor for the field Type
of the object of class Kernel
taken in an argument.
Usage
## S3 method for class 'Kernel'
getType(obj)
Arguments
obj |
[ |
Value
Type of the kernel taken in the argument.
Author(s)
Cesaire J. K. Fouodo
Default method of getType.
Description
Accessor for the field Type
for the object taken in the argument.
Usage
## Default S3 method:
getType(obj)
Arguments
obj |
[ |
Value
NULL
.
Author(s)
Cesaire J. K. Fouodo
VB1FitObj
(ranking approach)
Description
Creator of the generic accessor getXtrain
.
Usage
getXtrain(vb1o)
Arguments
vb1o |
[ |
Author(s)
Cesaire J. K. Fouodo
VB1FitObj
(ranking approach)
Description
#' access to the train matrix of the Xtrain
field.
Usage
## S3 method for class 'VB1FitObj'
getXtrain(vb1o)
Arguments
vb1o |
[ |
Value
Xtrain [matrix(1)
]
Field of the object of class VB1FitObj
taken in the argument.
Author(s)
Cesaire J. K. Fouodo
VB1FitObj
(ranking approach)
Description
Accessor for the field Xtrain
for the object taken in an argument.
Usage
## Default S3 method:
getXtrain(vb1o)
Arguments
vb1o |
[ |
Value
NULL
.
Author(s)
Cesaire J. K. Fouodo
RegFitObj
(regression approach)
Description
Creator of the generic accessor getb0
.
Usage
getb0(rfo)
Arguments
rfo |
[ |
Author(s)
Cesaire J. K. Fouodo
Class RegFitObj
(regression approach)
Description
Creator of the generic accessor b0
.
Usage
## S3 method for class 'RegFitObj'
getb0(rfo)
Arguments
rfo |
[ |
Value
[numeric(1)
]
the offset
Author(s)
Cesaire J. K. Fouodo
survivalsvm (hybrid approach)
Description
fits survivalsvm model based on hybrid approach method for survival support vector ananlysis.
Usage
hybridFit(
X,
Y,
delta,
meth_par = c(1, 1),
kernel_type = "lin_kernel",
kernel_pars = NA,
bin_cat = integer(0),
makediff = makediff3,
opt_alg = "quadprog",
sgf_sv = 5,
sigf = 7,
maxiter = 40,
margin = 0.05,
bound = 10,
eig.tol = 1e-06,
conv.tol = 1e-07,
posd.tol = 1e-08
)
Arguments
X |
[ |
Y |
[ |
delta |
[ |
meth_par |
[ |
kernel_type |
[ |
kernel_pars |
[ |
bin_cat |
[ |
makediff |
[ |
opt_alg |
[ |
sgf_sv |
[ |
sigf |
|
maxiter |
|
margin |
|
bound |
|
eig.tol |
[ |
conv.tol |
[ |
posd.tol |
[ |
Value
[Hybrid(1)
]
Object of class Hybrid
containing elements:
Alpha | Solution of the quadratic optimization problem, |
Xtrain | Matrix of training points, |
DifMat | Matrix used to maked differences between neighbor points, |
Kernel | Kernel matrix, an object of class Kernel , |
OptMeth | Program used to solve the quadratic optimization problem. |
Author(s)
Cesaire J. K. Fouodo
Kernel
Description
computes the kernel matrix for elements taken in an argument.
Usage
kernelMatrix(
Xtrain,
kernel_type = "lin_kernel",
kernel_pars,
Xt = NULL,
bin_cat = integer(0)
)
Arguments
Xtrain |
[ |
kernel_type |
[ |
kernel_pars |
[ |
Xt |
[ |
bin_cat |
indexes of binary/categorical variables. |
Details
Kernel
Value
[Kernel(1)
]
Object of class Kernel, with elements:
Type | type of kernel, |
Mat | matrix used to compute differences between comparable data points. |
Author(s)
Cesaire J. K. Fouodo
compute the Logrank
Description
compute the Logrank
Usage
logrank(t1, d1, t2, d2)
Arguments
t1 |
[ |
d1 |
[ |
t2 |
[numeric(1)] |
d2 |
[ |
Value
list of:
chi_sq | chi-squared statistic at a significance level of 95 % and one degree of freedom, |
chi_p | chi-squared probality at a significance level of 95 % and one degree of freedom. |
Diffmatrix
Description
The data points are asssumed to be sorted by survival time. The comparison only takes place between two consecutivee observations when the first one is not censored (delta = 1).
Usage
makediff1(Y, delta)
Arguments
Y |
[ |
delta |
[ |
Value
[Diffmatrix(1)
]
Object of class Diffmatrix
with elements:
Type | type of makediff function used to compute differences between neighbours. |
Mat | matrix used to compute differences between comparable data points. |
See Also
Examples
Y <- c(1,3,3.5,4,8); delta <- c(0,0,1,1,0); makediff1(Y, delta)
Diffmatrix
Description
computes the matrix difference only between not censored data points (delta = 1). The data points are asssumed to be sorted by survival time and the difference is computed only if both the comparable data points are not censored.
Usage
makediff2(Y, delta)
Arguments
Y |
[ |
delta |
[ |
Value
[Diffmatrix(1)
]
Object of class Diffmatrix
with elements:
Type | type of makediff function used to compute differences between neighbours. |
Mat | matrix used to compute differences between comparable data points. |
See Also
Examples
Y <- c(1,3,3.5,4,8); delta <- c(0,0,1,1,0); makediff2(Y, delta)
Diffmatrix
Description
The first observation is assumed to be not censored (delta = 1).
The Difference is computed between data point i
and its neighbour that has the largest survival time but smaller than y_i
, the survival time of i
.
Usage
makediff3(Y, delta)
Arguments
Y |
[ |
delta |
[ |
Value
[Diffmatrix(1)
]
Object of class Diffmatrix
with elements:
Type | type of makediff function used to compute differences between neighbours. |
Mat | matrix used to compute differences between comparable data points. |
See Also
Examples
Y <- c(1,3,3.5,4,8); delta <- c(0,0,1,1,0); makediff3(Y, delta)
Suvirvalsvm predictions
Description
Predictions of objects of class survivalsvm
.
Usage
## S3 method for class 'survivalsvm'
predict(object, newdata, subset = NULL, ...)
Arguments
object |
[ |
newdata |
[ |
subset |
[ |
... |
[ |
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
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)
Survivalsvm predictions
Description
Maker of predictions based on model fitted using the hybrid approach of survival support vector machines.
Usage
predictHybrid(object, X_pred)
Arguments
object |
[ |
X_pred |
[ |
Value
object of class survivalsvmprediction, with elements:
typeofsurvivalsvm | type of the survivalsvm object that is fitted in model, |
typeofkernel | type of kernel used to fit the model, |
parameterofkernel | parameters of kernel used to fit the model, |
opt.meth | program used to fit the model, |
predicted | values predicted. |
Author(s)
Cesaire J. K. Fouodo
Survivalsvm predictions
Description
Predictions based on model fitted using the regression approach of survival support vector machines.
Usage
predictRegFitObj(object, X_pred)
Arguments
object |
[ |
X_pred |
[ |
Value
[survivalsvmprediction
(1)]
object of class survivalsvmprediction, with elements:
typeofsurvivalsvm | type of the survivalsvm object that is fitted in model, |
typeofkernel | type of kernel used to fit the model, |
parameterofkernel | parameters of kernel that used to fit the model, |
opt.meth | program used to fit the model, |
predicted | values predicted. |
Author(s)
Cesaire J. K. Fouodo
Survivalsvm predictions
Description
Predictions based on model fitted using the ranking approach of survival support vector machines.
Usage
predictVB1FitObj(object, X_pred)
Arguments
object |
[ |
X_pred |
[ |
Value
object of class survivalsvmprediction, with elements:
typeofsurvivalsvm | type of the survivalsvm object that is fitted in model, |
typeofkernel | type of kernel used to fit the model, |
parameterofkernel | parameters of kernel that used to fit the model, |
opt.meth | program used to fit the model, |
predicted | values predicted. |
Author(s)
Cesaire J. K. Fouodo
Survivalsvm predictions
Description
Predictions based on model fitted using the ranking approach of survival support vector machines.
Usage
predictVB2FitObj(object, X_pred)
Arguments
object |
[ |
X_pred |
[ |
Value
object of class survivalsvmprediction, with elements:
typeofsurvivalsvm | Type of the survivalsvm object that is fitted in model, |
typeofkernel | type of kernel used to fit the model, |
parameterofkernel | parameters of kernel that used to fit the model, |
opt.meth | program used to fit the model, |
predicted | values predicted. |
print survivalsvm
Description
Prints object of class survivalsvm
.
Usage
## S3 method for class 'survivalsvm'
print(x, ...)
Arguments
x |
[ |
... |
[ |
Author(s)
Cesaire J. K. Fouodo
print survivalsvm
Description
Print objects of class survivalsvm
.
Usage
## S3 method for class 'survivalsvmprediction'
print(x, ...)
Arguments
x |
[ |
... |
[ |
Author(s)
Cesaire J. K. Fouodo
print survivalsvm
Description
Print of object of class Hybrid
. Hybrid
is the class of models fitted using the hybrid approach of survival support vector machines.
Usage
printHybrid(object, ...)
Arguments
object |
[ |
... |
[ |
Author(s)
Cesaire J. K. Fouodo
print survivalsvm
Description
Print of object of class RegFitObj
. RegFitObj
is the class of models fitted using the regression approach of survival support vector machines.
Usage
printRegFitObj(object, ...)
Arguments
object |
[ |
... |
[ |
Author(s)
Cesaire J. K. Fouodo
print survivalsvm
Description
Print of object of class RegFitObj
. VB1FitObj
is the class of models fitted using the ranking approach of survival support vector machines.
Usage
printVB1FitObj(object, ...)
Arguments
object |
[ |
... |
[ |
Author(s)
Cesaire J. K. Fouodo
print survivalsvm
Description
Print of object of class RegFitObj
. VB1FitObj
is the class of models fitted using the ranking approach of survival support vector machines.
Usage
printVB2FitObj(object, ...)
Arguments
object |
[ |
... |
[ |
Author(s)
Cesaire J. K. Fouodo
survivalsvm (regression approach)
Description
The function regFit
fits a survivalsvm
model based on the regression approach.
Usage
regFit(
X,
Y,
delta,
meth_par = 1,
kernel_type = "lin_kernel",
kernel_pars = NA,
bin_cat = integer(0),
opt_alg = "quadprog",
sgf_sv = 5,
sigf = 7,
maxiter = 20,
margin = 0.05,
bound = 10,
eig.tol = 1e-06,
conv.tol = 1e-07,
posd.tol = 1e-08
)
Arguments
X |
[ |
Y |
[ |
delta |
[ |
meth_par |
[ |
kernel_type |
[ |
kernel_pars |
[ |
bin_cat |
[ |
opt_alg |
[ |
sgf_sv |
[ |
sigf |
[ |
maxiter |
[ |
margin |
[ |
bound |
[ |
eig.tol |
[ |
conv.tol |
[ |
posd.tol |
[ |
Value
[RegFitObj(1)
]
object of class RegFitObj
containing elements:
Beta | solution of the quadratic optimization problem, |
SV | support vector machines, |
Kernel | kernel matrix, an object of class Kernel , |
b0 | estimated offset, |
OptMeth | program used to solve the quadratic optimization problem. |
Author(s)
Cesaire J. K. Fouodo
VB1FitObj
(ranking approach)
Description
Creator of the generic mutator setAlpha
.
Usage
setAlpha(vb1o, alpha)
Arguments
vb1o |
[ |
alpha |
[ |
Author(s)
Cesaire J. K. Fouodo
VB1FitObj
(ranking approach)
Description
Default mutator of the field Alpha
of the object taken in an argument.
Usage
## S3 method for class 'VB1FitObj'
setAlpha(vb1o, alpha)
Arguments
vb1o |
[ |
alpha |
[ |
Value
modified version of the object taken in an argument.
VB1FitObj
(ranking approach)
Description
Default mutator of the field Alpha
of the object taken in an argument.
Usage
## Default S3 method:
setAlpha(vb1o, alpha)
Arguments
vb1o |
[ |
alpha |
[ |
Value
[VB1FitObj
]
The object taken in the argument.
Author(s)
Cesaire J. K. Fouodo
Class RegFitObj
(regression approach)
Description
Creator of the generic mutator setBeta
.
Usage
setBeta(rfo, beta)
Arguments
rfo |
[ |
beta |
[ |
Author(s)
Cesaire J. K. Fouodo
Hybrid
(hybrid approach)
Description
Default mutator of the field Beta
of the object taken in an argument.
Usage
## S3 method for class 'HybridObj'
setBeta(rfo, beta)
Arguments
rfo |
[ |
beta |
[ |
Value
[Hybrid(1)
]
Modified version of the object taken in the argument.
RegFitObj
Description
Default mutator of the field Beta
of the object taken in an argument.
Usage
## S3 method for class 'RegFitObj'
setBeta(rfo, beta)
Arguments
rfo |
[ |
beta |
[ |
Value
[RegFitObj
(1)]
modified version of the object taken in the argument.
RegFitObj
(regression approach)
Description
Default mutator of the field Beta
of the object taken in an argument.
Usage
## Default S3 method:
setBeta(rfo, beta)
Arguments
rfo |
[ |
beta |
[ |
Value
the object taken in an argument.
Author(s)
Cesaire J. K. Fouodo
Hybrid
(hybrid approach)
Description
Creator of the generic mutator setBetastar
.
Usage
setBetastar(hybo, betastar)
Arguments
hybo |
[ |
betastar |
[ |
Author(s)
Cesaire J. K. Fouodo
Hybrid
(hybrid approach)
Description
Default mutator of the field Betastar
of the object taken in an argument.
Usage
## S3 method for class 'HybridObj'
setBetastar(hybo, betastar)
Arguments
hybo |
[ |
betastar |
[ |
Value
[Hybrid(1)
]
Modified version of the object taken in the argument.
Hybrid
(hybrid approach)
Description
Default mutator of the field Beta
of the object taken in an argument.
Usage
## Default S3 method:
setBetastar(hybo, betastar)
Arguments
hybo |
[ |
betastar |
[ |
Value
[Hybrid(1)
]
The object taken in the argument.
Author(s)
Cesaire J. K. Fouodo
Kernel
Description
Default mutator of the field bincat
of the object taken in an argument.
Usage
setBincat(kern, bincat)
Arguments
kern |
[ |
bincat |
[ |
Value
The object taken in the argument.
Author(s)
Cesaire J. K. Fouodo
Kernel
Description
Mutator of the field bincat
of the object of class Kernel
taken in an argument.
Usage
## S3 method for class 'Kernel'
setBincat(kern, bincat)
Arguments
kern |
[ |
bincat |
[ |
Value
[Kernel(1)
]
Object of class Kernel
with elements:
Type | type of kernel, |
Mat | kernel matrix, |
Kernpar | parameters of kernel, when required, |
bincat | index of binary/categorical variables, when required. |
Author(s)
Cesaire J. K. Fouodo
Kernel
Description
Default mutator of the field bincat
of the object taken in an argument.
Usage
## Default S3 method:
setBincat(kern, bincat)
Arguments
kern |
[ |
bincat |
[ |
Value
The object taken in the argument.
Author(s)
Cesaire J. K. Fouodo
Hybrid
(hybrid approach)
Description
Creator of the generic mutator setDelta
.
Usage
setDelta(hybo, delta)
Arguments
hybo |
[ |
delta |
[ |
Author(s)
Cesaire J. K. Fouodo
Creator of generic setor setDelta
Description
Creator of generic setor setDelta
Usage
## S3 method for class 'HybridObj'
setDelta(hybo, delta)
Arguments
hybo |
[ |
delta |
[ |
Value
[Hybrid(1)
]
Modified version of the object taken in the argument.
Hybrid
(hybrid approach)
Description
Default mutator of the field delta
of the object taken in an argument.
Usage
## Default S3 method:
setDelta(hybo, delta)
Arguments
hybo |
[ |
delta |
[ |
Value
[Hybrid(1)
]
The object taken in the argument.
Author(s)
Cesaire J. K. Fouodo
VB1FitObj
(ranking approach)
Description
Creator of the generic mutator setDifMat
.
Usage
setDifMat(vb1o, dm)
Arguments
vb1o |
[ |
dm |
[ |
Author(s)
Cesaire J. K. Fouodo
VB1FitObj
(ranking approach)
Description
Default mutator of the field DifMat
of the object taken in an argument.
Usage
## S3 method for class 'VB1FitObj'
setDifMat(vb1o, dm)
Arguments
vb1o |
[ |
dm |
[ |
Value
Modified version of the object taken in argument.
VB1FitObj
(ranking approach)
Description
Default mutator of the field DifMat
of the object taken in an argument.
Usage
## Default S3 method:
setDifMat(vb1o, dm)
Arguments
vb1o |
[ |
dm |
[ |
Value
[VB1FitObj
]
The object taken in the argument.
Author(s)
Cesaire J. K. Fouodo
Class RegFitObj
(regression approach)
Description
Creator of the generic mutator setKernel
.
Usage
setKernel(rfo, kernel)
Arguments
rfo |
[ |
kernel |
[ |
Author(s)
Cesaire J. K. Fouodo
RegFitObj
Description
Default mutator of the field Kernel
of the object taken in an argument.
Usage
## S3 method for class 'RegFitObj'
setKernel(rfo, kernel)
Arguments
rfo |
[ |
kernel |
[ |
Value
[RegFitObj
(1)]
modified version of the object taken in the argument.
VB1FitObj
(ranking approach)
Description
Default mutator of the field Kernel
of the object taken in an argument.
Usage
## S3 method for class 'VB1FitObj'
setKernel(rfo, kernel)
Arguments
rfo |
[ |
kernel |
[ |
Value
[VB1FitObj
]
Modified version of the object taken in the argument.
RegFitObj
(regression approach)
Description
setKernel.default
Usage
## Default S3 method:
setKernel(rfo, kernel)
Arguments
rfo |
[ |
kernel |
[ |
Value
[RegFitObj
(1)]
modified object.
Kernel
Description
Default mutator of the field Kernpar
of the object taken in an argument.
Usage
setKernpar(kern, kernpar)
Arguments
kern |
[ |
kernpar |
[ |
Author(s)
Cesaire J. K. Fouodo
Kernel
Description
Mutator of the field Kernpar
of the object of class Kernel
taken in an argument.
Usage
## S3 method for class 'Kernel'
setKernpar(kern, kernpar)
Arguments
kern |
[ |
kernpar |
[ |
Value
[Kernel(1)
]
Object of class Kernel
with elements:
Type | Type of kernel, |
Mat | Kernel matrix, |
Kernpar | Parameters of kernel, when required, |
bincat | Index of binary/categorical variables, when required, |
Author(s)
Cesaire J. K. Fouodo
Kernel
Description
Default mutator of the field Kernpar
of the object taken in an argument.
Usage
## Default S3 method:
setKernpar(kern, kernpar)
Arguments
kern |
[ |
kernpar |
[ |
Value
The object taken in the argument.
Author(s)
Cesaire J. K. Fouodo
Kernel
Description
Creator of generic mutator setMat
.
Usage
setMat(obj, mat)
Arguments
obj |
[ |
mat |
[ |
Author(s)
Cesaire J. K. Fouodo
Diffmatrix
.
Description
Mutator for the field Mat
of objects of class Diffmatrix
.
Usage
## S3 method for class 'Diffmatrix'
setMat(obj, mat)
Arguments
obj |
[ |
mat |
[ |
Value
[Diffmatrix(1)
]
Mutated object of class Diffmatrix
containing elements:
Author(s)
Cesaire J. K. Fouodo
Kernel
Description
Mutator of the field Mat
of the object of class Kernel
taken in an argument.
Usage
## S3 method for class 'Kernel'
setMat(obj, mat)
Arguments
obj |
[ |
mat |
[ |
Value
[Kernel(1)
]
Object of class Kernel
with elements:
Type | type of kernel, |
Mat | kernel matrix, |
Kernpar | parameters of kernel, when required, |
bincat | index of binary/categorical variables, when required. |
Author(s)
Cesaire J. K. Fouodo
Kernel
Description
Mutator of the field Mat
of the object taken in an argument.
Usage
setMatrix.default(obj, mat)
Arguments
obj |
[ |
mat |
[ |
Value
The object taken in the argument.
Author(s)
Cesaire J. K. Fouodo
RegFitObj
(regression approach)
Description
Creator of the generic mutator setOptMeth
.
Usage
setOptMeth(rfo, optmeth)
Arguments
rfo |
[ |
optmeth |
[ |
Author(s)
Cesaire J. K. Fouodo
RegFitObj
Description
Default mutator of the field OptMeth
of the object taken in an argument.
Usage
## S3 method for class 'RegFitObj'
setOptMeth(rfo, optmeth)
Arguments
rfo |
[ |
optmeth |
[ |
Value
[RegFitObj
(1)]
modified version of the object taken in the argument.
VB1FitObj
(ranking approach)
Description
Default mutator of the field OptMeth
of the object taken in an argument.
Usage
## S3 method for class 'VB1FitObj'
setOptMeth(rfo, optmeth)
Arguments
rfo |
[ |
optmeth |
[ |
Value
[VB1FitObj
]
Modified version of the object taken in the argument.
Class RegFitObj
(regression approach)
Description
Default mutator of the field OptMeth
of the object taken in an argument.
Usage
## Default S3 method:
setOptMeth(rfo, optmeth)
Arguments
rfo |
[ |
optmeth |
[ |
Value
[RegFitObj
(1)]
the object taken in the argument.
Author(s)
Cesaire J. K. Fouodo
Class RegFitObj
(regression approach)
Description
Creator of the generic mutator setSV
.
Usage
setSV(rfo, sv)
Arguments
rfo |
[ |
sv |
[ |
Author(s)
Cesaire J. K. Fouodo
RegFitObj
Description
Default mutator of the field SV
of the object taken in an argument.
Usage
## S3 method for class 'RegFitObj'
setSV(rfo, sv)
Arguments
rfo |
[ |
sv |
[ |
Value
[RegFitObj
(1)]
modified version of the object taken in the argument.
RegFitObj
(regression approach)
Description
Default mutator of the field SV
of the object taken in an argument.
Usage
## Default S3 method:
setSV(rfo, sv)
Arguments
rfo |
[ |
sv |
[ |
Value
[RegFitObj
(1)]
the object taken in the argument.
Author(s)
Cesaire J. K. Fouodo
Class Kernel
Description
Creator of the generic mutator setType
.
Usage
setType(obj, type)
Arguments
obj |
[ |
type |
[ |
Author(s)
Cesaire J. K. Fouodo
Diffmatrix
Description
Mutator for the type of objects of class Diffmatrix
Usage
## S3 method for class 'Diffmatrix'
setType(obj, type)
Arguments
obj |
[ |
type |
[ |
Value
[Diffmatrix(1)
]
Mutated object of class Diffmatrix
containing elements.
Kernel
Description
Mutator of the field Type
of the object of class Kernel
taken in an argument.
Usage
## S3 method for class 'Kernel'
setType(obj, type)
Arguments
obj |
[ |
type |
[ |
Value
Object of class Kernel
with elements:
Author(s)
Cesaire J. K. Fouodo
Class Kernel
Description
Mutator of the field Type
of the object taken in an argument.
Usage
## Default S3 method:
setType(obj, type)
Arguments
obj |
[ |
type |
[ |
Value
Object taken in the argument.
Author(s)
Cesaire J. K. Fouodo
VB1FitObj
(ranking approach)
Description
Creator of the generic mutator setXtrain
.
Usage
setXtrain(vb1o, sv)
Arguments
vb1o |
[ |
sv |
[ |
Author(s)
Cesaire J. K. Fouodo
VB1FitObj
(ranking approach)
Description
Default mutator of the field Xtrain
of the object taken in an argument.
Usage
## S3 method for class 'VB1FitObj'
setXtrain(vb1o, sv)
Arguments
vb1o |
[ |
sv |
new value |
Value
[VB1FitObj
]
Modified version of the object taken in argument.
VB1FitObj
(ranking approach)
Description
Default mutator of the field Xtrain
of the object taken in an argument.
Usage
## Default S3 method:
setXtrain(vb1o, sv)
Arguments
vb1o |
[ |
sv |
[ |
Value
[VB1FitObj
]
The object taken in the argument.
Author(s)
Cesaire J. K. Fouodo
Class RegFitObj
(regression approach)
Description
Creator of the generic mutator setb0
.
Usage
setb0(rfo, b0)
Arguments
rfo |
[ |
b0 |
[ |
Author(s)
Cesaire J. K. Fouodo
RegFitObj
Description
Default mutator of the field b0
of the object taken in an argument.
Usage
## S3 method for class 'RegFitObj'
setb0(rfo, b0)
Arguments
rfo |
[ |
b0 |
[ |
Value
[RegFitObj
(1)]
modified version of the object taken in the argument.
Class RegFitObj
(regression approach)
Description
Default mutator of the field b0
of the object taken in an argument.
Usage
## Default S3 method:
setb0(rfo, b0)
Arguments
rfo |
[ |
b0 |
[ |
Value
[RegFitObj
(1)]
the object taken in the argument.
Author(s)
Cesaire J. K. Fouodo
survivalsvm
Description
Performs support vectors analysis for data sets with survival outcome. Three approaches are available in the package: The regression approach takes censoring into account when formulating the inequality constraints of the support vector problem. In the ranking approach, the inequality constraints set the objective to maximize the concordance index for comparable pairs of observations. The hybrid approach combines the regression and ranking constraints in the same model.
Usage
survivalsvm(
formula = NULL,
data = NULL,
subset = NULL,
type = "regression",
diff.meth = NULL,
gamma.mu = NULL,
opt.meth = "quadprog",
kernel = "lin_kernel",
kernel.pars = NULL,
time.variable.name = NULL,
status.variable.name = NULL,
sgf.sv = 5,
sigf = 7,
maxiter = 20,
margin = 0.05,
bound = 10,
eig.tol = 1e-06,
conv.tol = 1e-07,
posd.tol = 1e-08
)
Arguments
formula |
[ |
data |
[ |
subset |
[ |
type |
[ |
diff.meth |
[ |
gamma.mu |
[ |
opt.meth |
[ |
kernel |
[ |
kernel.pars |
[ |
time.variable.name |
[ |
status.variable.name |
[ |
sgf.sv |
[ |
sigf |
|
maxiter |
|
margin |
|
bound |
|
eig.tol |
[ |
conv.tol |
[ |
posd.tol |
[ |
Details
The following denotations are used for the models implemented:
-
'regression'
referring to the regression approach, namedSVCR
in Van Belle et al. (2011b), -
'vanbelle1'
according to the first version of survival surpport vector machines based on ranking constraints, namedRANKSVMC
by Van Belle et al. (2011b), -
'vanbelle2'
according to the second version of survival surpport vector machines based on ranking constraints like presented inmodel1
by Van Belle et al. (2011b) and -
'hybrid'
combines simultaneously the regression and ranking constraints in the same model. Hybrid model is labeledmodel2
by Van Belle et al. (2011b).
The argument 'type'
of the function survivalsvm
is used to set the type of model to be fitted.
For the models vanbelle1
, vanbelle2
and hybrid
, differences between comparable
pairs of observations are required. Each observation is compared with its nearest neighbor according to the survival time, and the
three possible comparison approaches makediff1, makediff2 and makediff3 are offered to compute the
differences between comparable neighbors.
The current version of survivalsvm
uses the solvers ipop
and quadprog
to solve the dual
optimization problems deduced from the suport vector formulations of the models presented above. Notice that for using quadprog
the kernel matrix needs to be symmetric and positive definite. Therefore when the conditions are not met, the kernel matrix needs be slightly perturbed to obtain the nearest positive definite kernel matrix.
The alternative to quadprog
is ipop
, that can also handle a non-negative definite kernel matrix, however more time may be
required to solve the quadratic optimization dual problem. The argument opt.meth
is used to select the solver.
The survivalsvm
command can be called giving a formula, in which the survival time and the status are grouped into a
two colunm matrix using the command Surv
from the package survival
. An alternative is to pass the data
frame of training data points as an argument using data
, to mention the name of the survival time variable and
the name of the status variable as illustrated in the third example below.
Value
survivalsvm
Object of class survivalsvm
, with elements:
call | command calling this program, |
typeofsurvivalsvm | type of survival support vector machines approach, |
model.fit | the fitted survival model, |
var.names | names of variables used. |
Note
This implementation is in part inspired by the Matlab
toolbox Survlab
(A Survival Analysis Toolbox
).
Author(s)
Cesaire J. K. Fouodo
References
Van Belle, V., Pelcmans, K., Van Huffel S. and Suykens J. A.K. (2011a). Improved performance on high-dimensional survival data by application of Survival-SVM. Bioinformatics (Oxford, England) 27, 87-94.
Van Belle, V., Pelcmans, K., Van Huffel S. and Suykens J. A.K. (2011b). Support vector methods for survival analysis: a comparaison between ranking and regression approaches. Artificial Intelligence in medecine 53, 107-118.
See Also
Examples
survivalsvm(Surv(time, status) ~ ., veteran, gamma.mu = 0.1)
survsvm.reg <- survivalsvm(formula = Surv(diagtime, status) ~ ., data = veteran,
type = "regression", gamma.mu = 0.1,
opt.meth = "ipop", kernel = "add_kernel")
survsvm.vb2 <- survivalsvm(data = veteran, time.variable.name = "diagtime",
status.variable.name = "status",
type = "vanbelle2", gamma.mu = 0.1,
opt.meth = "quadprog", diff.meth = "makediff3",
kernel = "lin_kernel",
sgf.sv = 5, sigf = 7, maxiter = 20,
margin = 0.05, bound = 10)
survivalsvm (ranking approach)
Description
fits the 'vanbelle1' version of the ranking approach of survival support vector ananlysis.
Usage
vanbelle1Fit(
X,
Y,
delta,
meth_par = 1,
kernel_type = "lin_kernel",
kernel_pars = NA,
bin_cat = integer(0),
makediff = makediff3,
opt_alg = "quadprog",
sgf_sv = 5,
sigf = 7,
maxiter = 40,
margin = 0.05,
bound = 10,
eig.tol = 1e-06,
conv.tol = 1e-07,
posd.tol = 1e-08
)
Arguments
X |
[ |
Y |
[ |
delta |
[ |
meth_par |
[numeric(1)] |
kernel_type |
[ |
kernel_pars |
[ |
bin_cat |
[ |
makediff |
[ |
opt_alg |
[ |
sgf_sv |
[ |
sigf |
|
maxiter |
|
margin |
|
bound |
|
eig.tol |
[ |
conv.tol |
[ |
posd.tol |
[ |
Value
[VB1FitObj(1)
]
object of class VB1FitObj
containing elements:
Alpha | solution of the quadratic optimization problem, |
Xtrain | matrix of training data points, |
DifMat | matrix used to maked differences between neighbor points, |
Kernel | kernel matrix, an object of class Kernel , |
OptMeth | program used to solve the quadratic optimization problem. |
Author(s)
Cesaire J. K. Fouodo
survivalsvm (ranking approach)
Description
fits the 'vanbelle2' version of the ranking approach of survival support vector ananlysis.
Usage
vanbelle2Fit(
X,
Y,
delta,
meth_par = 1,
kernel_type = "lin_kernel",
kernel_pars = NA,
bin_cat = integer(0),
makediff = makediff3,
opt_alg = "quadprog",
sgf_sv = 5,
sigf = 7,
maxiter = 40,
margin = 0.05,
bound = 10,
eig.tol = 1e-06,
conv.tol = 1e-07,
posd.tol = 1e-08
)
Arguments
X |
[ |
Y |
[ |
delta |
[ |
meth_par |
[ |
kernel_type |
[ |
kernel_pars |
[ |
bin_cat |
[ |
makediff |
[ |
opt_alg |
[ |
sgf_sv |
[ |
sigf |
|
maxiter |
|
margin |
|
bound |
|
eig.tol |
[ |
conv.tol |
[ |
posd.tol |
[ |
Value
[VB2FitObj(1)
]
Object of class VB2FitObj
containing elements:
Alpha | solution of the quadratic optimization problem, |
Xtrain | matrix of training points, |
DifMat | matrix used to maked differences between neighbor points, |
Kernel | kernel matrix, an object of class Kernel , |
OptMeth | program used to solve the quadratic optimization problem. |
Author(s)
Cesaire J. K. Fouodo