tick.survival.
ConvSCCS
(n_lags: numpy.array, penalized_features: numpy.array = None, C_tv=None, C_group_l1=None, step: float = None, tol: float = 1e-05, max_iter: int = 100, verbose: bool = False, print_every: int = 10, record_every: int = 10, random_state: int = None)[source]¶ConvSCCS learner, estimates lagged features effect using TV and Group L1 penalties. These penalties constrain the coefficient groups modelling the lagged effects to ensure their regularity and sparsity.
n_lags : numpy.ndarray
, shape=(n_features,), dtype=”uint64”
Number of lags per feature. The model will regress labels on the last observed values of the features over their corresponding
n_lags
time intervals.n_lags
values must be between 0 andn_intervals
- 1.
penalized_features : numpy.ndarray
, shape=(n_features,), dtype=”bool”, default=None
Booleans indicating whether the features should be penalised or not. If set to None, pernalize all features.
C_tv : float
, default=None
Level of TV penalization TV penalization. This value should be
None
or greater than 0.
C_group_l1 : float
, default=None
Level of group Lasso penalization. This value should be
None
or greater than 0.
step : float
, default=None
Step-size parameter, the most important parameter of the solver. If set to None, it will be automatically tuned as
step = 1 / model.get_lip_max()
.
tol : float
, default=1e-5
The tolerance of the solver (iterations stop when the stopping criterion is below it).
max_iter : int
, default=100
Maximum number of iterations of the solver, namely maximum number of epochs.
verbose : bool
, default=False
If
True
, solver verboses history, otherwise nothing is displayed.
print_every : int
, default=1
Print history information every time the iteration number is a multiple of
print_every
. Used only isverbose
is True.
record_every : int
, default=1
Save history information every time the iteration number is a multiple of
record_every
.
random_state : int
, default=None
If not None, the seed of the random sampling.
n_cases : int
(read-only)
Number of samples with at least one outcome.
n_intervals : int
(read-only)
Number of time intervals.
n_features : int
(read-only)
Number of features.
n_coeffs : int
(read-only)
Total number of coefficients of the model.
coeffs : list
(read-only)
List containing 1-dimensional
np.ndarray
(dtype=float
) containing the coefficients of the model. Each numpy array contains the(n_lags + 1)
coefficients associated with a feature. Each coefficient of such arrays can be interpreted as the log relative intensity associated with this feature,k
periods after exposure start, wherek
is the index of the coefficient in the array.
intensities : list
(read-only)
List containing 1-dimensional
np.ndarray
(dtype=float
) containing the intensities estimated by the model. Each numpy array contains the relative intensities of a feature. Element of these arrays can be interpreted as the relative intensity associated with a feature,k
periods after exposure start, wherek
is the index of the coefficient in the array.
confidence_intervals : Confidence_intervals
(read-only)
Coefficients refitted on the model and associated confidence intervals computed using parametric bootstrap. Refitted coefficients are projected on the support of the coefficients estimated by the penalised model. Refitted coefficients and their confidence intervals follow the same structure as
coeffs
.
References
Morel, M., Bacry, E., Gaïffas, S., Guilloux, A., & Leroy, F. (Submitted, 2018, January). ConvSCCS: convolutional self-controlled case series model for lagged adverse event detection
tick.survival.ConvSCCS
¶