Feature Request: Extend Lasso Class with Multitask and Uncertainty Options
Summary
Extend the existing Lasso model family in m_lasso.py with two new variants from scikit-learn:
MultiTaskLassoMother — wrapping sklearn.linear_model.MultiTaskLasso for simultaneous multi-output regression with shared sparsity.
ARDRegressionMother — wrapping sklearn.linear_model.ARDRegression for Bayesian linear regression with automatic relevance determination, providing native uncertainty estimates.
Motivation
1. MultiTaskLasso
The current LassoRegressorMother handles single-target regression only. In many life science and cheminformatics workflows, multiple related endpoints are predicted simultaneously (e.g. multiple ADMET properties, multiple assay readouts for the same compound series). MultiTaskLasso enforces a shared sparsity pattern across all outputs — features are selected or discarded jointly across all tasks — which is often more appropriate than fitting independent Lasso models when the targets share a common set of relevant features.
This fits naturally into Mother's existing multitask framework (e.g. MultitaskRandomForestMother) and would allow Lasso-style regularisation in multitask pipelines.
Reference: https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.MultiTaskLasso.html
2. ARDRegression
ARDRegression (Automatic Relevance Determination) is a Bayesian linear model that places individual priors over each feature weight, effectively performing automatic feature selection while also producing calibrated predictive uncertainty in the form of a posterior over the weights. Compared to standard Lasso:
- It provides native uncertainty estimates (posterior mean and variance) without requiring conformal post-processing or ensembling.
- The regularisation strength is inferred from the data per-feature rather than set as a single global hyperparameter, which can be advantageous on high-dimensional datasets.
- It returns both a predicted mean and a predicted standard deviation, making it directly usable in Mother's uncertainty interface alongside existing uncertainty-aware models.
This would give users a lightweight, no-dependency uncertainty-aware linear baseline that complements the heavier ensemble and conformal approaches already in Mother.
Reference: https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.ARDRegression.html
Proposed Changes
New classes in src/mother/ml/models/m_lasso.py
MultiTaskLassoMother
- Inherits from
sklearn.linear_model.MultiTaskLasso and AbstractMotherPipeline.
- Implements
get_hyperparameter_space() tuning the alpha regularisation parameter.
- Implements
default_parameters().
- Consistent with the existing
LassoRegressorMother pattern.
ARDRegressionMother
- Inherits from
sklearn.linear_model.ARDRegression and AbstractMotherPipeline.
- Implements
get_hyperparameter_space() covering the key Bayesian priors (alpha_1, alpha_2, lambda_1, lambda_2) and convergence settings.
- Implements
default_parameters().
- Exposes
predict_std() or integrates with Mother's existing uncertainty interface so that the posterior standard deviation is accessible downstream.
Affected Areas
| Area |
Change |
src/mother/ml/models/m_lasso.py |
Add MultiTaskLassoMother and ARDRegressionMother classes |
src/mother/ml/__init__.py / model registry |
Register both new model classes |
test/unit/test_ml.py or new test file |
Add tests for both new models |
examples/ |
Optionally add or extend a notebook demonstrating multitask Lasso and ARD regression with uncertainty |
mkdocs/docs/ |
Document the two new classes |
Related
Feature Request: Extend Lasso Class with Multitask and Uncertainty Options
Summary
Extend the existing Lasso model family in
m_lasso.pywith two new variants from scikit-learn:MultiTaskLassoMother— wrappingsklearn.linear_model.MultiTaskLassofor simultaneous multi-output regression with shared sparsity.ARDRegressionMother— wrappingsklearn.linear_model.ARDRegressionfor Bayesian linear regression with automatic relevance determination, providing native uncertainty estimates.Motivation
1. MultiTaskLasso
The current
LassoRegressorMotherhandles single-target regression only. In many life science and cheminformatics workflows, multiple related endpoints are predicted simultaneously (e.g. multiple ADMET properties, multiple assay readouts for the same compound series).MultiTaskLassoenforces a shared sparsity pattern across all outputs — features are selected or discarded jointly across all tasks — which is often more appropriate than fitting independent Lasso models when the targets share a common set of relevant features.This fits naturally into Mother's existing multitask framework (e.g.
MultitaskRandomForestMother) and would allow Lasso-style regularisation in multitask pipelines.Reference: https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.MultiTaskLasso.html
2. ARDRegression
ARDRegression(Automatic Relevance Determination) is a Bayesian linear model that places individual priors over each feature weight, effectively performing automatic feature selection while also producing calibrated predictive uncertainty in the form of a posterior over the weights. Compared to standard Lasso:This would give users a lightweight, no-dependency uncertainty-aware linear baseline that complements the heavier ensemble and conformal approaches already in Mother.
Reference: https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.ARDRegression.html
Proposed Changes
New classes in
src/mother/ml/models/m_lasso.pyMultiTaskLassoMothersklearn.linear_model.MultiTaskLassoandAbstractMotherPipeline.get_hyperparameter_space()tuning thealpharegularisation parameter.default_parameters().LassoRegressorMotherpattern.ARDRegressionMothersklearn.linear_model.ARDRegressionandAbstractMotherPipeline.get_hyperparameter_space()covering the key Bayesian priors (alpha_1,alpha_2,lambda_1,lambda_2) and convergence settings.default_parameters().predict_std()or integrates with Mother's existing uncertainty interface so that the posterior standard deviation is accessible downstream.Affected Areas
src/mother/ml/models/m_lasso.pyMultiTaskLassoMotherandARDRegressionMotherclassessrc/mother/ml/__init__.py/ model registrytest/unit/test_ml.pyor new test fileexamples/mkdocs/docs/Related
LassoRegressorMother— existing single-task Lasso regression inm_lasso.pyMultitaskRandomForestMother— existing multitask model for reference on how multitask models are integrated