def ExpWithin(*args, **kwargs):

    #Example of a node expander
    #Single function call returns a list of nodes
    #Calling function must accept a list of nodes

    if ("n_folds" in kwargs):
        n_folds = kwargs["n_folds"]
    else:
        n_folds = 5

    args = list(args)
    estimators = copy.copy(args[1])

    node_list = []
    for k in range(n_folds):
        for estimator in estimators:
            new_estimator = {estimator: estimators[estimator]}
            args[1] = new_estimator
            kwargs["fold"] = k
            name = "EXP-Within(%d): %s" % (k + 1, estimator)
            node_list.append(
                node(function=__ExpWithin,
                     args=copy.copy(args),
                     kwargs=copy.copy(kwargs),
                     name=name))

    return node_list
def ExpTrainTest(*args, **kwargs):

    if ("name" in kwargs):
        name = kwargs["name"]
        del kwargs["name"]
    else:
        name = "Train-Test Experiment"

    if ("n_folds" in kwargs):
        n_folds = kwargs["n_folds"]
    else:
        n_folds = 5

    args = list(args)
    estimators = copy.copy(args[1])

    node_list = []
    for estimator in estimators:
        new_estimator = {estimator: estimators[estimator]}
        args[1] = new_estimator
        name = "EXP-TT: %s" % (estimator)
        node_list.append(
            node(function=__ExpTrainTest,
                 args=copy.copy(args),
                 kwargs=copy.copy(kwargs),
                 name=name))

    return node_list
Exemplo n.º 3
0
def ResultsConcat(*args, **kwargs):

    new_args = []
    for arg in args:
        if (type(arg) == list):
            new_args = new_args + arg
        else:
            new_args.append(arg)

    return node(function=__ResultsConcat,
                args=new_args,
                kwargs=kwargs,
                name="Results Concat")
Exemplo n.º 4
0
def dummy_data_loader(**kwargs):
    return node(function=__dummy_data_loader,
                kwargs=kwargs,
                name=" Dummy Data Loader")
Exemplo n.º 5
0
def extrasensory_data_loader(**kwargs):
    return node(function=__extrasensory_data_loader,
                kwargs=kwargs,
                name="ES Data Loader")
Exemplo n.º 6
0
def ResultsCVSummarize(*args, **kwargs):
    return node(function=__ResultsCVSummarize,
                args=args,
                kwargs=kwargs,
                name="Results CV Summarize")
Exemplo n.º 7
0
def DataYieldReport(*args, **kwargs):
    return node(function=__DataYieldReport,
                args=args,
                kwargs=kwargs,
                name="Data Yield Analysis")
Exemplo n.º 8
0
def Imputer(*args, **kwargs):
    return node(function=__Imputer, args=args, kwargs=kwargs, name="Imputer")
Exemplo n.º 9
0
def MisingLabelFilter(*args, **kwargs):
    return node(function = __MisingLabelFilter, args=args, kwargs=kwargs, name="Missing Label Filter")
Exemplo n.º 10
0
def Take(*args, **kwargs):
    return node(function = __Take, args=args, kwargs=kwargs, name="Take")
Exemplo n.º 11
0
def MisingDataColumnFilter(*args, **kwargs):
    return node(function = __MisingDataColumnFilter, args=args, kwargs=kwargs, name="Missing Data Column Filter")    
Exemplo n.º 12
0
def Normalizer(*args, **kwargs):
    return node(function=__Normalizer,
                args=args,
                kwargs=kwargs,
                name="Normalizer")