MCPcopy Create free account

hub / github.com/derrynknife/SurPyval / functions

Functions1,523 in github.com/derrynknife/SurPyval

↓ 229 callersMethodfit
Fit the ARA model. Parameters ---------- x : array_like An array of event times. i : array_like
surpyval/recurrent/renewal/ara.py:205
↓ 187 callersMethodsum
(self, values)
surpyval/univariate/regression/proportional_hazards/cox_ph.py:47
↓ 69 callersMethodrandom
(cls, size)
surpyval/univariate/parametric/__init__.py:60
↓ 65 callersMethodmax
(self, values)
surpyval/univariate/regression/proportional_hazards/cox_ph.py:58
↓ 65 callersMethodsf
(self, x)
surpyval/experimental/series.py:29
↓ 49 callersMethodfrom_params
Create a model instance directly from parameters without fitting. Parameters ---------- params: array_like
surpyval/recurrent/parametric/nhpp_fitter.py:228
↓ 39 callersMethodqf
r""" The quantile function for a distribution using the parameters found in the ``.params`` attribute. Parameters --
surpyval/univariate/parametric/parametric.py:517
↓ 35 callersFunctionxcnt_handler
Main handler that ensures any input to a surpyval fitter meets the requirements to be used in one of the parametric or nonparametric fitters.
surpyval/utils/__init__.py:406
↓ 32 callersMethodcb
r""" Confidence bounds of the ``on`` function at the ``alpa_ci`` level of significance. Can be the upper, lower, or two-sided confiden
surpyval/univariate/parametric/parametric.py:804
↓ 30 callersMethodmean
r""" The mean of the distribution using the parameters found in the ``.params`` attribute. Returns ------- me
surpyval/univariate/parametric/parametric.py:707
↓ 29 callersFunctionhandle_xicn
( x: npt.ArrayLike, i: npt.ArrayLike | None = None, c: npt.ArrayLike | None = None, n: npt.Arr
surpyval/utils/recurrent_utils.py:89
↓ 23 callersFunctionconst
(x)
surpyval/univariate/parametric/fitters/__init__.py:134
↓ 20 callersMethodcdf
(self, u, v, *params)
surpyval/multivariate/parametric/copula/copula.py:49
↓ 17 callersMethoddf
(self, x)
surpyval/experimental/series.py:38
↓ 16 callersMethodff
(self, x)
surpyval/experimental/series.py:34
↓ 16 callersMethodfit_from_df
r""" The central feature to SurPyval's capability. This function aimed to have an API to mimic the simplicity of the scipy API. That i
surpyval/univariate/parametric/parametric_fitter.py:633
↓ 15 callersFunctionfsli_handler
Takes in the fsli format and ensures that the data is correctly defined. Takes an assorted combination of f, s, l, and i and returns them in
surpyval/utils/__init__.py:134
↓ 15 callersFunctionlaplace
r""" The Laplace (centroid) trend test for recurrent-event data. Under the null hypothesis that the events of each system follow a homoge
surpyval/recurrent/tests.py:222
↓ 15 callersMethodto_xrd
Converts the data into the xrd format. If the data has right truncated observations or left or interval censored observations, the da
surpyval/utils/surpyval_data.py:165
↓ 14 callersMethodmcf
Estimate the mean cumulative function (MCF) at ``x``. These models have no closed-form cumulative intensity, so the MCF is e
surpyval/recurrent/simulation.py:308
↓ 13 callersMethodcif
Cumulative intensity function (CIF) of the HPP model. Parameters ---------- x : array_like The values at
surpyval/recurrent/parametric/hpp.py:95
↓ 13 callersMethodfit_from_parameters
Build an ARA model from given parameters. Parameters ---------- params : list Parameters for the underl
surpyval/recurrent/renewal/ara.py:237
↓ 12 callersMethodHf
(self, x)
surpyval/experimental/series.py:46
↓ 11 callersMethodfit
r""" Fit the Binomial distribution for a known number of trials, ``n_trials``, using the closed-form maximum likelihood estimate of
surpyval/univariate/parametric/distributions/binomial.py:334
↓ 11 callersFunctionxrd_handler
Takes a combination of 'x', 'r', and 'd' arrays and ensures that the data is feasible. Does not check for the case where r is always dec
surpyval/utils/__init__.py:216
↓ 10 callersFunction_make_df
(seed=0, n=200)
surpyval/tests/univariate/regression/test_dataframe_fit.py:14
↓ 10 callersMethod_set_support
Resolve and assign the fitted model's support interval. For an offset model the left edge is the fitted ``gamma``; otherwise each edg
surpyval/univariate/parametric/parametric_fitter.py:890
↓ 9 callersMethodcif
(self, x, rate)
surpyval/recurrent/regression/nhpp_proportional_intensity.py:69
↓ 9 callersMethodfit_from_surpyval_data
The central feature to SurPyval's capability. This function aimed to have an API to mimic the simplicity of the scipy API. That is,
surpyval/univariate/parametric/parametric_fitter.py:918
↓ 9 callersFunctionplotting_positions
This function takes in data in the xcnt format and outputs an approximation of the CDF. This function can be used to produce estimates of F u
surpyval/univariate/nonparametric/plotting_positions.py:8
↓ 8 callersFunctionAFT
Create an Accelerated Failure Time fitter for the given distribution. Uses exp(beta'Z) as the acceleration factor — the standard statistical
surpyval/univariate/regression/accelerated_failure_time/aft_fitter.py:171
↓ 8 callersFunctionPO
Create a Proportional Odds fitter for the given distribution. Uses exp(beta'Z) as the odds multiplier — the standard parameterisation fo
surpyval/univariate/regression/proportional_odds/proportional_odds_fitter.py:211
↓ 8 callersFunction_make_model
(params, gamma=0.0)
surpyval/tests/univariate/parametric/test_fit_helpers.py:141
↓ 8 callersMethodadd_covariates
Method to add covariates to the data. The covariates are stored in the Z attribute of the object. When doing regression survival anal
surpyval/utils/surpyval_data.py:120
↓ 8 callersMethodband
r""" Simultaneous confidence band of the survival function. The pointwise bounds from ``cb()`` cover the true value of the su
surpyval/univariate/nonparametric/nonparametric.py:857
↓ 8 callersFunctionbounds_convert
This function is used to transform the parameters from the bounded parameter space to the unbounded parameter space. This is an improvement
surpyval/univariate/parametric/fitters/__init__.py:75
↓ 8 callersMethodff
(cls, x)
surpyval/univariate/parametric/__init__.py:52
↓ 8 callersFunctionmil_hdbk_189c
r""" The Military Handbook (MIL-HDBK-189C) trend test for recurrent-event data. Derived from the power-law (Crow-AMSAA) NHPP, the statistic
surpyval/recurrent/tests.py:318
↓ 8 callersMethodto_json
Serialize SurpyvalData to JSON format. Parameters ---------- filepath : str | Path, optional If provided
surpyval/utils/surpyval_data.py:235
↓ 7 callersMethod_phi
(self, Z, *phi_params)
surpyval/univariate/regression/proportional_odds/proportional_odds_fitter.py:49
↓ 7 callersMethodbootstrap_cb
r""" Confidence bounds of the survival function computed with a non-parametric bootstrap: the data are resampled with replacem
surpyval/univariate/nonparametric/nonparametric.py:714
↓ 7 callersMethoddimension
Return ``(x, c, xl, xr, tl, tr)`` arrays for series ``d``.
surpyval/multivariate/parametric/data.py:101
↓ 7 callersMethodff
Alias of :meth:`cdf` for consistency with surpyval naming.
surpyval/multivariate/parametric/copula/copula_model.py:59
↓ 7 callersMethodkendall_tau
Kendall's tau. Default: empirical estimate from a large sample.
surpyval/multivariate/parametric/copula/copula.py:71
↓ 7 callersMethodlog_sf
(self, x, alpha, beta)
surpyval/univariate/parametric/distributions/gamma.py:450
↓ 7 callersMethodparam_cb
Method to calculate the confidence bound on a parameter.
surpyval/univariate/parametric/parametric.py:259
↓ 7 callersFunctionxcnt_to_xrd
Converts the xcn format to the xrd format. Parameters ---------- x: array array of values of variable for which observations
surpyval/utils/__init__.py:739
↓ 6 callersMethod_apply_model_function_to_trees
( self, function_name: str, x: int | float | ArrayLike, Z: ArrayLike | NDArray
surpyval/experimental/forest/forest.py:155
↓ 6 callersMethod_clip_rho
(rho)
surpyval/multivariate/parametric/copula/elliptical.py:26
↓ 6 callersMethod_initial_guess
Derive an initial parameter vector for the iterative fitters. Builds a working copy of the data with interval- and left-censored poin
surpyval/univariate/parametric/parametric_fitter.py:795
↓ 6 callersMethod_prepare_Z
Convert ``Z`` to a numeric design matrix. If a pandas DataFrame is passed and the model was fit from a DataFrame, the covari
surpyval/univariate/regression/parametric_regression_model.py:61
↓ 6 callersMethod_prepare_dim
Transform one dimension's data into copula (u-space) arrays.
surpyval/multivariate/parametric/copula/copula.py:192
↓ 6 callersFunctionari_reduction
Intensity reduction ``R_n`` in force just after the most recent failure for the Arithmetic Reduction of Intensity model with memory ``m`` (Do
surpyval/recurrent/renewal/ari.py:15
↓ 6 callersMethodcif
Compute the cumulative incidence function of the model with the parameters found by the fit method. Parameters ----
surpyval/recurrent/regression/proportional_intensity.py:59
↓ 6 callersMethodcount_terminated_simulation
Simulate count-terminated recurrence data based on the fitted model. Parameters ---------- events: int
surpyval/recurrent/simulation.py:232
↓ 6 callersMethodfit_from_recurrent_data
Fit the ARA model from recurrent data. Parameters ---------- data : RecurrentData Data containing the r
surpyval/recurrent/renewal/ara.py:151
↓ 6 callersFunctionlog_rank_split_xZc
Call log_rank_split() from x-Z-c arrays.
surpyval/tests/experimental/forest/test_log_rank_split.py:7
↓ 6 callersMethodmpp_y_transform
(self, y, *params)
surpyval/univariate/parametric/distributions/gamma.py:453
↓ 6 callersMethodpdf
``d2C/du dv`` -- the copula density. autograd default.
surpyval/multivariate/parametric/copula/copula.py:64
↓ 6 callersMethodphi
(self, Z: ndarray, *params: float)
surpyval/univariate/regression/accelerated_life/power.py:35
↓ 6 callersMethodplot
A method to do a probability plot Parameters ---------- heuristic : {'Blom', 'Median', 'ECDF', 'Modal', 'Midpoint',
surpyval/univariate/parametric/parametric.py:1167
↓ 6 callersMethodto_dict
(self, with_data: bool = False)
surpyval/univariate/parametric/parametric.py:177
↓ 5 callersMethodHf
(self, x, Z, *params)
surpyval/univariate/regression/accelerated_failure_time/accelerated_failure_time.py:31
↓ 5 callersMethodHf
(self, x, Z, *params)
surpyval/univariate/regression/proportional_hazards/proportional_hazards_fitter.py:57
↓ 5 callersMethodHf
(self, x, Z, *params)
surpyval/univariate/regression/accelerated_life/parameter_substitution.py:61
↓ 5 callersMethod_check_fitted
(self)
surpyval/recurrent/inference.py:60
↓ 5 callersFunction_get_idx
Function to get the indices for a given vector of x values
surpyval/utils/__init__.py:1005
↓ 5 callersMethod_pair_loglik
Per-row log-likelihood for two prepared dimensions ``d0, d1``.
surpyval/multivariate/parametric/copula/copula.py:145
↓ 5 callersFunction_parametric_model
()
surpyval/tests/test_distribution_abc.py:20
↓ 5 callersMethodapply_model_function
( self, function_name: str, x: int | float | ArrayLike, Z: ArrayLike | NDArray
surpyval/experimental/forest/tree.py:82
↓ 5 callersFunctionat_risk_beta_Z
(arr, n, gb_x)
surpyval/univariate/regression/proportional_hazards/cox_ph.py:138
↓ 5 callersMethodcreate_negll_func
(self, data, dist, m)
surpyval/recurrent/renewal/ara.py:122
↓ 5 callersMethoddf
r""" The density function for a distribution using the parameters found in the ``.params`` attribute. Parameters ---
surpyval/univariate/parametric/parametric.py:385
↓ 5 callersMethodentropy
r""" The entropy of the distribution using the parameters found in the ``.params`` attribute. Returns -------
surpyval/univariate/parametric/parametric.py:780
↓ 5 callersMethodfit
Parameters ---------- x : array like, optional Array of observations of the random variables. If x is
surpyval/univariate/parametric/mixture_model.py:143
↓ 5 callersMethodfrom_dict
(cls, model_dict: dict)
surpyval/univariate/parametric/parametric.py:127
↓ 5 callersMethodget_previous_x
Finds the previous event time for each event. This is useful for calculating the time since the last event. This method returns the
surpyval/utils/recurrent_event_data.py:220
↓ 5 callersMethodlog_df
(self, x, alpha, beta)
surpyval/univariate/parametric/distributions/beta.py:374
↓ 5 callersMethodphi_init
(self, life: float, Z: ndarray)
surpyval/univariate/regression/accelerated_life/power.py:38
↓ 5 callersMethodsample_uv
Draw ``(u, v)`` pairs by conditional inversion of the h-function. ``u`` is uniform; given ``u`` and a uniform ``w``, ``v`` solves ``d
surpyval/multivariate/parametric/copula/copula.py:93
↓ 5 callersMethodstandard_errors
Standard errors of the fitted parameters (the square roots of the diagonal of :meth:`covariance`), ordered to match :attr:`pa
surpyval/recurrent/inference.py:118
↓ 5 callersMethodtime_terminated_simulation
Simulate time-terminated recurrence data based on the fitted model. Parameters ---------- T: float Time
surpyval/recurrent/simulation.py:263
↓ 5 callersMethodvar
r""" The variance of the distribution using the parameters found in the ``.params`` attribute. Returns -------
surpyval/univariate/parametric/parametric.py:728
↓ 4 callersMethodHf
(self, x, Z, *params)
surpyval/univariate/regression/accelerated_failure_time/aft_fitter.py:56
↓ 4 callersMethod_as_2d
(x)
surpyval/multivariate/parametric/data.py:90
↓ 4 callersMethod_attach_inference
Store the fit artefacts and the attributes :class:`LikelihoodInferenceMixin` needs: ``_neg_ll`` (the negative log-likelihood
surpyval/recurrent/renewal/fit_mixin.py:90
↓ 4 callersFunction_censored_model
()
surpyval/tests/univariate/nonparametric/test_bands_and_hazard.py:8
↓ 4 callersMethod_clamp_truncation_to_support
Clamp the truncation bounds to the distribution's support. Returns the left and right truncation arrays with any value that falls out
surpyval/univariate/parametric/parametric_fitter.py:777
↓ 4 callersMethod_emp_tau
Empirical Kendall's tau over rows where both dims are observed.
surpyval/multivariate/parametric/copula/copula.py:367
↓ 4 callersFunction_example_data
()
surpyval/tests/recurrent/test_competing_risks.py:7
↓ 4 callersMethod_f
(self, f, x, event)
surpyval/univariate/competing_risks/nonparametric/competing_risks.py:34
↓ 4 callersFunction_fit
()
surpyval/tests/recurrent/test_regression_simulation.py:22
↓ 4 callersFunction_fitted_model
(m=2, seed=0)
surpyval/tests/univariate/parametric/test_mixture_model.py:11
↓ 4 callersMethod_multistart
Drive the multi-start fit. ``fit_once(x0) -> OptimizeResult`` runs the optimiser from a single natural-space start ``x0``. With no us
surpyval/recurrent/renewal/fit_mixin.py:63
↓ 4 callersMethod_parameter_initialiser
(self, x, c=None, n=None, t=None, offset=False)
surpyval/univariate/parametric/distributions/beta.py:22
↓ 4 callersFunction_recover
(cop, true_p, seed)
surpyval/tests/multivariate/test_archimedean.py:45
↓ 4 callersMethod_uv
(self, x)
surpyval/multivariate/parametric/copula/copula_model.py:31
↓ 4 callersMethodcount_terminated_simulation_data
Simulate count-terminated recurrence data and return the raw events. Unlike :meth:`count_terminated_simulation` (which returns the f
surpyval/recurrent/simulation.py:148
↓ 4 callersMethoddu
``dC/du`` -- the h-function. autograd default; override if known.
surpyval/multivariate/parametric/copula/copula.py:52
↓ 4 callersMethodff
The cumulative density function of the fitted model. Parameters ---------- x : array like The values at
surpyval/univariate/parametric/mixture_model.py:268
next →1–100 of 1,523, ranked by callers