The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

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

[character(1)]
Indicates which difference is performed. This must be one of makediff1, makediff2 other makediff3.

Mat

[matrix(1)]
Matrix used to perfom differences.

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

[vector(1)]
A part of the solution of the quadratic optimization problem of interest.

Beta

[vector(1)]
A part of the solution of the quadratic optimization problem of interest.

Betastar

[vector(1)]
A part of the solution of the quadratic optimization problem of interest.

Delta

[vector(1)]
Vector of status 1 = no censored.

Xtrain

[matrix(1)]
Matrix of training data points.

DifMat

[Diffmatrix(1)]
Matrix used to maked differences between neighbor points.

Kernel

[Kernel(1)]
Object of class Kernel.

OptMeth

[Kernel(1)]
Program used to solve the optimization problem.

b0

[numeric(1)]
The estimated offset.

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

[character]
Type of kernel. Must be chosen from the following strings: "lin_kernel", "add_kernel", "rbf_kernel", "rbf4_kernel" or "poly_kernel".

Mat

[matrix(1)]
Kernel matrix.

Kernpar

[vector(1)]
Kernel parameters, when required.

bincat

[vector(1)]
Index of binary/categorical variables.

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

[vector(1)]
solution of the quadratic optimization problem of interest

SV

[matrix(1)]
support vector machines.

Kernel

[Kernel(1)]
object of class Kernel.

OptMeth

[character(1)]
program used to solve the optimization problem.

b0

[numeric(1)]
the estimated offset.

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

[vector(1)]
Solution of the quadratic optimization problem of interest.

Xtrain

[matrix(1)]
Matrix of training data points.

DifMat

[Diffmatrix(1)]
Matrix used to maked differences between neighbor points.

Kernel

[Kernel(1)]
Object of class Kernel.

OptMeth

[character(1)]
Program used to solve the optimization problem.

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

[vector(1)]
Solution of the quadratic optimization problem of interest.

Xtrain

[matrix(1)]
Matrix of training data points.

DifMat

[Diffmatrix(1)]
Matrix used to maked differences between neighbor points.

Kernel

[Kernel(1)]
Object of class Kernel.

OptMeth

[character(1)]
Program used to solve the optimization problem.

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

[survivalsvmprediction]
Object of class survivalsvmprediction.

Y

[vector(1)]
A numeric vector of truth survival times obeserved.

Value

[Integer] Concordance index.


VB1FitObj (ranking approach)

Description

Creator of the generic accessor getAlpha.

Usage

getAlpha(vb1o)

Arguments

vb1o

[VB1FitObj]
Object taken in the argument.

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

[VB1FitObj]
Object taken in the argument.

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

[VB1FitObj]
Object taken in the argument.

Value

NULL.

Author(s)

Cesaire J. K. Fouodo


RegFitObj (regression approach)

Description

Creator of the generic accessor getBeta.

Usage

getBeta(rfo)

Arguments

rfo

[RegFitObj(1)]
object taken in the argument.

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

[Hybrid(1)]
Object taken in the argument.

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

[RegFitObj(1)]
object taken in the argument.

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

[RegFitObj(1)]
object taken in the argument.

Value

NULL.

Author(s)

Cesaire J. K. Fouodo


Hybrid (hybrid approach)

Description

Creator of the generic accessor getBetastar.

Usage

getBetastar(hybo)

Arguments

hybo

[Hybrid(1)]
Object taken in the argument.

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

[Hybrid(1)]
Object taken in the argument.

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

[Hybrid(1)]
Object taken in the argument.

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

[Kernel(1)]
Object taken in the argument.

Value

NULL.

Author(s)

Cesaire J. K. Fouodo


Kernel

Description

Creator of the generic accessor getBincat.

Usage

getBincat(kern)

Arguments

kern

[Kernel(1)]
Object taken in the argument.

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

[Kernel(1)]
Object of class Kernel.

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

[Hybrid(1)]
Object taken in the argument.

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

[Hybrid(1)]
Object taken in an argument.

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

