sksurv.kernels.
ClinicalKernelTransform
Transform data using a clinical Kernel
The clinical kernel distinguishes between continuous ordinal,and nominal variables.
See 1 for further description.
fit_once (bool, optional) – If set to True, fit() does only transform the training data, but not update its internal state. You should call prepare() once before calling transform(). If set to False, it behaves like a regular estimator, i.e., you need to call fit() before transform().
True
False
References
Daemen, A., De Moor, B., “Development of a kernel function for clinical data”. Annual International Conference of the IEEE Engineering in Medicine and Biology Society, 5913-7, 2009
__init__
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__([fit_once, _numeric_ranges, …])
Initialize self.
fit(X[, y])
fit
Determine transformation parameters from data in X.
pairwise_kernel(X, Y)
pairwise_kernel
Function to use with sklearn.metrics.pairwise.pairwise_kernels()
sklearn.metrics.pairwise.pairwise_kernels()
prepare(X)
prepare
transform(Y)
transform
Compute all pairwise distances between self.X_fit_ and Y.
Subsequent calls to transform(Y) compute the pairwise distance to X. Parameters of the clinical kernel are only updated if fit_once is False, otherwise you have to explicitly call prepare() once.
X (pandas.DataFrame, shape = (n_samples, n_features)) – Data to estimate parameters from.
y (None) – Argument is ignored (included for compatibility reasons).
kwargs (dict) – Argument is ignored (included for compatibility reasons).
self – Returns the instance itself.
object
X (array, shape = (n_features,)) –
Y (array, shape = (n_features,)) –
similarity – Similarities are normalized to be within [0, 1]
float
Use if fit_once is True, in which case fit() does not set the parameters of the clinical kernel.
y (array-like, shape = (n_samples_y, n_features)) –
kernel – Kernel matrix. Values are normalized to lie within [0, 1].
ndarray, shape = (n_samples_y, n_samples_X_fit_)