def baseline_algorithm(train, test, algorithm, only=False):
    (_, y_train, X_train) = train
    (_, y_test, X_test) = test
    (X_train, X_test) = (preprocessing.scale(X_train), preprocessing.scale(X_test))
    (acc, prc, rc, f1, auc_) = (0, 0, 0, 0, 0)
    if (algorithm == 'lr'):
        starttime = time.time()
        model = LogisticRegression(max_iter=7000).fit(X_train, y_train)
        endtime = time.time()
        dtime = (endtime - starttime)
        print(('Train Time: %.8s s' % dtime))
        starttime = time.time()
        y_pred = model.predict_proba(X_test)[:, 1]
        endtime = time.time()
        dtime = (endtime - starttime)
        print(('Eval Time: %.8s s' % dtime))
        (acc, prc, rc, f1, auc_) = evaluation_metrics(y_true=y_test, y_pred=y_pred)
        if (only and (not ('cross' in args.data))):
            auc_ = train_and_evl(X_train, y_train, args)
        print(('Accuracy: %f -- Precision: %f -- Recall: %f -- F1: %f -- AUC: %f' % (acc, prc, rc, f1, auc_)))
    elif (algorithm == 'dbn'):
        y_pred = DBN_JIT(X_train, y_train, X_test, y_test)
        (acc, prc, rc, f1, auc_) = evaluation_metrics(y_true=y_test, y_pred=y_pred)
        (acc, prc, rc, f1) = (0, 0, 0, 0)
        print(('Accuracy: %f -- Precision: %f -- Recall: %f -- F1: %f -- AUC: %f' % (acc, prc, rc, f1, auc_)))
    else:
        print('You need to give the correct algorithm name')
        return
    return (y_test, y_pred)
def baseline_algorithm(train, test, algorithm, only=False):
    (_, y_train, X_train) = train
    (_, y_test, X_test) = test
    (X_train, X_test) = (preprocessing.scale(X_train), preprocessing.scale(X_test))
    (acc, prc, rc, f1, auc_) = (0, 0, 0, 0, 0)
    if (algorithm == 'lr'):
        starttime = time.time()
        model = LogisticRegression(max_iter=7000).fit(X_train, y_train)
        endtime = time.time()
        dtime = (endtime - starttime)
        print(('Train Time: %.8s s' % dtime))
        starttime = time.time()
        y_pred = model.predict_proba(X_test)[:, 1]
        endtime = time.time()
        dtime = (endtime - starttime)
        print(('Eval Time: %.8s s' % dtime))
        (acc, prc, rc, f1, auc_) = evaluation_metrics(y_true=y_test, y_pred=y_pred)
        if (only and (not ('cross' in args.data))):
            auc_ = train_and_evl(X_train, y_train, args)
        print(('Accuracy: %f -- Precision: %f -- Recall: %f -- F1: %f -- AUC: %f' % (acc, prc, rc, f1, auc_)))
    elif (algorithm == 'dbn'):
        y_pred = DBN_JIT(X_train, y_train, X_test, y_test)
        (acc, prc, rc, f1, auc_) = evaluation_metrics(y_true=y_test, y_pred=y_pred)
        (acc, prc, rc, f1) = (0, 0, 0, 0)
        print(('Accuracy: %f -- Precision: %f -- Recall: %f -- F1: %f -- AUC: %f' % (acc, prc, rc, f1, auc_)))
    else:
        print('You need to give the correct algorithm name')
        return
    return (y_test, y_pred)