[Hybrid(1)]
Object taken in the argument.

Value

NULL.

Author(s)

Cesaire J. K. Fouodo


VB1FitObj (ranking approach)

Description

Creator of the generic accessor getDifMat.

Usage

getDifMat(vb1o)

Arguments

vb1o

[VB1FitObj]
Object taken in the argument.

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

[VB1FitObj]
object taken in argument.

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

[VB1FitObj]
Object taken in the argument.

Value

NULL.

Author(s)

Cesaire J. K. Fouodo


RegFitObj (regression approach)

Description

Creator of the generic accessor getKernel.

Usage

getKernel(rfo)

Arguments

rfo

[RegFitObj(1)]
object taken in the argument.

Author(s)

Cesaire J. K. Fouodo


RegFitObj

Description

Creator of the generic accessor Kernel.

Usage

## S3 method for class 'RegFitObj'
getKernel(rfo)

Arguments

rfo

[RegFitObj(1)]
object taken in the argument.

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

[VB1FitObj]
Object taken in argument.

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

[RegFitObj(1)]
object taken in the argument.

Value

NULL.

Author(s)

Cesaire J. K. Fouodo


Kernel

Description

Creator of the generic accessor getKernpar.

Usage

getKernpar(kern)

Arguments

kern

[Kernel(1)]
Object taken in the argument.

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

[Kernel(1)]
Object of class Kernel.

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

[Kernel(1)]
Object taken in the argument.

Value

NULL.

Author(s)

Cesaire J. K. Fouodo


getLogrank

Description

computes the logrank statistic.

Usage

getLogrank(obj, t, delta)

Arguments

obj

[survivalsvmprediction(1)]
Object of class survivalsvmprediction.

t

[numeric(1)]
Numeric vector (of survival times).

delta

[vector(1)]
Binary vector (of status).

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

[Object(1)]
Object taken in the argument.

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

[Diffmatrix(1)]
Object of class Diffmatrix.

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

[Kernel(1)]
Object of class Kernel.

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

[Kernel(1)]
Object taken in the argument.

Value

NULL.

Author(s)

Cesaire J. K. Fouodo


RegFitObj (regression approach)

Description

Creator of the generic accessor getOptMeth.

Usage

getOptMeth(rfo)

Arguments

rfo

[RegFitObj(1)]
object taken in the argument.

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

[RegFitObj(1)]
object taken in the argument.

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

[VB1FitObj]
Object taken in argument.

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

[RegFitObj(1)]
object taken in the argument.

Value

NULL.

Author(s)

Cesaire J. K. Fouodo


RegFitObj (regression approach)

Description

Creator of the generic accessor getSV.

Usage

getSV(rfo)

Arguments

rfo

[RegFitObj(1)]
object taken in the argument.

Author(s)

Cesaire J. K. Fouodo


RegFitObj

Description

Creator of the generic accessor SV.

Usage

## S3 method for class 'RegFitObj'
getSV(rfo)

Arguments

rfo

[RegFitObj(1)]
object taken in the argument.

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

[RegFitObj(1)]
object taken in the argument.

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

[Object(1)]
Object taken in the argument.

Author(s)

Cesaire J. K. Fouodo


Diffmatrix.

Description

Mutator for objects of class Diffmatrix.

Usage

## S3 method for class 'Diffmatrix'
getType(obj)

Arguments

obj

[Diffmatrix(1)]
Object of class Diffmatrix.

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

[Kernel(1)]
Object of class Kernel.

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

[Object(1)]
Object taken in argument.

Value

NULL.

Author(s)

Cesaire J. K. Fouodo


VB1FitObj (ranking approach)

Description

Creator of the generic accessor getXtrain.

Usage

getXtrain(vb1o)

Arguments

vb1o

[VB1FitObj]
Object taken in the argument.

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

[VB1FitObj]
Object taken in the argument.

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

[VB1FitObj]
Object taken in the argument.

Value

NULL.

Author(s)

Cesaire J. K. Fouodo


