diff --git a/src/processing.py b/src/processing.py index 65181ac..8e6c704 100644 --- a/src/processing.py +++ b/src/processing.py @@ -8,6 +8,8 @@ from sklearn.preprocessing import scale from sklearn.svm import LinearSVC from sklearn.tree import DecisionTreeClassifier +from sys import argv + from preprocessing import parse_data, split_k_sets @@ -62,9 +64,25 @@ def evaluate_performance(confusion_matrix, accuracy, cv_score, auc): print("AUC: " + str(auc)) +def usage(): + print("Usage: " + argv[0] + " ") + print("preprocessing actions:") + print("fill: fills the na values with the mean") + print("drop: drops the na values") + print("models:") + print("gnb: Gaussian Naive Bayes") + print("svc: Linear Support Vector Classification") + print("knn: K-neighbors") + print("tree: Decision tree") + print("neuralnet: MLP Classifier") + exit() + + def main(): - data, target = parse_data(source="data/mamografia.csv", action="drop") - predict_data(data=data, target=target, model="neuralnet") + if len(argv) != 3: + usage() + data, target = parse_data(source="data/mamografia.csv", action=str(argv[1])) + predict_data(data=data, target=target, model=str(argv[2])) if __name__ == "__main__":