MCPcopy Create free account

hub / github.com/derrynknife/SurPyval / functions

Functions1,523 in github.com/derrynknife/SurPyval

↓ 4 callersMethodff
(self, x, Z, *params)
surpyval/univariate/regression/accelerated_failure_time/aft_fitter.py:74
↓ 4 callersMethodfrom_json
Create SurpyvalData instance from JSON string or file path. Parameters ---------- source : str | Path Pa
surpyval/utils/surpyval_data.py:266
↓ 4 callersFunctionfsli_to_xcnt
Converts the fsli format to the xcn format. This ensures is so that the data can be passed to one of the parametric or nonparametric fitters.
surpyval/utils/__init__.py:891
↓ 4 callersMethodget_right_truncation_close
Per-item integration bounds for the NHPP likelihood's right window-close. The NHPP integral runs from each item's entry time
surpyval/utils/recurrent_event_data.py:257
↓ 4 callersMethodhf
(self, x)
surpyval/experimental/series.py:42
↓ 4 callersFunctioninterp_function
( x: npt.ArrayLike, y: npt.ArrayLike, kind: str )
surpyval/univariate/nonparametric/nonparametric.py:16
↓ 4 callersFunctionload_rossi_static
Data on the recidivism of released prisoners from [8]_. Uses only static covariates. References ---------- .. [8] Rossi, P.H.,
surpyval/datasets/__init__.py:230
↓ 4 callersMethodmoment
r""" The n-th moment of the distribution using the parameters found in the ``.params`` attribute. Parameters -------
surpyval/univariate/parametric/parametric.py:749
↓ 4 callersMethodmpp_y_transform
(self, y, *params)
surpyval/univariate/parametric/distributions/beta.py:384
↓ 4 callersMethodphi
(self, Z, *params)
surpyval/univariate/regression/accelerated_failure_time/aft_fitter.py:18
↓ 4 callersMethodphi_bounds
(self, Z)
surpyval/univariate/regression/accelerated_failure_time/aft_fitter.py:21
↓ 4 callersMethodphi_param_map
(self, Z)
surpyval/univariate/regression/accelerated_failure_time/aft_fitter.py:24
↓ 4 callersFunctionregression_neg_ll
Negative log-likelihood for a covariate-aware survival model. Parameters ---------- model : object Must provide ``log_df``, ``log
surpyval/univariate/regression/_likelihood.py:61
↓ 4 callersFunctionreject_left_truncation
Virtual-age and history-dependent models (Kijima/G1/ARA/ARI) cannot be fitted to left-truncated (delayed-entry) data: the virtual age or
surpyval/utils/recurrent_utils.py:9
↓ 4 callersMethodsf
r""" Surival (or Reliability) function with the non-parametric estimates from the data. Parameters ----------
surpyval/univariate/nonparametric/nonparametric.py:59
↓ 4 callersMethodsf
The survival function of the fitted model. Parameters ---------- x : array like The values at which the
surpyval/univariate/parametric/mixture_model.py:290
↓ 4 callersMethodsf
r""" Survival (or reliability) function for the Logistic Distribution: .. math:: R(x) = 1 - \\frac{1}{1 + e^{- \\left (
surpyval/univariate/parametric/distributions/logistic.py:25
↓ 4 callersMethodsf
r""" Survival (or Reliability) function for the LogNormal Distribution: .. math:: R(x) = 1 - \Phi \left( \frac{\ln(x) -
surpyval/univariate/parametric/distributions/lognormal.py:50
↓ 4 callersMethodsf
r""" Survival (or Reliability) function for the Uniform Distribution: .. math:: R(x) = \frac{b - x}{b - a} Para
surpyval/univariate/parametric/distributions/uniform.py:25
↓ 4 callersMethodsf
r""" Survival (or reliability) function for the Beta Distribution: .. math:: R(x) = 1 - \int_{0}^{x}t^{\alpha-1}\left (1
surpyval/univariate/parametric/distributions/beta.py:30
↓ 4 callersMethodsf
r""" Survival (or reliability) function for the LogLogistic Distribution: .. math:: R(x) = 1 - \frac{1}{1 + \left ( x /
surpyval/univariate/parametric/distributions/loglogistic.py:30
↓ 4 callersMethodsf
r""" Survival (or Reliability) function for the Gamma Distribution: .. math:: R(x) = 1 - \frac{\gamma \left ( \alpha, \b
surpyval/univariate/parametric/distributions/gamma.py:52
↓ 4 callersMethodsf
r""" Survival (or Reliability) function for the Normal Distribution: .. math:: R(x) = 1 - \Phi \left( \frac{x - \mu}{\si
surpyval/univariate/parametric/distributions/normal.py:52
↓ 4 callersMethodsf
r""" Survival (reliability) function for the Binomial distribution: .. math:: R(x) = P(X > x) = 1 - F(x) Parame
surpyval/univariate/parametric/distributions/binomial.py:106
↓ 4 callersMethodsf
r""" Survival (or reliability) function for the four-parameter Beta distribution: .. math:: R(x) = 1 - I_{z}\lef
surpyval/univariate/parametric/distributions/beta4.py:75
↓ 4 callersMethodsf
r""" Survival (or reliability) function for the ExpoWeibull Distribution: .. math:: R(x) = 1 - \left [ 1 - e^{-\left ( \
surpyval/univariate/parametric/distributions/expo_weibull.py:44
↓ 4 callersMethodsf
r""" Survival (or reliability) function for the Gumbel LEV Distribution: .. math:: R(x) = 1 - e^{-e^{-\left ( x - \mu \r
surpyval/univariate/parametric/distributions/gumbel_lev.py:24
↓ 4 callersMethodsmoothed_hf
r""" Kernel smoothed estimate of the hazard rate, using an Epanechnikov kernel over the increments of the cumulative hazard es
surpyval/univariate/nonparametric/nonparametric.py:1017
↓ 4 callersMethodto_xrd
Convert the recurrent event data to xrd format. Parameters ---------- estimator : str, optional The esti
surpyval/utils/recurrent_event_data.py:80
↓ 4 callersFunctionvalidate_float_array
Convert input to float array with better error handling.
surpyval/utils/__init__.py:69
↓ 4 callersFunctionvalidate_memory
The Arithmetic Reduction of Age/Intensity models (``ARA``/``ARI``) are parameterised by an integer memory ``m`` (how many prior failures the
surpyval/utils/recurrent_utils.py:57
↓ 4 callersFunctionvalidate_renewal_censoring
The renewal models only define likelihood contributions for exact events (``c=0``) and right-censored observations (``c=1``). Interval (``c=2
surpyval/utils/recurrent_utils.py:72
↓ 4 callersFunctionxcnt_sort
(x, c, n, t)
surpyval/utils/__init__.py:105
↓ 3 callersFunctionAcceleratedLife
Create an Accelerated Life fitter for the given distribution and life model. Parameters ---------- distribution : ParametricFitt
surpyval/univariate/regression/accelerated_life/accelerated_life.py:19
↓ 3 callersMethodEM
(self)
surpyval/univariate/parametric/mixture_model.py:110
↓ 3 callersMethodHf
r""" Cumulative hazard rate with the non-parametric estimates from the data. This is calculated using the relationship betwee
surpyval/univariate/nonparametric/nonparametric.py:219
↓ 3 callersMethodHf
(cls, x)
surpyval/univariate/parametric/__init__.py:56
↓ 3 callersMethodHf
r""" Cumulative hazard rate for the Gumbel Distribution: .. math:: H(x) = e^{\frac{x-\mu}{\sigma}} Parameters
surpyval/univariate/parametric/distributions/gumbel.py:185
↓ 3 callersMethod_bounds_transform
Build the (bounded -> unbounded) parameter transforms used by the fitters that optimise in an unconstrained space. ``bounds`` are the
surpyval/recurrent/renewal/fit_mixin.py:49
↓ 3 callersMethod_cb_full_sf
Survival function including the LFP and zero-inflation mass.
surpyval/univariate/parametric/parametric.py:904
↓ 3 callersMethod_cb_sf_bound
Confidence bound on the survival function via a logit transform. Working on the logit of R keeps the bound within ``(0, 1)``. The ret
surpyval/univariate/parametric/parametric.py:914
↓ 3 callersFunction_cdiff1
5th-order central diff of f(a, x) w.r.t. a. Both a and x must be plain numpy values — call with getval().
surpyval/utils/autograd_gamma_compat.py:39
↓ 3 callersFunction_delayed_entry_data
()
surpyval/tests/recurrent/test_mcf_truncation.py:22
↓ 3 callersFunction_intensity_events
()
surpyval/tests/recurrent/test_parametric_inference.py:19
↓ 3 callersMethod_moment
(self, n, *params, offset=False)
surpyval/univariate/parametric/parametric_fitter.py:274
↓ 3 callersMethod_neg_ll_func
(self, data, *params)
surpyval/univariate/parametric/parametric_fitter.py:225
↓ 3 callersMethod_split_by_mask
( self, mask: np.ndarray )
surpyval/utils/surpyval_data.py:204
↓ 3 callersFunction_step
Exact floating-point step size for central differences.
surpyval/utils/autograd_gamma_compat.py:33
↓ 3 callersFunction_summary
Fit with an offset and return parameter vs distribution metrics.
surpyval/tests/univariate/parametric/test_offset_divergence.py:35
↓ 3 callersMethodaic
r""" The Aikake Information Criterion (AIC) for the model, if it was fit with the ``fit()`` method. Not available if fit with the
surpyval/univariate/parametric/parametric.py:1046
↓ 3 callersMethodapply_model_function
( self, function_name: str, x: int | float | ArrayLike, Z: NDArray, )
surpyval/experimental/forest/node.py:18
↓ 3 callersFunctionara_virtual_ages
Effective (virtual) age at the start of each interarrival for the Arithmetic Reduction of Age model with memory ``m`` (Doyen & Gaudoin, 2
surpyval/recurrent/renewal/ara.py:16
↓ 3 callersFunctionbuild_tree
Node factory. Decides to return IntermediateNode object, or its sibling TerminalNode.
surpyval/experimental/forest/node.py:114
↓ 3 callersFunctioncheck_Z_and_x
(Z, x)
surpyval/utils/__init__.py:1024
↓ 3 callersMethodcif
Compute the cumulative incidence function (CIF) based on the fitted model. No need to pass parameters as it uses the parameters of th
surpyval/recurrent/parametric/parametric_recurrence.py:69
↓ 3 callersMethodcs
r""" The conditional survival of the model; that is, the probability that an item that has survived to ``X`` survives a further ``x``
surpyval/univariate/parametric/parametric.py:553
↓ 3 callersMethoddf
r""" Density function for the ExpoWeibull Distribution: .. math:: f(x) = \mu \left ( \frac{\beta}{\alpha} \right ) \left
surpyval/univariate/parametric/distributions/expo_weibull.py:158
↓ 3 callersFunctionfs_to_xcnt
(f=None, s=None)
surpyval/utils/__init__.py:991
↓ 3 callersMethodget_interarrival_times
Finds the interarrival times between events for each item. The class assumes that the time of the event is cumulative, sometimes it i
surpyval/utils/recurrent_event_data.py:202
↓ 3 callersMethodiif
Compute the instantaneous incidence function of the model with the parameters found by the fit method. Parameters -
surpyval/recurrent/regression/proportional_intensity.py:76
↓ 3 callersMethodinitialize_simulation
(self)
surpyval/recurrent/simulation.py:41
↓ 3 callersMethodlog_iif
Natural logarithm of the instantaneous intensity function (IIF) of the HPP model. Parameters ---------- x :
surpyval/recurrent/parametric/hpp.py:76
↓ 3 callersMethodmedian
r""" The median survival time; the smallest observed value at which the estimated CDF reaches, or exceeds, 0.5. NaN if the estimate
surpyval/univariate/nonparametric/nonparametric.py:530
↓ 3 callersMethodmpp_x_transform
(self, x, gamma=0)
surpyval/univariate/parametric/distributions/beta.py:390
↓ 3 callersMethodneg_ll
r""" The negative log-likelihood for the model, if it was fit with the ``fit()`` method. Not available if fit with the ``from_params(
surpyval/univariate/parametric/parametric.py:977
↓ 3 callersMethodphi
(self, Z, *p)
surpyval/univariate/regression/proportional_odds/proportional_odds_fitter.py:190
↓ 3 callersMethodsf
r""" Survival (or Reliability) function for a distribution using the parameters found in the ``.params`` attribute. Paramete
surpyval/univariate/parametric/parametric.py:312
↓ 3 callersMethodsf
r""" Survival (or reliability) function for the Rayleigh Distribution: .. math:: R(x) = e^{-\frac{x^2}{2\sigma^2}}
surpyval/univariate/parametric/distributions/rayleigh.py:51
↓ 3 callersMethodsf
(self, x, Z, event=None, interp="step")
surpyval/univariate/competing_risks/regression/competing_risks_proportional_hazard.py:42
↓ 3 callersMethodtail_dependence
Lower/upper tail-dependence coefficients ``(lambda_L, lambda_U)``. Default ``(0.0, 0.0)`` (no tail dependence); families override.
surpyval/multivariate/parametric/copula/copula.py:85
↓ 3 callersMethodto_cause_specific_xrd
Convert the recurrent event data to xrd format for a single event type (cause). The at-risk set ``r`` is shared across all causes (an
surpyval/utils/recurrent_event_data.py:153
↓ 3 callersFunctionwrangle_Z
(Z)
surpyval/utils/__init__.py:1077
↓ 3 callersFunctionxcn_to_fs
(x, c=None, n=None)
surpyval/utils/__init__.py:724
↓ 2 callersMethodHf
r""" Cumulative hazard rate for the Beta distribution. .. math:: H(x) = -\ln\left( R(x) \right ) Parameters
surpyval/univariate/parametric/distributions/beta.py:205
↓ 2 callersMethodHf
(self, x, event=None)
surpyval/univariate/competing_risks/nonparametric/competing_risks.py:56
↓ 2 callersMethodHf
( self, x: npt.ArrayLike, Z: "npt.ArrayLike | pd.DataFrame" )
surpyval/univariate/regression/semi_parametric_regression_model.py:72
↓ 2 callersMethodR_cb
( self, x: npt.ArrayLike, bound: str = "two-sided", interp: str = "step",
surpyval/univariate/nonparametric/nonparametric.py:385
↓ 2 callersFunction_assert_information_criteria
(model, dist)
surpyval/tests/recurrent/test_parametric_inference.py:24
↓ 2 callersMethod_band_critical_value
( a_l: float, a_u: float, alpha_ci: float, standardized: bool, n_sims:
surpyval/univariate/nonparametric/nonparametric.py:828
↓ 2 callersMethod_bounds_transforms
(self)
surpyval/multivariate/parametric/copula/copula.py:300
↓ 2 callersMethod_cb_delta_var
First-order delta-method variance: ``Var(g) = J Sigma J^T``.
surpyval/univariate/parametric/parametric.py:909
↓ 2 callersMethod_cb_unpack
Split an extended parameter vector into ``(core, p, f0)``.
surpyval/univariate/parametric/parametric.py:892
↓ 2 callersFunction_cdiff2_a
5th-order central diff of f(a, b, x) w.r.t. a — all args plain numpy.
surpyval/utils/autograd_gamma_compat.py:50
↓ 2 callersFunction_cdiff2_b
5th-order central diff of f(a, b, x) w.r.t. b — all args plain numpy.
surpyval/utils/autograd_gamma_compat.py:61
↓ 2 callersFunction_check_an_ids_tl_and_x
(id, tl, x)
surpyval/utils/__init__.py:1153
↓ 2 callersMethod_check_dist_eligible
The G1 renewal process scales interarrival times by ``(1 + q) ** j``. For the scaled times to remain valid the base distribution must
surpyval/recurrent/renewal/generalized_one_renewal.py:120
↓ 2 callersMethod_compute_var
(self, estimator, r, d)
surpyval/univariate/nonparametric/nonparametric_fitter.py:41
↓ 2 callersMethod_create_non_p_model
( self, x: npt.ArrayLike, r: npt.ArrayLike, d: npt.ArrayLike, estimato
surpyval/univariate/nonparametric/nonparametric_fitter.py:18
↓ 2 callersMethod_f
(self, arr, x, Z, event=None, interp="step")
surpyval/univariate/competing_risks/regression/competing_risks_proportional_hazard.py:24
↓ 2 callersFunction_ff_safe
``model.ff(x, Z, *params)`` with non-finite bounds replaced by their limiting probability without ever evaluating ``ff`` at a non-finite value
surpyval/univariate/regression/_likelihood.py:25
↓ 2 callersMethod_fit_theta
(self, margin_models, data)
surpyval/multivariate/parametric/copula/copula.py:309
↓ 2 callersMethod_initial_dist_params
Initial parameters for the underlying lifetime distribution, fitted to the times-to-first-event when there are enough of them (these
surpyval/recurrent/renewal/fit_mixin.py:25
↓ 2 callersFunction_integrated_moment
Numerically integrate ∫ xⁿ f(x) dx over the distribution's support.
surpyval/tests/univariate/parametric/test_distributions_math.py:243
↓ 2 callersFunction_left_truncated_data
(seed=0, n=1000, alpha=10.0, beta=2.0, tl=3.0)
surpyval/tests/univariate/regression/test_truncation.py:20
↓ 2 callersMethod_make_model
(self, underlying_model, rho, m)
surpyval/recurrent/renewal/ara.py:110
↓ 2 callersMethod_make_model
(self, underlying_model, q, kijima_type)
surpyval/recurrent/renewal/generalized_renewal.py:103
↓ 2 callersMethod_make_model
(self, underlying_model, q)
surpyval/recurrent/renewal/generalized_one_renewal.py:80
↓ 2 callersMethod_make_model
(self, baseline_dist, dist_params, rho, m)
surpyval/recurrent/renewal/ari.py:106
↓ 2 callersMethod_mom
MOM: Method of Moments for the beta distribution has an analytic answer
surpyval/univariate/parametric/distributions/beta.py:406
↓ 2 callersMethod_new_sequence_sampler
Return a callable ``sample(ui) -> xi`` that draws the next interarrival time from a uniform random number, maintaining any per-sequen
surpyval/recurrent/simulation.py:57
← previousnext →101–200 of 1,523, ranked by callers