RegFitObj (regression approach)

Description

Creator of the generic accessor getb0.

Usage

getb0(rfo)

Arguments

rfo

[RegFitObj(1)]
object taken in the argument.

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

[RegFitObj(1)]
object taken in the argument.

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

[matrix(1)]
Matrix of training data points.

Y

[vector(1)]
Vector of survival times.

delta

[vector(1)]
Vector of status: 1 = not censored.

meth_par

[numeric(1)]
Parameters of regularization.

kernel_type

[character(1)]
Kernel that is used to fit the model. The handled type are: linear kern ('lin_kern'), additive kernel ('add_kernel'), radial basis kernels ('rbf_kernel' and 'rbf4_kernel') and the polynomial kernel ('poly_kernel').

kernel_pars

[numeric(1)|vector(1)]
Parameters of kernel, when required.

bin_cat

[vector(1)]
Indexes of binary/categorical varibales

makediff

[character(1)]
String indicating which of 'makediff1', 'makediff2' or 'makediff3' will be used.

opt_alg

[character(1)]
Program that will be used to solve the quadratic optimization problem. Either quadprog or ipop.

sgf_sv

[integer(1)]
Number of decimal digits in the solution of the quadratic optimization problem.

sigf

[integer(1)]
Used by ipop. See ipop for details.

maxiter

[integer(1)]
Used by ipop. See ipop for details.

margin

[numeric(1)]
Used by ipop. See ipop for details.

bound

[numeric(1)]
Used by ipop. See ipop for details.

eig.tol

[numeric(1)]
Used by nearPD for adjusting positive definiteness. See nearPD for detail.

conv.tol

[numeric(1)]
Used by nearPD for adjusting positive definiteness. See nearPD for detail.

posd.tol

[numeric(1)]
Used by nearPD for adjusting positive definiteness. See nearPD for detail.

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

[matrix(1)]
Matrix of training data points.

kernel_type

[character(1)]
Type of kernel that is required.

kernel_pars

[vector(1)]
Parameters of kernels.

Xt

[matrix(1)]
Matrix of data points to be mapped.

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

[vector(1)]
A numeric vector.

d1

[vector(1)]
Binary vector.

t2

[numeric(1)]
A numeric vector.

d2

[vector(1)]
A binary vector.

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

[vector(1)]
Ordered vector of survival times.

delta

[vector(1)]
Vector of status

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

makediff2 and makediff3

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

[vector(1)]
Ordered vector of survival times.

delta

[vector(1)]
Vector of status

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

makediff1 and makediff3

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

[vector(1)]
Ordered vector of survival times.

delta

[vector(1)]
Vector of status.

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

makediff1 and makediff2

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

