LS estimators (Gaussian)

Least-squares datafit with the seven skein penalty families. All 14 classes follow the same shape:

  • Scalar penalty + single λ: MCPRegressor, SCADRegressor, ElasticNetRegressor, BridgeRegressor.

  • Scalar penalty + path: MCPPathRegressor, SCADPathRegressor, ElasticNetPathRegressor, BridgePathRegressor.

  • Group penalty + single λ: GroupLassoRegressor, GroupMCPRegressor, GroupElasticNetRegressor, SparseGroupLassoRegressor, SparseGroupMCPRegressor, SparseGroupSCADRegressor.

  • Group penalty + path: their *PathRegressor siblings.

For multi-response Y (shape (n, K)) with joint feature selection, see Multi-task estimators.

Single-λ classes are useful when you’ve already chosen λ (via CV externally, prior knowledge, etc.); path classes are the workhorse for any analysis that picks λ post-hoc.

Scalar — single λ

class skein_glm.estimators.MCPRegressor(lambda_=0.1, gamma=3.0, *, weights=None, max_iter=100, tol=1e-06, fit_intercept=True, standardize=False, screening='strong', acceleration=5)[source]

Bases: _NonconvexRegressorBase

MCP-penalized least squares at a single λ.

The single-λ companion to MCPPathRegressor. Use this when you’ve already chosen lambda_ (via external CV, prior knowledge, etc.); use MCPPathRegressor or skein_glm.MCPPathCV when you want to fit a full path or have skein_glm pick λ for you.

Parameters:
  • lambda (float, default 0.1) – Regularization strength. Larger → more sparsity.

  • gamma (float, default 3.0) – MCP nonconvexity (>1). gamma=1e6 is ≈ lasso.

  • weights (array-like of shape (n_features,) or None) – Per-feature penalty weights.

  • max_iter (int, default 100)

  • tol (float, default 1e-6)

  • fit_intercept (bool, default True)

  • standardize (bool, default False)

  • screening ({"off", "strong", "gap_safe"}, default "strong")

  • acceleration (int or None, default 5)

  • lambda_ (float)

coef_
Type:

ndarray of shape (n_features,)

intercept_
Type:

float

info_
Type:

dict

n_features_in_
Type:

int

See also

skein_glm.MCPPathRegressor

Full λ-path with warm starts.

