|
a |
|
b/load.py |
|
|
1 |
import plot |
|
|
2 |
from binary_classification.svm import svm_pipeline |
|
|
3 |
from binary_classification.cart import cart_pipeline |
|
|
4 |
from binary_classification.boosted_tree import xgb_pipeline |
|
|
5 |
from binary_classification.random_forests import rf_pipeline |
|
|
6 |
from conditional_probability.logistic import lr_pipeline |
|
|
7 |
from conditional_probability.naive_bayes import nb_pipeline |
|
|
8 |
from preprocessing import preprocessing, get_train_and_test, standardize_features |
|
|
9 |
|
|
|
10 |
import warnings |
|
|
11 |
warnings.filterwarnings("ignore") |
|
|
12 |
|
|
|
13 |
|
|
|
14 |
def pipeline(): |
|
|
15 |
""" |
|
|
16 |
This function acts as a pipeline and calls the needed functions before |
|
|
17 |
any actual machine learning occurs. |
|
|
18 |
""" |
|
|
19 |
x_values, y_values = preprocessing() |
|
|
20 |
x_train, x_test, y_train, y_test = get_train_and_test(x_values, y_values) |
|
|
21 |
x_train, x_test = standardize_features(x_train, x_test) |
|
|
22 |
|
|
|
23 |
print(" AUC Accuracy") |
|
|
24 |
print("SVM: ", svm_pipeline(x_train, y_train, x_test, y_test)) |
|
|
25 |
print("CART: ", cart_pipeline(x_train, y_train, x_test, y_test)) |
|
|
26 |
print("XGB: ", xgb_pipeline(x_train, y_train, x_test, y_test)) |
|
|
27 |
print("RF: ", rf_pipeline(x_train, y_train, x_test, y_test)) |
|
|
28 |
print("LOG: ", lr_pipeline(x_train, y_train, x_test, y_test)) |
|
|
29 |
print("NB: ", nb_pipeline(x_train, y_train, x_test, y_test)) |
|
|
30 |
plot.show_data() |
|
|
31 |
|
|
|
32 |
|
|
|
33 |
pipeline() |