[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

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

[survivalsvm(1)]
survivalsvm object, fitted with survivalsvm.

X_pred

[matrix]
matrix of data points of interest.

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

[survivalsvm(1)]
makes predictions using a survivalsvm object fitted with survivalsvm.

X_pred

[matrix(1)]
matrix of data points of interest.

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

[survivalsvm(1)]
survivalsvm object, fitted with survivalsvm.

X_pred

[matrix]
matrix of data points of interest.

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

[survivalsvm(1)]
Object of class survivalsvm, fitted with survivalsvm.

X_pred

[matrix]
Matrix of data points used to make the prediction.

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

[survivalsvm(1)]
Object of class survivalsvm to be printed.

...

[any]
Further arguments passed to or from other methods.

Author(s)

Cesaire J. K. Fouodo


print survivalsvm

Description

Print objects of class survivalsvm.

Usage

## S3 method for class 'survivalsvmprediction'
print(x, ...)

Arguments

x

[survivalsvm(1)]
Object survivalsvm to be printed.

...

[any]
Further arguments passed to or from other methods.

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

[survivalsvm(1)]
Object survivalsvm to be printed.

...

[any]
Further arguments passed to or from other methods.

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

[survivalsvm(1)]
Object of class survivalsvm to be printed.

...

[any]
Further arguments passed to or from other methods.

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

[survivalsvm(1)]
Object of class survivalsvm to be printed.

...

[any]
Further arguments passed to or from other methods.

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

[survivalsvm(1)]
Object survivalsvm to be printed.

...

[any]
Further arguments passed to or from other methods.

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

[matrix(1)]
design matrix.

Y

[vector(1)]
vector of survival times.

delta

[vector(1)]
vector of status: 0 if censored and 1 else.

meth_par

[numeric(1)]
parameter of regularization.

kernel_type

[character(1)]
type of the kernel.

kernel_pars

[vector(1)]
parameter of kernel.

bin_cat

[vector(1)]
indexes of binary/categorial variables.

opt_alg

[character(1)]
program used to solve the optimization problem. This most be one of the two possibilities quadprog or ipop.

sgf_sv

[integer(1)]
number of digits to be retained in the solution.

sigf

[integer(1)]
used by ipop. See ipop for more details.

maxiter

[integer(1)]
used by ipop. See ipop for more details.

margin

[numeric(1)]
used by ipop. See ipop for more details.

bound

[numeric(1)]
used by ipop. See ipop for more details.

eig.tol

[numeric(1)]
used by nearPD for adjusting positive definiteness. See nearPD for detail.

conv.tol

[numeric(1)]
used by nearPD for adjusting positive definiteness. See nearPD for detail.

posd.tol

[numeric(1)]
used by nearPD for adjusting positive definiteness. See nearPD for detail.

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

[VB1FitObj]
Object taken in the argument.

alpha

[vector(1)]
New value

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

[VB1FitObj]
Object of class RegFitObj taken in the argument.

alpha

[vector(1)]
Vector of solutions.

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

[VB1FitObj]
Object taken in the argument.

alpha

[vector(1)]
New offset.

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

[RegFitObj(1)]
object taken in the argument.

beta

[vector(1)]
new value.

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

[Hybrid(1)]
Object of class Hybrid taken in the argument.

beta

[vector(1)]
Index of binary/categorial variables.

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

[RegFitObj(1)]
object of class RegFitObj taken in the argument.

beta

[vector(1)]
solutions of quadratic optimization problem.

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

[RegFitObj(1)]
object taken in the argument.

beta

[vector(1)]
new offset.

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

[Hybrid(1)]
Object taken in the argument.

betastar

[vector]
New value.

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

[Hybrid(1)]
Object of class Hybrid taken in the argument.

betastar

[vector(1)]
New value.

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

[Hybrid(1)]
Object taken in the argument.

betastar

[vector(1)]
New value.

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

[Kernel(1)]
Object of class Kernel taken in the argument.

bincat

[vector(1)]
Index of binary/categorial variables.

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

[Kernel(1)]
Object of class Kernel taken in the argument.

bincat

[vector(1)]
New index of binary/categorial variables.

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

[Kernel(1)]
Object taken in the argument.

bincat

[vector(1)]
New index of binary/categorial variables.

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

[Hybrid(1)]
Object taken in the argument.

delta

[vector(1)]
New value.

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

[Hybrid(1)]
Object of class Hybrid taken in the argument.

delta

[vector(1)]
New value.

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

[Hybrid(1)]
Object taken in the argument.

delta

[vector(1)]
New value

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

[VB1FitObj]
Object taken in the argument.

dm

[Diffmatrix(1)]
new value

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

[VB1FitObj]
Object of class RegFitObj taken in the argument.

dm

[Diffmatrix(1)]
New value

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

[VB1FitObj]
Object taken in the argument.

dm

[Diffmatrix(1)]
New offset.

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

[RegFitObj(1)]
object taken in the argument.

kernel

[Kernel(1)]
new value.

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

[RegFitObj(1)]
object of class RegFitObj taken in the argument.

kernel

[Kernel(1)]
index of binary/categorial variables.

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

[VB1FitObj]
Object of class RegFitObj taken in the argument.

kernel

[Diffmatrix(1)]
New object of class 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

[RegFitObj(1)]
object taken in the argument.

kernel

[Kernel(1)]
new object of class 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

[Kernel(1)]
Object of class Kernel taken in the argument.

kernpar

[vector(1)]
New kernel parameters.

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

[Kernel(1)]
Object of class Kernel taken in the argument.

kernpar

[vector(1)]
New kernel parameters.

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

[Kernel(1)]
Object taken in the argument.

kernpar

[vector(1)]
New kernel parameters.

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

[Object(1)]
Object taken in the argument.

mat

[matrix(1)]
New matrix.

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

[Diffmatrix(1)]
Object of class Diffmatrix.

mat

[matrix(1)]
Matrix used to perform differences between comparable data points.

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

[Kernel(1)]
Object of class Kernel taken in the argument.

mat

[matrix(1)]
New kernel matrix.

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

[Object(1)]
Object taken in the argument.

mat

[matrix(1)]
New matrix.

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

[RegFitObj(1)]
object taken in the argument.

optmeth

[character(1)]
new value.

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

[RegFitObj(1)]
object of class RegFitObj taken in the argument.

optmeth

[character(1)]
names the solver.

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

[VB1FitObj]
Object of class RegFitObj taken in the argument.

optmeth

[character(1)]
New value

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

[RegFitObj(1)]
object taken in the argument.

optmeth

[character(1)]
new name the of optimization program.

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

[RegFitObj(1)]
object taken in the argument.

sv

[matrix(1)]
new value.

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

[RegFitObj(1)]
object of class RegFitObj taken in the argument.

sv

[matrix(1)]
support vectors.

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

[RegFitObj(1)]
object taken in the argument.

sv

[matrix(1)]
new support vectors.

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

[Kernel(1)]
Object taken in the argument.

type

[character(1)]
New 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

[Diffmatrix(1)]
Object of class Diffmatrix.

type

[character(1)]
New 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

[Kernel(1)]
Object taken in the argument.

type

[character(1)]
Kerntype new 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

[Object(1)]
Object taken in the argument.

type

[character(1)]
New 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

[VB1FitObj]
Object taken in the argument.

sv

[matrix(1)]
new value

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

[VB1FitObj]
Object of class RegFitObj taken in argument.

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

[VB1FitObj]
Object taken in the argument.

sv

[matrix(1)]
New value.

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

[RegFitObj(1)]
object taken in the argument.

b0

[numeric(1)]
new value.

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

[RegFitObj(1)]
object of class RegFitObj taken in the argument.

b0

[numeric(1)]
new offset.

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

[RegFitObj(1)]
object taken in the argument.

b0

[numeric(1)]
new offset value.

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

[formula(1)]
Object of class formula. See formula for more details.

data

[data.frame(1)]
Object of class data.frame containing data points that will be used to fit the model.

subset

[vector(1)]
An index vector specifying the cases to be used in the training sample.

type

[character(1)]
String indicating which type of survival support vectors model is desired. This must be one of the following strings: 'regression', 'vanbelle1', 'vanbelle2' or 'hybrid'.

diff.meth

[character(1)]
String indicating which of 'makediff1', 'makediff2' or 'makediff3' is used in case of 'vanbelle1', 'vanbelle2' and 'hybrid'.

gamma.mu

[numeric(1)|vector(1)]
Parameters of regularization. Note that a vector with two parameters is required in case of hybrid approach. Just one value is required in case of regression, vanbelle1 or vanbelle2.

opt.meth

[character(1)]
Program used to solve the quadratic optimization problem. Either "quadprog" or "ipop".

kernel

[Kernel(1)]
Kernel used to fit the model: linear kern ('lin_kernel'), additive kernel ('add_kernel'), radial basis kernels ('rbf_kernel') and the polynomial kernel ('poly_kernel').

kernel.pars

[vector(1)]
Parameters of kernel, when required.

time.variable.name

[character]
Name of the survival time variable in data, when given in argument.

status.variable.name

[character(1)]
Name of the status variable in data.

sgf.sv

[character(1)]
Number of decimal digits in the solution of the quadratic optimization problem.

sigf

[numeric(1)]
Used by ipop. See ipop for details.

maxiter

[integer(1)]
Used by ipop. See ipop for details.

margin

[numeric(1)]
Used by ipop. See ipop for details.

bound

[numeric(1)]
Used by ipop. See ipop for details.

eig.tol

[numeric(1)]
Used by nearPD for adjusting positive definiteness. See nearPD for detail.

conv.tol

[numeric(1)]
Used by nearPD for adjusting positive definiteness. See nearPD for detail.

posd.tol

[numeric(1)]
Used by nearPD for adjusting positive definiteness. See nearPD for detail.

Details

The following denotations are used for the models implemented:

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

See Also

predict.survivalsvm

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

[matrix(1)]
Matrix of training data points.

Y

[vector(1)]
Vector of survival times.

delta

[vector(1)]
Vector of status: 1 = not censored.

meth_par

[numeric(1)]
Parameter of regularization.

kernel_type

[character(1)]
Kernel that will be used to fit the model. The handled type are: linear kern ('lin_kern'), additive kernel ('add_kernel'), radial basis kernels ('rbf_kernel' and 'rbf4_kernel') and the polynomial kernel ('poly_kernel').

kernel_pars

[numeric(1)|vector(1)]
Parameters of kernel, when required.

bin_cat

[vector(1)]
Indexes of binary/categorical varibales

makediff

[character(1)]
String indicating which of 'makediff1', 'makediff2' or 'makediff3' will be used.

opt_alg

[vector(1)]
Program that will be used to solve the quadratic optimization problem. Either quadprog or ipop.

sgf_sv

[integer(1)]
Number of decimal digits in the solution of the quadratic optimization problem.

sigf

[integer(1)]
Used by ipop. See ipop for details.

maxiter

[integer(1)]
Used by ipop. See ipop for details.

margin

[numeric(1)]
Used by ipop. See ipop for details.

bound

[numeric(1)]
Used by ipop. See ipop for details.

eig.tol

[numeric(1)]
Used by nearPD for adjusting positive definiteness. See nearPD for detail.

conv.tol

[numeric(1)]
Used by nearPD for adjusting positive definiteness. See nearPD for detail.

posd.tol

[numeric(1)]
Used by nearPD for adjusting positive definiteness. See nearPD for detail.

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

[matrix(1)]
Matrix of training data point.

Y

[vector(1)]
Vector of survival times.

delta

[vector(1)]
Vector of status: 1 = not censored.

meth_par

[numeric(1)]
Parameter of regularization.

kernel_type

[numeric(1)]
Kernel that will be used to fit the model. The handled type are: linear kern ('lin_kern'), additive kernel ('add_kernel'), radial basis kernels ('rbf_kernel' and 'rbf4_kernel') and the polynomial kernel ('poly_kernel').

kernel_pars

[numeric(1)|vector(1)]
Parameters of kernel, when required.

bin_cat

[vector(1)]
Indexes of binary/categorical varibales

makediff

[character(1)]
String indicating which of 'makediff1', 'makediff2' or 'makediff3' will be used.

opt_alg

[character]
Program that will be used to solve the quadratic optimization problem. Either quadprog or ipop.

sgf_sv

[integer(1)]
Number of decimal digits in the solution of the quadratic optimization problem.

sigf

[integer(1)]
Used by ipop. See ipop for details.

maxiter

[inter(1)]
Used by ipop. See ipop for details.

margin

[numeric(1)]
Used by ipop. See ipop for details.

bound

[numeric(1)]
Used by ipop. See ipop for details.

eig.tol

[numeric(1)]
Used by nearPD for adjusting positive definiteness. See nearPD for detail.

conv.tol

[numeric(1)]
Used by nearPD for adjusting positive definiteness. See nearPD for detail.

posd.tol

[numeric(1)]
Used by nearPD for adjusting positive definiteness. See nearPD for detail.

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

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.