set_fit_request(*, 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:
  • x (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for x parameter in fit.

  • self (MCPRegressor)

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:
  • x (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for x parameter in predict.

  • self (MCPRegressor)

Returns:

self – The updated object.

Return type:

object

set_score_request(*, sample_weight='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the score 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 score 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 score.

  • 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:
  • sample_weight (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for sample_weight parameter in score.

  • self (MCPRegressor)

Returns:

self – The updated object.

Return type:

object

class skein_glm.estimators.SCADRegressor(lambda_=0.1, a=3.7, *, weights=None, max_iter=100, tol=1e-06, fit_intercept=True, standardize=False, screening='strong', acceleration=5)[source]

Bases: _NonconvexRegressorBase

Least-squares regression with SCAD penalty at a single λ.

Parameters:
  • lambda_ (float)

  • a (float)

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

  • max_iter (int)

  • tol (float)

  • fit_intercept (bool)

  • standardize (bool)

  • screening (str)

  • acceleration (int | None)

set_fit_request(*, 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:
  • x (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for x parameter in fit.

  • self (SCADRegressor)

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:
  • x (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for x parameter in predict.

  • self (SCADRegressor)

Returns:

self – The updated object.

Return type:

object

set_score_request(*, sample_weight='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the score 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 score 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 score.

  • 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:
  • sample_weight (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for sample_weight parameter in score.

  • self (SCADRegressor)

Returns:

self – The updated object.

Return type:

object

class skein_glm.estimators.ElasticNetRegressor(lambda_=0.1, alpha=0.5, *, weights=None, max_iter=100, tol=1e-06, fit_intercept=True, standardize=False, screening='strong', acceleration=5)[source]

Bases: _NonconvexRegressorBase

Elastic-net least squares at a single λ.

Convex penalty α λ |β_j| + (1-α) λ β_j² / 2 per feature. alpha = 1 recovers pure lasso (≈ MCPRegressor at large γ); alpha = 0 recovers pure ridge. Matches glmnet’s cv.glmnet(family="gaussian", alpha=...) shape.

Parameters:
  • lambda (float, default 0.1)

  • alpha (float, default 0.5) – Convex combination weight: α=1 is lasso, α=0 is ridge, intermediate is elastic net. Must be in [0, 1].

  • weights (array-like of shape (n_features,) or None) – Per-feature penalty weights; apply to both L1 and L2 parts.

  • max_iter (int, default 100)

  • tol (float, default 1e-6)

  • fit_intercept (bool, default True)

  • standardize (bool, default False)

  • screening ({"off", "strong", "gap_safe"}, default "strong")

  • acceleration (int or None, default 5)

  • lambda_ (float)

coef_
Type:

ndarray of shape (n_features,)

intercept_
Type:

float

info_
Type:

dict

n_features_in_
Type:

int

See also

skein_glm.ElasticNetPathRegressor

Full λ-path with warm starts.

skein_glm.MCPRegressor

Nonconvex sparse alternative.

set_fit_request(*, 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:
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

set_score_request(*, sample_weight='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the score 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 score 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 score.

  • 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:
  • sample_weight (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for sample_weight parameter in score.

  • self (ElasticNetRegressor)

Returns:

self – The updated object.

Return type:

object

class skein_glm.estimators.BridgeRegressor(lambda_=0.1, q=0.5, *, eps=1e-06, weights=None, max_iter=100, tol=1e-06, max_outer=10, outer_tol=1e-06, fit_intercept=True, standardize=False, acceleration=5)[source]

Bases: _NonconvexRegressorBase

Bridge (ℓ_q) regression at a single λ via outer LLA.

Penalty λ · Σ_j w_j |β_j|^q with q ∈ (0, 1]. At q = 1 this is plain weighted lasso; for q < 1 the penalty is concave and sparsifies more aggressively than lasso (closes parity with grpreg’s family="gaussian" + bridge alternative). The inner LLA surrogate is weighted lasso with per-coordinate weights q · (|β_old| + ε)^(q-1) · w_base.

Parameters:
  • lambda (float, default 0.1)

  • q (float, default 0.5) – Bridge exponent in (0, 1]. q = 0.5 is the canonical bridge choice in the literature.

  • eps (float, default 1e-6) – Floor on |β_j| inside the LLA weight to keep the surrogate weight finite at β = 0. Smaller eps sharpens sparsification but increases outer LLA iterations.

  • weights (array-like of shape (n_features,) or None)

  • max_iter (int, default 100) – Inner CD iterations per outer LLA step.

  • tol (float, default 1e-6)

  • max_outer (int, default 10) – Maximum LLA outer iterations.

  • outer_tol (float, default 1e-6) – Stop the LLA loop when max_j |β_new − β_old| < outer_tol.

  • fit_intercept (bool, default True)

  • standardize (bool, default False)

  • acceleration (int or None, default 5)

  • lambda_ (float)

See also

skein_glm.BridgePathRegressor

Full λ-path with warm starts.

skein_glm.MCPRegressor

Closed-form-prox nonconvex alternative.

set_fit_request(*, 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:
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

set_score_request(*, sample_weight='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the score 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 score 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 score.

  • 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:
  • sample_weight (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for sample_weight parameter in score.

  • self (BridgeRegressor)

Returns:

self – The updated object.

Return type:

object

Scalar — path

class skein_glm.estimators.MCPPathRegressor(gamma=3.0, *, lambdas=None, n_lambdas=100, lambda_min_ratio=0.001, weights=None, sample_weights=None, max_iter=100, tol=1e-06, fit_intercept=True, standardize=False, screening='strong', acceleration=5)[source]

Bases: _PathRegressorBase

MCP-penalized least squares along a λ-path with warm starts.

Solves

min_β (1/2n) ‖y − Xβ − α‖² + Σ_j w_j · ρ_MCP(β_j; λ, γ)

for a sequence of λ values, threading β across decreasing λ as warm-starts. Equivalent to lasso when gamma is large (gamma=1e6 is a good convex stand-in); aggressively sparsifies as gamma shrinks.

Accepts numpy arrays, scipy.sparse.csc_matrix, skein_glm.MmapDesignF64 / skein_glm.MmapDesignF32, and skein_glm.ChunkedDesignF64 / skein_glm.ChunkedDesignF32 transparently.

Parameters:
  • gamma (float, default 3.0) – MCP nonconvexity parameter (>1). Smaller is more aggressive; gamma=3 matches ncvreg’s default. gamma=1e6 is numerically convex (≈ lasso).

  • lambdas (array-like or None, default None) – Explicit λ grid (descending). If None, derived from λ_max (the smallest λ that gives β = 0 by KKT) and a geometric grid of length n_lambdas with ratio lambda_min_ratio.

  • n_lambdas (int, default 100) – Length of the auto-generated λ grid. Ignored if lambdas is given.

  • lambda_min_ratio (float, default 1e-3) – Smallest λ in the auto-grid as a fraction of λ_max.

  • weights (array-like of shape (n_features,) or None, default None) – Per-feature penalty weights (the w_j above). None means uniform weights of 1.

  • max_iter (int, default 100) – Maximum number of CD iterations per λ.

  • tol (float, default 1e-6) – Convergence threshold (max coordinate-update L1 in coefficient space).

  • fit_intercept (bool, default True) – If True, an unpenalized intercept is fit alongside β.

  • standardize (bool, default False) – If True, columns of X are scaled to unit variance before fitting; coef_ / intercept_ are returned in original-feature scale.

  • screening ({"off", "strong", "gap_safe"}, default "strong") – Working-set strategy. “strong” = Tibshirani sequential strong rule + KKT verification. “gap_safe” = Fercoq-Gramfort-Salmon sphere screening. “off” disables screening.

  • acceleration (int or None, default 5) – Anderson acceleration depth on the iterate sequence. None disables acceleration.

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

coefs_

Fitted coefficients per λ. Each row is the β at the corresponding lambdas_[k].

Type:

ndarray of shape (n_lambdas, n_features)

intercepts_

Fitted intercepts per λ.

Type:

ndarray of shape (n_lambdas,)

lambdas_

The λ values actually used (descending).

Type:

ndarray of shape (n_lambdas,)

info_

Solver diagnostics: per-λ iteration counts, convergence flags, final objective values, working-set sizes, KKT-pass counts.

Type:

dict

n_features_in_

Number of features in X.

Type:

int

See also

skein_glm.MCPRegressor

Single-λ version.

skein_glm.MCPPathCV

K-fold cross-validated path with auto λ-selection.

skein_glm.SCADPathRegressor

SCAD-penalized analogue.

Examples

>>> import numpy as np
>>> import skein_glm
>>> rng = np.random.default_rng(0)
>>> X = rng.standard_normal((200, 50))
>>> y = X[:, :3] @ [1.5, -2.0, 0.8] + 0.1 * rng.standard_normal(200)
>>> model = skein_glm.MCPPathRegressor(gamma=3.0, n_lambdas=50).fit(X, y)
>>> model.coefs_.shape
(50, 50)
set_fit_request(*, 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:
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.SCADPathRegressor(a=3.7, *, lambdas=None, n_lambdas=100, lambda_min_ratio=0.001, weights=None, sample_weights=None, max_iter=100, tol=1e-06, fit_intercept=True, standardize=False, screening='strong', acceleration=5)[source]

Bases: _PathRegressorBase

SCAD regression along an entire λ-path with warm starts.

Parameters:
  • a (float)

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

  • n_lambdas (int)

  • lambda_min_ratio (float)

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

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

  • max_iter (int)

  • tol (float)

  • fit_intercept (bool)

  • standardize (bool)

  • screening (str)

  • acceleration (int | None)

set_fit_request(*, 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:
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.ElasticNetPathRegressor(alpha=0.5, *, lambdas=None, n_lambdas=100, lambda_min_ratio=0.001, weights=None, sample_weights=None, max_iter=100, tol=1e-06, fit_intercept=True, standardize=False, screening='strong', acceleration=5)[source]

Bases: _PathRegressorBase

Elastic-net least squares along a λ-path with warm starts.

Solves min_β (1/2n) ‖y α_int‖² + Σ_j w_j λ |β_j| + (1-α) β_j² / 2] for a sequence of λ values, threading β across decreasing λ as warm-starts. Convex objective, so coordinate descent converges to the global optimum at every λ.

Recovers pure lasso at alpha=1 (≈ MCPPathRegressor at gamma=1e6) and pure ridge at alpha=0. Matches glmnet’s glmnet(family="gaussian", alpha=...) shape.

Parameters:
  • alpha (float, default 0.5) – Convex combination weight in [0, 1]. alpha=1 is lasso; alpha=0 is ridge.

  • lambdas (array-like or None, default None) – Explicit λ grid (descending). If None, derived from λ_max (computed against the L1-effective weights α · w_j) and a geometric grid.

  • n_lambdas (int, default 100)

  • lambda_min_ratio (float, default 1e-3)

  • weights (array-like of shape (n_features,) or None) – Per-feature penalty weights (apply to both L1 and L2 parts).

  • max_iter (int, default 100)

  • tol (float, default 1e-6)

  • fit_intercept (bool, default True)

  • standardize (bool, default False)

  • screening ({"off", "strong", "gap_safe"}, default "strong")

  • acceleration (int or None, default 5)

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

coefs_
Type:

ndarray of shape (n_lambdas, n_features)

intercepts_
Type:

ndarray of shape (n_lambdas,)

lambdas_
Type:

ndarray of shape (n_lambdas,)

info_
Type:

dict

n_features_in_
Type:

int

See also

skein_glm.ElasticNetRegressor

Single-λ version.

skein_glm.ElasticNetPathCV

K-fold cross-validated path with auto λ-selection.

skein_glm.MCPPathRegressor

Nonconvex sparse alternative.

Examples

>>> import numpy as np
>>> import skein_glm
>>> rng = np.random.default_rng(0)
>>> X = rng.standard_normal((200, 50))
>>> y = X[:, :3] @ [1.5, -2.0, 0.8] + 0.1 * rng.standard_normal(200)
>>> model = skein_glm.ElasticNetPathRegressor(alpha=0.5, n_lambdas=50).fit(X, y)
>>> model.coefs_.shape
(50, 50)
set_fit_request(*, 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:
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.BridgePathRegressor(q=0.5, *, eps=1e-06, lambdas=None, n_lambdas=100, lambda_min_ratio=0.001, weights=None, max_iter=100, tol=1e-06, max_outer=10, outer_tol=1e-06, fit_intercept=True, standardize=False, acceleration=5)[source]

Bases: _PathRegressorBase

Bridge (ℓ_q) regression along a λ-path with warm starts.

Penalty λ · Σ_j w_j |β_j|^q with q ∈ (0, 1], fit via outer LLA wrapping a weighted-lasso inner. Warm-starts β across decreasing λ; a fresh LLA outer loop runs at each λ.

Parameters:
  • q (float, default 0.5) – Bridge exponent in (0, 1]. q = 1 is plain weighted lasso; smaller q sparsifies more aggressively but the loss surface becomes more non-convex.

  • eps (float, default 1e-6)

  • lambdas (array-like or None, default None)

  • n_lambdas (int, default 100)

  • lambda_min_ratio (float, default 1e-3)

  • weights (array-like of shape (n_features,) or None)

  • max_iter (int, default 100)

  • tol (float, default 1e-6)

  • max_outer (int, default 10)

  • outer_tol (float, default 1e-6)

  • fit_intercept (bool, default True)

  • standardize (bool, default False)

  • acceleration (int or None, default 5)

coefs_
Type:

ndarray of shape (n_lambdas, n_features)

intercepts_
Type:

ndarray of shape (n_lambdas,)

lambdas_
Type:

ndarray of shape (n_lambdas,)

info_

outer_iters, outer_converged, inner_iters, final_objs.

Type:

dict

n_features_in_
Type:

int

See also

skein_glm.BridgeRegressor

Single-λ version.

skein_glm.BridgePathCV

K-fold cross-validated path.

set_fit_request(*, 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:
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.GroupLassoRegressor(groups, lambda_=0.1, *, weights=None, max_iter=100, tol=1e-06, fit_intercept=True, standardize=False, screening='strong', acceleration=5, parallel=False)[source]

Bases: _GroupSingleLambdaBase

Group lasso at a single λ.

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

  • lambda_ (float)

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

  • max_iter (int)

  • tol (float)

  • fit_intercept (bool)

  • standardize (bool)

  • screening (str)

  • acceleration (int | None)

  • parallel (bool)

set_fit_request(*, 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:
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

set_score_request(*, sample_weight='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the score 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 score 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 score.

  • 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:
  • sample_weight (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for sample_weight parameter in score.

  • self (GroupLassoRegressor)

Returns:

self – The updated object.

Return type:

object

class skein_glm.estimators.GroupMCPRegressor(groups, lambda_=0.1, gamma=3.0, *, weights=None, max_iter=100, tol=1e-06, fit_intercept=True, standardize=False, screening='strong', acceleration=5, parallel=False, max_outer=10, outer_tol=1e-06)[source]

Bases: _GroupSingleLambdaBase

Group MCP at a single λ, solved by native block-CD on the closed-form group MCP prox (Breheny & Huang 2015 §3).

Strong-rule screening still applies: the β_g=0 KKT subdifferential λ·[-w_g, w_g] is identical for GroupLasso and GroupMcp, so the screen carries over unchanged from the convex group lasso path solver.

The max_outer and outer_tol parameters are kept in the constructor for backward compat with v0.7 callers but are now ignored — convergence is governed by the inner CD tol and the path solver’s KKT verifier. info_["outer_iters"] is no longer populated; use info_["iters"] and info_["kkt_passes"] instead.

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

  • lambda_ (float)

  • gamma (float)

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

  • max_iter (int)

  • tol (float)

  • fit_intercept (bool)

  • standardize (bool)

  • screening (str)

  • acceleration (int | None)

  • parallel (bool)

  • max_outer (int)

  • outer_tol (float)

set_fit_request(*, 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:
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

set_score_request(*, sample_weight='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the score 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 score 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 score.

  • 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:
  • sample_weight (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for sample_weight parameter in score.

  • self (GroupMCPRegressor)

Returns:

self – The updated object.

Return type:

object

class skein_glm.estimators.GroupSCADRegressor(groups, lambda_=0.1, a=3.7, *, weights=None, max_iter=100, tol=1e-06, fit_intercept=True, standardize=False, screening='strong', acceleration=5, parallel=False, max_outer=10, outer_tol=1e-06)[source]

Bases: _GroupSingleLambdaBase

Group SCAD at a single λ, solved by LLA outer loop. SCAD shape a > 2 (default 3.7 — Fan & Li’s recommendation).

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

  • lambda_ (float)

  • a (float)

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

  • max_iter (int)

  • tol (float)

  • fit_intercept (bool)

  • standardize (bool)

  • screening (str)

  • acceleration (int | None)

  • parallel (bool)

  • max_outer (int)

  • outer_tol (float)

set_fit_request(*, 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:
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

set_score_request(*, sample_weight='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the score 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 score 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 score.

  • 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:
  • sample_weight (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for sample_weight parameter in score.

  • self (GroupSCADRegressor)

Returns:

self – The updated object.

Return type:

object

class skein_glm.estimators.GroupElasticNetRegressor(groups, lambda_=0.1, alpha=0.5, *, weights=None, max_iter=100, tol=1e-06, fit_intercept=True, standardize=False, screening='strong', acceleration=5, parallel=False)[source]

Bases: _GroupSingleLambdaBase

Group elastic net at a single λ.

Convex per-group penalty α λ w_g ‖β_g‖₂ + (1-α) λ w_g ‖β_g‖₂² / 2. α = 1 reduces to plain group lasso; α = 0 is per-block ridge.

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

  • lambda_ (float)

  • alpha (float)

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

  • max_iter (int)

  • tol (float)

  • fit_intercept (bool)

  • standardize (bool)

  • screening (str)

  • acceleration (int | None)

  • parallel (bool)

set_fit_request(*, 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:
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

set_score_request(*, sample_weight='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the score 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 score 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 score.

  • 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.SparseGroupLassoRegressor(groups, lambda_=0.1, alpha=0.5, *, weights=None, max_iter=100, tol=1e-06, fit_intercept=True, standardize=False, screening='strong', acceleration=5, parallel=False)[source]

Bases: _GroupSingleLambdaBase

Sparse-group lasso at a single λ.

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

  • lambda_ (float)

  • alpha (float)

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

  • max_iter (int)

  • tol (float)

  • fit_intercept (bool)

  • standardize (bool)

  • screening (str)

  • acceleration (int | None)

  • parallel (bool)

set_fit_request(*, 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:
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

set_score_request(*, sample_weight='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the score 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 score 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 score.

  • 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.SparseGroupMCPRegressor(groups, lambda_=0.1, gamma=3.0, alpha=0.5, *, weights=None, coord_weights=None, max_iter=100, tol=1e-06, fit_intercept=True, standardize=False, screening='strong', acceleration=5, parallel=False, max_outer=10, outer_tol=1e-06)[source]

Bases: _GroupSingleLambdaBase

Sparse-group MCP at a single λ via LLA outer loop.

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

  • lambda_ (float)

  • gamma (float)

  • alpha (float)

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

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

  • max_iter (int)

  • tol (float)

  • fit_intercept (bool)

  • standardize (bool)

  • screening (str)

  • acceleration (int | None)

  • parallel (bool)

  • max_outer (int)

  • outer_tol (float)

set_fit_request(*, 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:
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

set_score_request(*, sample_weight='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the score 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 score 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 score.

  • 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.SparseGroupSCADRegressor(groups, lambda_=0.1, a=3.7, alpha=0.5, *, weights=None, coord_weights=None, max_iter=100, tol=1e-06, fit_intercept=True, standardize=False, screening='strong', acceleration=5, parallel=False, max_outer=10, outer_tol=1e-06)[source]

Bases: _GroupSingleLambdaBase

Sparse-group SCAD at a single λ via LLA outer loop. SCAD shape a > 2 (default 3.7 — Fan & Li’s recommendation).

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

  • lambda_ (float)

  • a (float)

  • alpha (float)

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

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

  • max_iter (int)

  • tol (float)

  • fit_intercept (bool)

  • standardize (bool)

  • screening (str)

  • acceleration (int | None)

  • parallel (bool)

  • max_outer (int)

  • outer_tol (float)

set_fit_request(*, 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:
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

set_score_request(*, sample_weight='$UNCHANGED$')

Configure whether metadata should be requested to be passed to the score 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 score 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 score.

  • 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.GroupLassoPathRegressor(groups, *, lambdas=None, n_lambdas=100, lambda_min_ratio=0.001, weights=None, max_iter=100, tol=1e-06, fit_intercept=True, standardize=False, screening='strong', acceleration=5, parallel=False)[source]

Bases: _GroupPathBase

Group lasso along an entire λ-path with warm starts.

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

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

  • n_lambdas (int)

  • lambda_min_ratio (float)

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

  • max_iter (int)

  • tol (float)

  • fit_intercept (bool)

  • standardize (bool)

  • screening (str)

  • acceleration (int | None)

  • parallel (bool)

set_fit_request(*, 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:
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.GroupMCPPathRegressor(groups, gamma=3.0, *, lambdas=None, n_lambdas=100, lambda_min_ratio=0.001, weights=None, max_iter=100, tol=1e-06, fit_intercept=True, standardize=False, screening='strong', acceleration=5, parallel=False, max_outer=10, outer_tol=1e-06)[source]

Bases: _GroupPathBase

Group MCP along an entire λ-path, solved by native block-CD per λ on the closed-form group MCP prox (Breheny & Huang 2015 §3). No LLA outer loop.

See GroupMCPRegressor for the screening + max_outer / outer_tol notes that apply identically to the path variant. On the canonical medium / dense ls_group_mcp cell (n=10k, p=1k, group_size=5, n_groups=200, k_active=5, tol=1e-7, γ=3.0) the native solver runs 3.46× faster than the v0.7 LLA wrapper (10.5 s vs 36.2 s) and 1.20× faster than grpreg at the same cell. Cross-solver agreement: Jaccard 1.0 on support at every λ; max relative objective gap 5.4e-7.

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

  • gamma (float)

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

  • n_lambdas (int)

  • lambda_min_ratio (float)

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

  • max_iter (int)

  • tol (float)

  • fit_intercept (bool)

  • standardize (bool)

  • screening (str)

  • acceleration (int | None)

  • parallel (bool)

  • max_outer (int)

  • outer_tol (float)

set_fit_request(*, 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:
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.GroupSCADPathRegressor(groups, a=3.7, *, lambdas=None, n_lambdas=100, lambda_min_ratio=0.001, weights=None, max_iter=100, tol=1e-06, fit_intercept=True, standardize=False, screening='strong', acceleration=5, parallel=False, max_outer=10, outer_tol=1e-06)[source]

Bases: _GroupPathBase

Group SCAD along an entire λ-path; LLA at every λ. SCAD shape a > 2 (default 3.7).

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

  • a (float)

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

  • n_lambdas (int)

  • lambda_min_ratio (float)

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

  • max_iter (int)

  • tol (float)

  • fit_intercept (bool)

  • standardize (bool)

  • screening (str)

  • acceleration (int | None)

  • parallel (bool)

  • max_outer (int)

  • outer_tol (float)

set_fit_request(*, 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:
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.GroupElasticNetPathRegressor(groups, alpha=0.5, *, lambdas=None, n_lambdas=100, lambda_min_ratio=0.001, weights=None, max_iter=100, tol=1e-06, fit_intercept=True, standardize=False, screening='strong', acceleration=5, parallel=False)[source]

Bases: _GroupPathBase

Group elastic net along an entire λ-path with warm starts.

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

  • alpha (float)

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

  • n_lambdas (int)

  • lambda_min_ratio (float)

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

  • max_iter (int)

  • tol (float)

  • fit_intercept (bool)

  • standardize (bool)

  • screening (str)

  • acceleration (int | None)

  • parallel (bool)

set_fit_request(*, 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:
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.SparseGroupLassoPathRegressor(groups, alpha=0.5, *, lambdas=None, n_lambdas=100, lambda_min_ratio=0.001, weights=None, max_iter=100, tol=1e-06, fit_intercept=True, standardize=False, screening='strong', acceleration=5, parallel=False)[source]

Bases: _GroupPathBase

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)

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

  • max_iter (int)

  • tol (float)

  • fit_intercept (bool)

  • standardize (bool)

  • screening (str)

  • acceleration (int | None)

  • parallel (bool)

set_fit_request(*, 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:
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.SparseGroupMCPPathRegressor(groups, gamma=3.0, alpha=0.5, *, lambdas=None, n_lambdas=100, lambda_min_ratio=0.001, weights=None, coord_weights=None, max_iter=100, tol=1e-06, fit_intercept=True, standardize=False, screening='strong', acceleration=5, parallel=False, max_outer=10, outer_tol=1e-06)[source]

Bases: _GroupPathBase

Sparse-group MCP along an entire λ-path; LLA at every λ.

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

  • gamma (float)

  • alpha (float)

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

  • n_lambdas (int)

  • lambda_min_ratio (float)

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

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

  • max_iter (int)

  • tol (float)

  • fit_intercept (bool)

  • standardize (bool)

  • screening (str)

  • acceleration (int | None)

  • parallel (bool)

  • max_outer (int)

  • outer_tol (float)

set_fit_request(*, 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:
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.SparseGroupSCADPathRegressor(groups, a=3.7, alpha=0.5, *, lambdas=None, n_lambdas=100, lambda_min_ratio=0.001, weights=None, coord_weights=None, max_iter=100, tol=1e-06, fit_intercept=True, standardize=False, screening='strong', acceleration=5, parallel=False, max_outer=10, outer_tol=1e-06)[source]

Bases: _GroupPathBase

Sparse-group SCAD along an entire λ-path; LLA at every λ. SCAD shape a > 2 (default 3.7).

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

  • a (float)

  • alpha (float)

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

  • n_lambdas (int)

  • lambda_min_ratio (float)

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

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

  • max_iter (int)

  • tol (float)

  • fit_intercept (bool)

  • standardize (bool)

  • screening (str)

  • acceleration (int | None)

  • parallel (bool)

  • max_outer (int)

  • outer_tol (float)

set_fit_request(*, 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:
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