sksurv.svm.
FastKernelSurvivalSVM
Efficient Training of kernel Survival Support Vector Machine.
See the User Guide and 1 for further description.
alpha (float, positive, default: 1) – Weight of penalizing the squared hinge loss in the objective function
rank_ratio (float, optional, default: 1.0) – Mixing parameter between regression and ranking objective with 0 <= rank_ratio <= 1. If rank_ratio = 1, only ranking is performed, if rank_ratio = 0, only regression is performed. A non-zero value is only allowed if optimizer is one of ‘avltree’, ‘PRSVM’, or ‘rbtree’.
0 <= rank_ratio <= 1
rank_ratio = 1
rank_ratio = 0
fit_intercept (boolean, optional, default: False) – Whether to calculate an intercept for the regression model. If set to False, no intercept will be calculated. Has no effect if rank_ratio = 1, i.e., only ranking is performed.
False
kernel ("linear" | "poly" | "rbf" | "sigmoid" | "cosine" | "precomputed") – Kernel. Default: “linear”
degree (int, default: 3) – Degree for poly kernels. Ignored by other kernels.
gamma (float, optional) – Kernel coefficient for rbf and poly kernels. Default: 1/n_features. Ignored by other kernels.
1/n_features
coef0 (float, optional) – Independent term in poly and sigmoid kernels. Ignored by other kernels.
kernel_params (mapping of string to any, optional) – Parameters (keyword arguments) and values for kernel passed as call
max_iter (int, optional, default: 20) – Maximum number of iterations to perform in Newton optimization
verbose (bool, optional, default: False) – Whether to print messages during optimization
tol (float, optional) – Tolerance for termination. For detailed control, use solver-specific options.
optimizer ("avltree" | "rbtree", optional, default: "rbtree") – Which optimizer to use.
random_state (int or numpy.random.RandomState instance, optional) – Random number generator (used to resolve ties in survival times).
numpy.random.RandomState
timeit (False or int) – If non-zero value is provided the time it takes for optimization is measured. The given number of repetitions are performed. Results can be accessed from the optimizer_result_ attribute.
optimizer_result_
coef_
Coefficients of the features in the decision function.
ndarray, shape = (n_samples,)
fit_X_
Training data.
ndarray
Stats returned by the optimizer. See scipy.optimize.optimize.OptimizeResult.
scipy.optimize.optimize.OptimizeResult
See also
FastSurvivalSVM
Fast implementation for linear kernel.
References
Pölsterl, S., Navab, N., and Katouzian, A., An Efficient Training Algorithm for Kernel Survival Support Vector Machines 4th Workshop on Machine Learning in Life Sciences, 23 September 2016, Riva del Garda, Italy. arXiv:1611.07054
__init__
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__([alpha, rank_ratio, fit_intercept, …])
Initialize self.
fit(X, y)
fit
Build a survival support vector machine model from training data.
predict(X)
predict
Rank samples according to survival times
score(X, y)
score
Returns the concordance index of the prediction.
X (array-like, shape = (n_samples, n_features)) – Data matrix.
y (structured array, shape = (n_samples,)) – A structured array containing the binary event indicator as first field, and time of event or time of censoring as second field.
self
Lower ranks indicate shorter survival, higher ranks longer survival.
X (array-like, shape = (n_samples, n_features)) – The input samples.
y – Predicted ranks.
X (array-like, shape = (n_samples, n_features)) – Test samples.
cindex – Estimated concordance index.
float