Cox PH estimators

Cox proportional hazards with Breslow ties. Right-censored survival data: fit signature is fit(X, time, event) instead of fit(X, y). No intercept — the baseline hazard absorbs it.

predict(X) returns the prognostic index η = Xβ (higher → shorter survival); same as decision_function(X). There’s no predict_proba on Cox — we don’t ship the baseline-hazard estimator yet (M3.7 roadmap), so survival probabilities aren’t directly available.

Scalar — single λ

class skein_glm.estimators.CoxMCPRegressor(lambda_=0.1, gamma=3.0, *, ties='breslow', weights=None, max_iter=100, tol=1e-06, standardize=False, acceleration=5, max_outer=10, outer_tol=1e-06)[source]

Bases: _CoxRegressorBase

Cox PH regression with MCP penalty at a single λ (prox-Newton).

Parameters:
  • lambda_ (float)

  • gamma (float)

  • ties (str)

  • weights (NDArray[np.float64] | None)

  • max_iter (int)

  • tol (float)

  • standardize (bool)

  • acceleration (int | None)

  • max_outer (int)

  • outer_tol (float)

set_decision_function_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the decision_function method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to decision_function if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to decision_function.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
  • x (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for x parameter in decision_function.

  • self (CoxMCPRegressor)

Returns:

self – The updated object.

Return type:

object

set_fit_request(*, event='$UNCHANGED$', time='$UNCHANGED$', x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the fit method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to fit if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to fit.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
  • event (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for event parameter in fit.

  • time (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for time parameter in fit.

  • x (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for x parameter in fit.

  • self (CoxMCPRegressor)

Returns:

self – The updated object.

Return type:

object

set_predict_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the predict method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to predict if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to predict.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

class skein_glm.estimators.CoxSCADRegressor(lambda_=0.1, a=3.7, *, ties='breslow', weights=None, max_iter=100, tol=1e-06, standardize=False, acceleration=5, max_outer=10, outer_tol=1e-06)[source]

Bases: _CoxRegressorBase

Cox PH regression with SCAD penalty at a single λ.

Parameters:
  • lambda_ (float)

  • a (float)

  • ties (str)

  • weights (NDArray[np.float64] | None)

  • max_iter (int)

  • tol (float)

  • standardize (bool)

  • acceleration (int | None)

  • max_outer (int)

  • outer_tol (float)

set_decision_function_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the decision_function method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to decision_function if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to decision_function.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
  • x (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for x parameter in decision_function.

  • self (CoxSCADRegressor)

Returns:

self – The updated object.

Return type:

object

set_fit_request(*, event='$UNCHANGED$', time='$UNCHANGED$', x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the fit method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to fit if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to fit.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
  • event (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for event parameter in fit.

  • time (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for time parameter in fit.

  • x (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for x parameter in fit.

  • self (CoxSCADRegressor)

Returns:

self – The updated object.

Return type:

object

set_predict_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the predict method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to predict if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to predict.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

Scalar — path

class skein_glm.estimators.CoxMCPPathRegressor(gamma=3.0, *, lambdas=None, n_lambdas=100, lambda_min_ratio=0.001, ties='breslow', weights=None, max_iter=100, tol=1e-06, standardize=False, acceleration=5, max_outer=10, outer_tol=1e-06)[source]

Bases: _CoxPathRegressorBase

Cox PH regression with MCP penalty along an entire λ-path.

Parameters:
  • gamma (float)

  • lambdas (NDArray[np.float64] | None)

  • n_lambdas (int)

  • lambda_min_ratio (float)

  • ties (str)

  • weights (NDArray[np.float64] | None)

  • max_iter (int)

  • tol (float)

  • standardize (bool)

  • acceleration (int | None)

  • max_outer (int)

  • outer_tol (float)

set_decision_function_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the decision_function method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to decision_function if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to decision_function.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

set_fit_request(*, event='$UNCHANGED$', time='$UNCHANGED$', x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the fit method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to fit if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to fit.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
  • event (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for event parameter in fit.

  • time (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for time parameter in fit.

  • x (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for x parameter in fit.

  • self (CoxMCPPathRegressor)

Returns:

self – The updated object.

Return type:

object

set_predict_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the predict method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to predict if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to predict.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

class skein_glm.estimators.CoxSCADPathRegressor(a=3.7, *, lambdas=None, n_lambdas=100, lambda_min_ratio=0.001, ties='breslow', weights=None, max_iter=100, tol=1e-06, standardize=False, acceleration=5, max_outer=10, outer_tol=1e-06)[source]

Bases: _CoxPathRegressorBase

Cox PH regression with SCAD penalty along an entire λ-path.

Parameters:
  • a (float)

  • lambdas (NDArray[np.float64] | None)

  • n_lambdas (int)

  • lambda_min_ratio (float)

  • ties (str)

  • weights (NDArray[np.float64] | None)

  • max_iter (int)

  • tol (float)

  • standardize (bool)

  • acceleration (int | None)

  • max_outer (int)

  • outer_tol (float)

set_decision_function_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the decision_function method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to decision_function if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to decision_function.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

set_fit_request(*, event='$UNCHANGED$', time='$UNCHANGED$', x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the fit method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to fit if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to fit.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
  • event (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for event parameter in fit.

  • time (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for time parameter in fit.

  • x (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for x parameter in fit.

  • self (CoxSCADPathRegressor)

Returns:

self – The updated object.

Return type:

object

set_predict_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the predict method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to predict if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to predict.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

Group — single λ

class skein_glm.estimators.CoxGroupLassoRegressor(groups, lambda_=0.1, *, ties='breslow', weights=None, max_iter=100, tol=1e-06, standardize=False, acceleration=5, max_outer=10, outer_tol=1e-06)[source]

Bases: _CoxGroupSingleLambdaBase

Cox PH with group lasso at a single λ.

Parameters:
  • groups (NDArray[np.int64])

  • lambda_ (float)

  • ties (str)

  • weights (NDArray[np.float64] | None)

  • max_iter (int)

  • tol (float)

  • standardize (bool)

  • acceleration (int | None)

  • max_outer (int)

  • outer_tol (float)

set_decision_function_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the decision_function method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to decision_function if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to decision_function.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

set_fit_request(*, event='$UNCHANGED$', time='$UNCHANGED$', x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the fit method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to fit if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to fit.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
  • event (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for event parameter in fit.

  • time (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for time parameter in fit.

  • x (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for x parameter in fit.

  • self (CoxGroupLassoRegressor)

Returns:

self – The updated object.

Return type:

object

set_predict_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the predict method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to predict if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to predict.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

class skein_glm.estimators.CoxGroupMCPRegressor(groups, lambda_=0.1, gamma=3.0, *, ties='breslow', weights=None, max_iter=100, tol=1e-06, standardize=False, acceleration=5, max_outer=10, outer_tol=1e-06)[source]

Bases: _CoxGroupSingleLambdaBase

Cox PH with group MCP at a single λ (prox-Newton + LLA).

Parameters:
  • groups (NDArray[np.int64])

  • lambda_ (float)

  • gamma (float)

  • ties (str)

  • weights (NDArray[np.float64] | None)

  • max_iter (int)

  • tol (float)

  • standardize (bool)

  • acceleration (int | None)

  • max_outer (int)

  • outer_tol (float)

set_decision_function_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the decision_function method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to decision_function if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to decision_function.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

set_fit_request(*, event='$UNCHANGED$', time='$UNCHANGED$', x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the fit method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to fit if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to fit.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
  • event (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for event parameter in fit.

  • time (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for time parameter in fit.

  • x (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for x parameter in fit.

  • self (CoxGroupMCPRegressor)

Returns:

self – The updated object.

Return type:

object

set_predict_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the predict method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to predict if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to predict.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

class skein_glm.estimators.CoxSparseGroupLassoRegressor(groups, lambda_=0.1, alpha=0.5, *, ties='breslow', weights=None, max_iter=100, tol=1e-06, standardize=False, acceleration=5, max_outer=10, outer_tol=1e-06)[source]

Bases: _CoxGroupSingleLambdaBase

Cox PH with sparse-group lasso at a single λ.

Parameters:
  • groups (NDArray[np.int64])

  • lambda_ (float)

  • alpha (float)

  • ties (str)

  • weights (NDArray[np.float64] | None)

  • max_iter (int)

  • tol (float)

  • standardize (bool)

  • acceleration (int | None)

  • max_outer (int)

  • outer_tol (float)

set_decision_function_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the decision_function method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to decision_function if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to decision_function.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

set_fit_request(*, event='$UNCHANGED$', time='$UNCHANGED$', x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the fit method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to fit if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to fit.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
  • event (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for event parameter in fit.

  • time (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for time parameter in fit.

  • x (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for x parameter in fit.

  • self (CoxSparseGroupLassoRegressor)

Returns:

self – The updated object.

Return type:

object

set_predict_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the predict method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to predict if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to predict.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

class skein_glm.estimators.CoxSparseGroupMCPRegressor(groups, lambda_=0.1, gamma=3.0, alpha=0.5, *, ties='breslow', weights=None, coord_weights=None, max_iter=100, tol=1e-06, standardize=False, acceleration=5, max_outer=10, outer_tol=1e-06)[source]

Bases: _CoxGroupSingleLambdaBase

Cox PH with sparse-group MCP at a single λ.

Parameters:
  • groups (NDArray[np.int64])

  • lambda_ (float)

  • gamma (float)

  • alpha (float)

  • ties (str)

  • weights (NDArray[np.float64] | None)

  • coord_weights (NDArray[np.float64] | None)

  • max_iter (int)

  • tol (float)

  • standardize (bool)

  • acceleration (int | None)

  • max_outer (int)

  • outer_tol (float)

set_decision_function_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the decision_function method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to decision_function if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to decision_function.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

set_fit_request(*, event='$UNCHANGED$', time='$UNCHANGED$', x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the fit method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to fit if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to fit.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
  • event (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for event parameter in fit.

  • time (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for time parameter in fit.

  • x (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for x parameter in fit.

  • self (CoxSparseGroupMCPRegressor)

Returns:

self – The updated object.

Return type:

object

set_predict_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the predict method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to predict if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to predict.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

class skein_glm.estimators.CoxSparseGroupSCADRegressor(groups, lambda_=0.1, a=3.7, alpha=0.5, *, ties='breslow', weights=None, coord_weights=None, max_iter=100, tol=1e-06, standardize=False, acceleration=5, max_outer=10, outer_tol=1e-06)[source]

Bases: _CoxGroupSingleLambdaBase

Cox PH with sparse-group SCAD at a single λ. SCAD shape a > 2 (default 3.7).

Parameters:
  • groups (NDArray[np.int64])

  • lambda_ (float)

  • a (float)

  • alpha (float)

  • ties (str)

  • weights (NDArray[np.float64] | None)

  • coord_weights (NDArray[np.float64] | None)

  • max_iter (int)

  • tol (float)

  • standardize (bool)

  • acceleration (int | None)

  • max_outer (int)

  • outer_tol (float)

set_decision_function_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the decision_function method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to decision_function if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to decision_function.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

set_fit_request(*, event='$UNCHANGED$', time='$UNCHANGED$', x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the fit method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to fit if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to fit.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
  • event (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for event parameter in fit.

  • time (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for time parameter in fit.

  • x (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for x parameter in fit.

  • self (CoxSparseGroupSCADRegressor)

Returns:

self – The updated object.

Return type:

object

set_predict_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the predict method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to predict if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to predict.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

Group — path

class skein_glm.estimators.CoxGroupLassoPathRegressor(groups, *, lambdas=None, n_lambdas=100, lambda_min_ratio=0.001, ties='breslow', weights=None, max_iter=100, tol=1e-06, standardize=False, acceleration=5, max_outer=10, outer_tol=1e-06)[source]

Bases: _CoxGroupPathBase

Cox PH with group lasso along an entire λ-path.

Parameters:
  • groups (NDArray[np.int64])

  • lambdas (NDArray[np.float64] | None)

  • n_lambdas (int)

  • lambda_min_ratio (float)

  • ties (str)

  • weights (NDArray[np.float64] | None)

  • max_iter (int)

  • tol (float)

  • standardize (bool)

  • acceleration (int | None)

  • max_outer (int)

  • outer_tol (float)

set_decision_function_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the decision_function method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to decision_function if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to decision_function.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

set_fit_request(*, event='$UNCHANGED$', time='$UNCHANGED$', x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the fit method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to fit if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to fit.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
  • event (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for event parameter in fit.

  • time (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for time parameter in fit.

  • x (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for x parameter in fit.

  • self (CoxGroupLassoPathRegressor)

Returns:

self – The updated object.

Return type:

object

set_predict_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the predict method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to predict if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to predict.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

class skein_glm.estimators.CoxGroupMCPPathRegressor(groups, gamma=3.0, *, lambdas=None, n_lambdas=100, lambda_min_ratio=0.001, ties='breslow', weights=None, max_iter=100, tol=1e-06, standardize=False, acceleration=5, max_outer=10, outer_tol=1e-06)[source]

Bases: _CoxGroupPathBase

Cox PH with group MCP along an entire λ-path.

Parameters:
  • groups (NDArray[np.int64])

  • gamma (float)

  • lambdas (NDArray[np.float64] | None)

  • n_lambdas (int)

  • lambda_min_ratio (float)

  • ties (str)

  • weights (NDArray[np.float64] | None)

  • max_iter (int)

  • tol (float)

  • standardize (bool)

  • acceleration (int | None)

  • max_outer (int)

  • outer_tol (float)

set_decision_function_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the decision_function method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to decision_function if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to decision_function.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

set_fit_request(*, event='$UNCHANGED$', time='$UNCHANGED$', x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the fit method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to fit if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to fit.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
  • event (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for event parameter in fit.

  • time (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for time parameter in fit.

  • x (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for x parameter in fit.

  • self (CoxGroupMCPPathRegressor)

Returns:

self – The updated object.

Return type:

object

set_predict_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the predict method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to predict if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to predict.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

class skein_glm.estimators.CoxSparseGroupLassoPathRegressor(groups, alpha=0.5, *, lambdas=None, n_lambdas=100, lambda_min_ratio=0.001, ties='breslow', weights=None, max_iter=100, tol=1e-06, standardize=False, acceleration=5, max_outer=10, outer_tol=1e-06)[source]

Bases: _CoxGroupPathBase

Cox PH with sparse-group lasso along an entire λ-path.

Parameters:
  • groups (NDArray[np.int64])

  • alpha (float)

  • lambdas (NDArray[np.float64] | None)

  • n_lambdas (int)

  • lambda_min_ratio (float)

  • ties (str)

  • weights (NDArray[np.float64] | None)

  • max_iter (int)

  • tol (float)

  • standardize (bool)

  • acceleration (int | None)

  • max_outer (int)

  • outer_tol (float)

set_decision_function_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the decision_function method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to decision_function if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to decision_function.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

set_fit_request(*, event='$UNCHANGED$', time='$UNCHANGED$', x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the fit method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to fit if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to fit.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
  • event (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for event parameter in fit.

  • time (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for time parameter in fit.

  • x (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for x parameter in fit.

  • self (CoxSparseGroupLassoPathRegressor)

Returns:

self – The updated object.

Return type:

object

set_predict_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the predict method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to predict if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to predict.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

class skein_glm.estimators.CoxSparseGroupMCPPathRegressor(groups, gamma=3.0, alpha=0.5, *, lambdas=None, n_lambdas=100, lambda_min_ratio=0.001, ties='breslow', weights=None, coord_weights=None, max_iter=100, tol=1e-06, standardize=False, acceleration=5, max_outer=10, outer_tol=1e-06)[source]

Bases: _CoxGroupPathBase

Cox PH with sparse-group MCP along an entire λ-path.

Parameters:
  • groups (NDArray[np.int64])

  • gamma (float)

  • alpha (float)

  • lambdas (NDArray[np.float64] | None)

  • n_lambdas (int)

  • lambda_min_ratio (float)

  • ties (str)

  • weights (NDArray[np.float64] | None)

  • coord_weights (NDArray[np.float64] | None)

  • max_iter (int)

  • tol (float)

  • standardize (bool)

  • acceleration (int | None)

  • max_outer (int)

  • outer_tol (float)

set_decision_function_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the decision_function method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to decision_function if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to decision_function.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

set_fit_request(*, event='$UNCHANGED$', time='$UNCHANGED$', x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the fit method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to fit if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to fit.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
  • event (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for event parameter in fit.

  • time (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for time parameter in fit.

  • x (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for x parameter in fit.

  • self (CoxSparseGroupMCPPathRegressor)

Returns:

self – The updated object.

Return type:

object

set_predict_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the predict method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to predict if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to predict.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

class skein_glm.estimators.CoxSparseGroupSCADPathRegressor(groups, a=3.7, alpha=0.5, *, lambdas=None, n_lambdas=100, lambda_min_ratio=0.001, ties='breslow', weights=None, coord_weights=None, max_iter=100, tol=1e-06, standardize=False, acceleration=5, max_outer=10, outer_tol=1e-06)[source]

Bases: _CoxGroupPathBase

Cox PH with sparse-group SCAD along an entire λ-path.

Parameters:
  • groups (NDArray[np.int64])

  • a (float)

  • alpha (float)

  • lambdas (NDArray[np.float64] | None)

  • n_lambdas (int)

  • lambda_min_ratio (float)

  • ties (str)

  • weights (NDArray[np.float64] | None)

  • coord_weights (NDArray[np.float64] | None)

  • max_iter (int)

  • tol (float)

  • standardize (bool)

  • acceleration (int | None)

  • max_outer (int)

  • outer_tol (float)

set_decision_function_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the decision_function method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to decision_function if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to decision_function.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object

set_fit_request(*, event='$UNCHANGED$', time='$UNCHANGED$', x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the fit method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to fit if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to fit.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
  • event (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for event parameter in fit.

  • time (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for time parameter in fit.

  • x (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for x parameter in fit.

  • self (CoxSparseGroupSCADPathRegressor)

Returns:

self – The updated object.

Return type:

object

set_predict_request(*, x='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the predict method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to predict if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to predict.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Parameters:
Returns:

self – The updated object.

Return type:

object