sksurv.svm.
MinlipSurvivalAnalysis
Survival model related to survival SVM, using a minimal Lipschitz smoothness strategy instead of a maximal margin strategy.
See 1 for further description.
solver ("cvxpy" | "cvxopt" | "osqp", optional, default: cvxpy) – Which quadratic program solver to use.
alpha (float, positive, default: 1) – Weight of penalizing the hinge loss in the objective function.
kernel ("linear" | "poly" | "rbf" | "sigmoid" | "cosine" | "precomputed") – Kernel. Default: “linear”
gamma (float, optional) – Kernel coefficient for rbf and poly kernels. Default: 1/n_features. Ignored by other kernels.
1/n_features
degree (int, default: 3) – Degree for poly kernels. Ignored by other kernels.
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
pairs ("all" | "nearest" | "next", optional, default: "nearest") –
Which constraints to use in the optimization problem.
all: Use all comparable pairs. Scales quadratic in number of samples (cf. sksurv.svm.HingeLossSurvivalSVM).
sksurv.svm.HingeLossSurvivalSVM
nearest: Only considers comparable pairs \((i, j)\) where \(j\) is the uncensored sample with highest survival time smaller than \(y_i\). Scales linear in number of samples.
next: Only compare against direct nearest neighbor according to observed time, disregarding its censoring status. Scales linear in number of samples.
verbose (bool, default: False) – Enable verbose output of solver
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 timings_ attribute.
timings_
max_iter (int, optional) – Maximum number of iterations to perform. By default use solver’s default value.
X_fit_
Training data.
ndarray
coef_
Coefficients of the features in the decision function.
ndarray, shape = (n_samples,)
References
Van Belle, V., Pelckmans, K., Suykens, J. A. K., and Van Huffel, S. Learning transformation models for ranking and survival analysis. The Journal of Machine Learning Research, 12, 819-862. 2011
__init__
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__([solver, alpha, kernel, gamma, …])
Initialize self.
fit(X, y)
fit
Build a MINLIP survival model from training data.
predict(X)
predict
Predict risk score of experiencing an event.
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
Higher scores indicate shorter survival (high risk), lower scores longer survival (low risk).
X (array-like, shape = (n_samples, n_features)) – The input samples.
y – Predicted risk.
X (array-like, shape = (n_samples, n_features)) – Test samples.
cindex – Estimated concordance index.
float