How to use the confounds.base.Residualize function in confounds

To help you get started, we’ve selected a few confounds examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github raamana / neuropredict / neuropredict / algorithms.py View on Github external
def get_deconfounder(xfm_name, grid_search_level=None):
    """Returns a valid sklearn transformer for deconfounding."""

    xfm_name = xfm_name.lower()
    if xfm_name in ('residualize', 'regressout',
                'residualize_linear', 'regressout_linear'):
        from confounds.base import Residualize
        xfm = Residualize()
        param_list_values = []
    # elif name in ('residualize_ridge', 'residualize_kernelridge'):
    #     from confounds.base import Residualize
    #     xfm =  Residualize(model='KernelRidge')
    #     param_list_values = [('param_1', range_param1),
    #                          ('criterion_2', criteria),
    #                          ]
    # elif name in ('residualize_gpr', 'residualize_gaussianprocessregression'):
    #     from confounds.base import Residualize
    #     xfm =  Residualize(model='GPR')
    #     param_list_values = [('param_1', range_param1),
    #                          ('criterion_2', criteria),
    #                          ]
    elif xfm_name in ('augment', 'pad'):
        from confounds.base import Augment
        xfm =  Augment()

confounds

Conquering confounds and covariates in machine learning

Apache-2.0
Latest version published 3 years ago

Package Health Score

42 / 100
Full package analysis