Model Selection & Regression Modules¶
BBSR¶
-
class
inferelator.regression.bbsr_python.
BBSRRegressionWorkflowMixin
¶ Bayesian Best Subset Regression (BBSR)
https://doi.org/10.15252/msb.20156236
-
set_regression_parameters
(prior_weight=None, no_prior_weight=None, bsr_feature_num=None, clr_only=False, ordinary_least_squares_only=None)¶ Set regression parameters for BBSR
Parameters: - prior_weight (float) – Weight for edges that are present in the prior network. Defaults to 1.
- no_prior_weight (float) – Weight for edges that are not present in the prior network. Defaults to 1.
- bsr_feature_num (int) – The number of features to include in best subset regression. Defaults to 10.
- clr_only (bool) – Only use Context Likelihood of Relatedness to select features for BSR, not prior edges. Defaults to False.
- ordinary_least_squares_only (bool) – Use OLS instead of Bayesian regression, for testing. Defaults to False.
-
AMuSR¶
-
class
inferelator.regression.amusr_regression.
AMUSRRegressionWorkflowMixin
¶ Multi-Task AMuSR regression
https://doi.org/10.1371/journal.pcbi.1006591
-
set_regression_parameters
(prior_weight=None)¶ Set regression parameters for AmUSR
Parameters: prior_weight (numeric) – Weight for edges that are present in the prior network. Non-prior edges have a weight of 1. Set this to 1 to weight prior and non-prior edges equally. Defaults to 1.
-
Scikit-Learn¶
-
class
inferelator.regression.sklearn_regression.
SKLearnWorkflowMixin
(*args, **kwargs)¶ Use any scikit-learn regression module
-
set_regression_parameters
(model=None, add_random_state=None, **kwargs)¶ Set parameters to use a sklearn model for regression
Parameters: - model (BaseEstimator subclass) – A scikit-learn model class
- add_random_state (bool) – Flag to include workflow random seed as “random_state” in the model
- kwargs (any) – Any arguments which should be passed to the scikit-learn model class instantiation
-
Elastic-Net¶
-
class
inferelator.regression.elasticnet_python.
ElasticNetWorkflowMixin
(*args, **kwargs)¶ Set default parameters to run scikit-learn ElasticNetCV
-
set_regression_parameters
(model=None, add_random_state=None, **kwargs)¶ Set parameters to use a sklearn model for regression
Parameters: - model (BaseEstimator subclass) – A scikit-learn model class
- add_random_state (bool) – Flag to include workflow random seed as “random_state” in the model
- kwargs (any) – Any arguments which should be passed to the scikit-learn model class instantiation
-
StARS-Lasso¶
-
class
inferelator.regression.stability_selection.
StARSWorkflowByTaskMixin
(*args, **kwargs)¶ Add elasticnet regression into a workflow object
-
set_regression_parameters
(alphas=None, num_subsamples=None, method=None, **kwargs)¶ Set regression parameters for StARS-LASSO
Parameters: - alphas (list(float)) – A list of alpha (L1 term) values to search. Defaults to logspace between 0. and 10.
- num_subsamples (int) – The number of groups to break data into. Defaults to 20.
- method (str) – The model to use. Can choose from ‘lasso’ or ‘ridge’. Defaults to ‘lasso’. If ‘ridge’ is set, ridge_threshold should also be passed. Any value below ridge_threshold will be set to 0.
- kwargs (any) – Any additional arguments will be passed to the LASSO or Ridge scikit-learn object at instantiation
-