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
*PathRegressorsiblings.
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:
_NonconvexRegressorBaseMCP-penalized least squares at a single λ.
The single-λ companion to
MCPPathRegressor. Use this when you’ve already chosenlambda_(via external CV, prior knowledge, etc.); useMCPPathRegressororskein_glm.MCPPathCVwhen you want to fit a full path or have skein_glm pick λ for you.- Parameters:
lambda (
float, default0.1) – Regularization strength. Larger → more sparsity.gamma (
float, default3.0) – MCP nonconvexity (>1).gamma=1e6is ≈ lasso.weights (
array-likeofshape (n_features,)orNone) – Per-feature penalty weights.max_iter (
int, default100)tol (
float, default1e-6)screening (
{"off", "strong", "gap_safe"}, default"strong")lambda_ (float)
- coef_¶
- Type:
ndarrayofshape (n_features,)
See also
skein_glm.MCPPathRegressorFull λ-path with warm starts.
- set_fit_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
fitmethod.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(seesklearn.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 tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.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.
- set_predict_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
predictmethod.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(seesklearn.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 topredictif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it topredict.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.
- set_score_request(*, sample_weight='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
scoremethod.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(seesklearn.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 toscoreif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it toscore.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.
- 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:
_NonconvexRegressorBaseLeast-squares regression with SCAD penalty at a single λ.
- Parameters:
- set_fit_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
fitmethod.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(seesklearn.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 tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.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.
- set_predict_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
predictmethod.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(seesklearn.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 topredictif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it topredict.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.
- set_score_request(*, sample_weight='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
scoremethod.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(seesklearn.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 toscoreif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it toscore.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.
- 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:
_NonconvexRegressorBaseElastic-net least squares at a single λ.
Convex penalty α λ |β_j| + (1-α) λ β_j² / 2 per feature.
alpha = 1recovers pure lasso (≈MCPRegressorat large γ);alpha = 0recovers pure ridge. Matches glmnet’scv.glmnet(family="gaussian", alpha=...)shape.- Parameters:
lambda (
float, default0.1)alpha (
float, default0.5) – Convex combination weight:α=1is lasso,α=0is ridge, intermediate is elastic net. Must be in [0, 1].weights (
array-likeofshape (n_features,)orNone) – Per-feature penalty weights; apply to both L1 and L2 parts.max_iter (
int, default100)tol (
float, default1e-6)screening (
{"off", "strong", "gap_safe"}, default"strong")lambda_ (float)
- coef_¶
- Type:
ndarrayofshape (n_features,)
See also
skein_glm.ElasticNetPathRegressorFull λ-path with warm starts.
skein_glm.MCPRegressorNonconvex sparse alternative.
- set_fit_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
fitmethod.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(seesklearn.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 tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.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.
- set_predict_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
predictmethod.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(seesklearn.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 topredictif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it topredict.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.
- set_score_request(*, sample_weight='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
scoremethod.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(seesklearn.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 toscoreif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it toscore.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.
- 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:
_NonconvexRegressorBaseBridge (ℓ_q) regression at a single λ via outer LLA.
Penalty λ · Σ_j w_j |β_j|^q with q ∈ (0, 1]. At
q = 1this is plain weighted lasso; forq < 1the penalty is concave and sparsifies more aggressively than lasso (closes parity withgrpreg’sfamily="gaussian"+ bridge alternative). The inner LLA surrogate is weighted lasso with per-coordinate weights q · (|β_old| + ε)^(q-1) · w_base.- Parameters:
lambda (
float, default0.1)q (
float, default0.5) – Bridge exponent in (0, 1]. q = 0.5 is the canonical bridge choice in the literature.eps (
float, default1e-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-likeofshape (n_features,)orNone)max_iter (
int, default100) – Inner CD iterations per outer LLA step.tol (
float, default1e-6)max_outer (
int, default10) – Maximum LLA outer iterations.outer_tol (
float, default1e-6) – Stop the LLA loop when max_j |β_new − β_old| < outer_tol.lambda_ (float)
See also
skein_glm.BridgePathRegressorFull λ-path with warm starts.
skein_glm.MCPRegressorClosed-form-prox nonconvex alternative.
- set_fit_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
fitmethod.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(seesklearn.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 tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.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.
- set_predict_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
predictmethod.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(seesklearn.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 topredictif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it topredict.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.
- set_score_request(*, sample_weight='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
scoremethod.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(seesklearn.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 toscoreif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it toscore.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.
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:
_PathRegressorBaseMCP-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
gammais large (gamma=1e6is a good convex stand-in); aggressively sparsifies asgammashrinks.Accepts numpy arrays,
scipy.sparse.csc_matrix,skein_glm.MmapDesignF64/skein_glm.MmapDesignF32, andskein_glm.ChunkedDesignF64/skein_glm.ChunkedDesignF32transparently.- Parameters:
gamma (
float, default3.0) – MCP nonconvexity parameter (>1). Smaller is more aggressive;gamma=3matchesncvreg’s default.gamma=1e6is numerically convex (≈ lasso).lambdas (
array-likeorNone, defaultNone) – Explicit λ grid (descending). If None, derived from λ_max (the smallest λ that gives β = 0 by KKT) and a geometric grid of lengthn_lambdaswith ratiolambda_min_ratio.n_lambdas (
int, default100) – Length of the auto-generated λ grid. Ignored iflambdasis given.lambda_min_ratio (
float, default1e-3) – Smallest λ in the auto-grid as a fraction of λ_max.weights (
array-likeofshape (n_features,)orNone, defaultNone) – Per-feature penalty weights (thew_jabove).Nonemeans uniform weights of 1.max_iter (
int, default100) – Maximum number of CD iterations per λ.tol (
float, default1e-6) – Convergence threshold (max coordinate-update L1 in coefficient space).fit_intercept (
bool, defaultTrue) – If True, an unpenalized intercept is fit alongside β.standardize (
bool, defaultFalse) – 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 (
intorNone, default5) – Anderson acceleration depth on the iterate sequence.Nonedisables acceleration.sample_weights (NDArray[np.float64] | None)
- coefs_¶
Fitted coefficients per λ. Each row is the β at the corresponding
lambdas_[k].- Type:
ndarrayofshape (n_lambdas,n_features)
- intercepts_¶
Fitted intercepts per λ.
- Type:
ndarrayofshape (n_lambdas,)
- lambdas_¶
The λ values actually used (descending).
- Type:
ndarrayofshape (n_lambdas,)
- info_¶
Solver diagnostics: per-λ iteration counts, convergence flags, final objective values, working-set sizes, KKT-pass counts.
- Type:
See also
skein_glm.MCPRegressorSingle-λ version.
skein_glm.MCPPathCVK-fold cross-validated path with auto λ-selection.
skein_glm.SCADPathRegressorSCAD-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
fitmethod.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(seesklearn.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 tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.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.
- set_predict_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
predictmethod.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(seesklearn.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 topredictif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it topredict.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.
- 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:
_PathRegressorBaseSCAD regression along an entire λ-path with warm starts.
- Parameters:
- set_fit_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
fitmethod.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(seesklearn.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 tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.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.
- set_predict_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
predictmethod.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(seesklearn.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 topredictif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it topredict.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.
- 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:
_PathRegressorBaseElastic-net least squares along a λ-path with warm starts.
Solves
min_β (1/2n) ‖y − Xβ − α_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(≈MCPPathRegressoratgamma=1e6) and pure ridge atalpha=0. Matches glmnet’sglmnet(family="gaussian", alpha=...)shape.- Parameters:
alpha (
float, default0.5) – Convex combination weight in [0, 1].alpha=1is lasso;alpha=0is ridge.lambdas (
array-likeorNone, defaultNone) – Explicit λ grid (descending). If None, derived from λ_max (computed against the L1-effective weightsα · w_j) and a geometric grid.n_lambdas (
int, default100)lambda_min_ratio (
float, default1e-3)weights (
array-likeofshape (n_features,)orNone) – Per-feature penalty weights (apply to both L1 and L2 parts).max_iter (
int, default100)tol (
float, default1e-6)screening (
{"off", "strong", "gap_safe"}, default"strong")sample_weights (NDArray[np.float64] | None)
- coefs_¶
- Type:
ndarrayofshape (n_lambdas,n_features)
- intercepts_¶
- Type:
ndarrayofshape (n_lambdas,)
- lambdas_¶
- Type:
ndarrayofshape (n_lambdas,)
See also
skein_glm.ElasticNetRegressorSingle-λ version.
skein_glm.ElasticNetPathCVK-fold cross-validated path with auto λ-selection.
skein_glm.MCPPathRegressorNonconvex 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
fitmethod.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(seesklearn.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 tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.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.
- set_predict_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
predictmethod.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(seesklearn.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 topredictif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it topredict.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.
- 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:
_PathRegressorBaseBridge (ℓ_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, default0.5) – Bridge exponent in (0, 1].q = 1is plain weighted lasso; smaller q sparsifies more aggressively but the loss surface becomes more non-convex.eps (
float, default1e-6)n_lambdas (
int, default100)lambda_min_ratio (
float, default1e-3)weights (
array-likeofshape (n_features,)orNone)max_iter (
int, default100)tol (
float, default1e-6)max_outer (
int, default10)outer_tol (
float, default1e-6)
- coefs_¶
- Type:
ndarrayofshape (n_lambdas,n_features)
- intercepts_¶
- Type:
ndarrayofshape (n_lambdas,)
- lambdas_¶
- Type:
ndarrayofshape (n_lambdas,)
See also
skein_glm.BridgeRegressorSingle-λ version.
skein_glm.BridgePathCVK-fold cross-validated path.
- set_fit_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
fitmethod.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(seesklearn.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 tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.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.
- set_predict_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
predictmethod.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(seesklearn.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 topredictif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it topredict.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.
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:
_GroupSingleLambdaBaseGroup lasso at a single λ.
- Parameters:
- set_fit_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
fitmethod.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(seesklearn.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 tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.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.
- set_predict_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
predictmethod.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(seesklearn.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 topredictif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it topredict.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.
- set_score_request(*, sample_weight='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
scoremethod.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(seesklearn.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 toscoreif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it toscore.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.
- 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:
_GroupSingleLambdaBaseGroup 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
GroupLassoandGroupMcp, so the screen carries over unchanged from the convex group lasso path solver.The
max_outerandouter_tolparameters are kept in the constructor for backward compat with v0.7 callers but are now ignored — convergence is governed by the inner CDtoland the path solver’s KKT verifier.info_["outer_iters"]is no longer populated; useinfo_["iters"]andinfo_["kkt_passes"]instead.- Parameters:
- set_fit_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
fitmethod.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(seesklearn.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 tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.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.
- set_predict_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
predictmethod.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(seesklearn.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 topredictif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it topredict.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.
- set_score_request(*, sample_weight='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
scoremethod.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(seesklearn.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 toscoreif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it toscore.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.
- 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:
_GroupSingleLambdaBaseGroup SCAD at a single λ, solved by LLA outer loop. SCAD shape a > 2 (default 3.7 — Fan & Li’s recommendation).
- Parameters:
- set_fit_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
fitmethod.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(seesklearn.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 tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.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.
- set_predict_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
predictmethod.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(seesklearn.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 topredictif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it topredict.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.
- set_score_request(*, sample_weight='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
scoremethod.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(seesklearn.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 toscoreif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it toscore.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.
- 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:
_GroupSingleLambdaBaseGroup 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:
- set_fit_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
fitmethod.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(seesklearn.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 tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.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.
- set_predict_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
predictmethod.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(seesklearn.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 topredictif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it topredict.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.
- set_score_request(*, sample_weight='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
scoremethod.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(seesklearn.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 toscoreif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it toscore.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.
- 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:
_GroupSingleLambdaBaseSparse-group lasso at a single λ.
- Parameters:
- set_fit_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
fitmethod.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(seesklearn.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 tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.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.
- set_predict_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
predictmethod.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(seesklearn.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 topredictif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it topredict.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.
- set_score_request(*, sample_weight='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
scoremethod.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(seesklearn.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 toscoreif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it toscore.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.
- 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:
_GroupSingleLambdaBaseSparse-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
fitmethod.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(seesklearn.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 tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.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.
- set_predict_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
predictmethod.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(seesklearn.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 topredictif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it topredict.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.
- set_score_request(*, sample_weight='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
scoremethod.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(seesklearn.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 toscoreif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it toscore.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.
- 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:
_GroupSingleLambdaBaseSparse-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
fitmethod.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(seesklearn.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 tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.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.
- set_predict_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
predictmethod.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(seesklearn.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 topredictif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it topredict.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.
- set_score_request(*, sample_weight='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
scoremethod.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(seesklearn.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 toscoreif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it toscore.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.
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:
_GroupPathBaseGroup lasso along an entire λ-path with warm starts.
- Parameters:
- set_fit_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
fitmethod.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(seesklearn.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 tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.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.
- set_predict_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
predictmethod.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(seesklearn.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 topredictif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it topredict.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.
- 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:
_GroupPathBaseGroup 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
GroupMCPRegressorfor the screening +max_outer/outer_tolnotes that apply identically to the path variant. On the canonicalmedium / densels_group_mcpcell (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
fitmethod.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(seesklearn.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 tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.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.
- set_predict_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
predictmethod.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(seesklearn.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 topredictif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it topredict.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.
- 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:
_GroupPathBaseGroup 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
fitmethod.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(seesklearn.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 tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.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.
- set_predict_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
predictmethod.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(seesklearn.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 topredictif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it topredict.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.
- 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:
_GroupPathBaseGroup elastic net along an entire λ-path with warm starts.
- Parameters:
- set_fit_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
fitmethod.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(seesklearn.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 tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.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.
- set_predict_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
predictmethod.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(seesklearn.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 topredictif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it topredict.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.
- 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:
_GroupPathBaseSparse-group lasso along an entire λ-path.
- Parameters:
- set_fit_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
fitmethod.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(seesklearn.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 tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.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.
- set_predict_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
predictmethod.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(seesklearn.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 topredictif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it topredict.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.
- 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:
_GroupPathBaseSparse-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
fitmethod.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(seesklearn.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 tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.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.
- set_predict_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
predictmethod.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(seesklearn.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 topredictif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it topredict.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.
- 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:
_GroupPathBaseSparse-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
fitmethod.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(seesklearn.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 tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.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.
- set_predict_request(*, x='$UNCHANGED$')¶
Configure whether metadata should be requested to be passed to the
predictmethod.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(seesklearn.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 topredictif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it topredict.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.