Esempio n. 1
0
def experiment3_0_1(train, test, k):
    over_sampled_train = SMOTEOverSampling(train)
    keep = lowVarianceElimination(over_sampled_train, 0.8)
    keep = univariateFSelect(over_sampled_train[keep], k)
    train = Standardization(over_sampled_train[keep])
    test = Standardization(test[keep])
    return svm(train, test)
Esempio n. 2
0
def majority_vote_exp_1(train, test, f):
    over_sampled_train = SMOTEOverSampling(train)
    keep = univariateFSelect(over_sampled_train)
    keep = f(over_sampled_train[keep])
    train = Standardization(over_sampled_train[keep])
    test = Standardization(test[keep])
    return randomForest_neuralNet_svm(train, test)
Esempio n. 3
0
def experiment4(train, test, variance):
    over_sampled_train = SMOTEOverSampling(train)
    keep = lowVarianceElimination(over_sampled_train, variance)
    keep = lassoFSelect(over_sampled_train[keep])
    train = Standardization(over_sampled_train[keep])
    test = Standardization(test[keep])
    return svm(train, test)
Esempio n. 4
0
def experiment2_1(train, test, f):
    over_sampled_train = SMOTEOverSampling(train)
    keep = decisionTreeFSelect(over_sampled_train, 1000)
    keep = f(over_sampled_train[keep])
    train = Standardization(over_sampled_train[keep])
    test = Standardization(test[keep])
    return svm(train, test)
Esempio n. 5
0
def experiment10_1(train, test, f):
    over_sampled_train = SMOTEOverSampling(train)
    keep = decisionTreeFSelect(over_sampled_train)
    keep = f(over_sampled_train[keep])
    train = over_sampled_train[keep]
    test = test[keep]
    return svm(train, test)
Esempio n. 6
0
def experiment3_2(train, test, variance):
    over_sampled_train = SMOTEOverSampling(train)
    keep = lowVarianceElimination(over_sampled_train, variance)
    keep = decisionTreeFSelect(over_sampled_train[keep], 1000)
    train = Standardization(over_sampled_train[keep])
    test = Standardization(test[keep])
    return svm(train, test)
Esempio n. 7
0
def experiment6(train, test, f):
    over_sampled_train = SMOTEOverSampling(train)
    keep = univariateFSelect(over_sampled_train)
    keep = f(over_sampled_train[keep])
    train = Standardization(over_sampled_train[keep])
    test = Standardization(test[keep])
    return randomForest(train, test)
Esempio n. 8
0
def experiment10(train, test, f):
    over_sampled_train = SMOTEOverSampling(train)
    keep = univariateFSelect(over_sampled_train)
    keep = f(over_sampled_train[keep])
    train = over_sampled_train[keep]
    test = test[keep]
    return svm(train, test)
Esempio n. 9
0
def pca_n_components_exp(train, test, components):
    over_sampled_train = SMOTEOverSampling(train)
    keep = lowVarianceElimination(over_sampled_train, 0.8)
    train = _PCA(over_sampled_train[keep], components)
    test = _PCA(test[keep], components)
    return svm(train, test)
Esempio n. 10
0
def univariate_function_exp_SM_UFS_ST_SVM(train, test, score_function):
    over_sampled_train = SMOTEOverSampling(train)
    keep = univariateFSelect(over_sampled_train, score_func=score_function)
    train = Standardization(over_sampled_train[keep])
    test = Standardization(test[keep])
    return svm(train, test)
Esempio n. 11
0
def neuralNet_epoch_exp_SM_LV_ST_NN(train, test, epochs):
    over_sampled_train = SMOTEOverSampling(train)
    keep = lowVarianceElimination(over_sampled_train, 0.8)
    train = Standardization(over_sampled_train[keep])
    test = Standardization(test[keep])
    return feedForwardNN(train, test, epochs=epochs)
Esempio n. 12
0
def random_forest_depth_exp_SM_LV_ST_RF(train, test, max_depth):
    over_sampled_train = SMOTEOverSampling(train)
    keep = lowVarianceElimination(over_sampled_train, 0.8)
    train = Standardization(over_sampled_train[keep])
    test = Standardization(test[keep])
    return randomForest(train, test, max_depth=max_depth)
Esempio n. 13
0
def experiment1(train, test, f):
    over_sampled_train = SMOTEOverSampling(train)
    keep = f(over_sampled_train)
    train = Standardization(over_sampled_train[keep])
    test = Standardization(test[keep])
    return svm(train, test)
Esempio n. 14
0
def experiment13(train, test, f):
    over_sampled_train = SMOTEOverSampling(train)
    keep = f(over_sampled_train)
    train = over_sampled_train[keep]
    test = test[keep]
    return feedForwardNN(train, test)
Esempio n. 15
0
def experiment9(train, test, f):
    over_sampled_train = SMOTEOverSampling(train)
    keep = f(over_sampled_train)
    train = over_sampled_train[keep]
    test = test[keep]
    return svm(train, test)
Esempio n. 16
0
def experiment12_1(train, test, f):
    over_sampled_train = SMOTEOverSampling(train)
    keep = decisionTreeFSelect(over_sampled_train)
    keep = f(over_sampled_train[keep])
    return randomForest(over_sampled_train[keep], test[keep])
Esempio n. 17
0
def experiment12(train, test, f):
    over_sampled_train = SMOTEOverSampling(train)
    keep = univariateFSelect(over_sampled_train)
    keep = f(over_sampled_train[keep])
    return randomForest(over_sampled_train[keep], test[keep])
Esempio n. 18
0
def experiment11(train, test, f):
    over_sampled_train = SMOTEOverSampling(train)
    keep = f(over_sampled_train)
    return randomForest(over_sampled_train[keep], test[keep])