From 280c96f7c9316e5d240f4a5fb4cfb8f0db5d106c Mon Sep 17 00:00:00 2001 From: coolneng Date: Wed, 9 Dec 2020 14:35:37 +0100 Subject: [PATCH] Sort all imports --- shell.nix | 1 + src/preprocessing.py | 2 +- src/processing.py | 18 +++++++++--------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/shell.nix b/shell.nix index 3ca0222..ef37162 100644 --- a/shell.nix +++ b/shell.nix @@ -8,5 +8,6 @@ mkShell { python38Packages.pandas python38Packages.scikitlearn python38Packages.seaborn + python38Packages.isort ]; } diff --git a/src/preprocessing.py b/src/preprocessing.py index c6335a8..e5c6031 100644 --- a/src/preprocessing.py +++ b/src/preprocessing.py @@ -1,6 +1,6 @@ from pandas import read_csv -from sklearn.preprocessing import LabelEncoder from sklearn.model_selection import KFold +from sklearn.preprocessing import LabelEncoder def replace_values(df): diff --git a/src/processing.py b/src/processing.py index af17e1e..c2c0521 100644 --- a/src/processing.py +++ b/src/processing.py @@ -1,16 +1,16 @@ -from numpy import mean, arange +from sys import argv + +from matplotlib.pyplot import * +from numpy import arange, mean +from pandas import DataFrame, cut +from seaborn import countplot, heatmap, set_style, set_theme from sklearn.metrics import confusion_matrix, roc_auc_score, roc_curve from sklearn.naive_bayes import GaussianNB -from sklearn.neural_network import MLPClassifier from sklearn.neighbors import KNeighborsClassifier +from sklearn.neural_network import MLPClassifier from sklearn.preprocessing import scale from sklearn.svm import LinearSVC from sklearn.tree import DecisionTreeClassifier -from seaborn import set_theme, set_style, heatmap, countplot -from matplotlib.pyplot import * -from pandas import DataFrame, cut - -from sys import argv from preprocessing import parse_data, split_k_sets @@ -110,8 +110,8 @@ def plot_attributes_correlation(data, target): def plot_all_figures(results, data, target): set_theme() - # plot_roc_auc_curve(results=results) - # plot_confusion_matrix(results=results) + plot_roc_auc_curve(results=results) + plot_confusion_matrix(results=results) plot_attributes_correlation(data=data, target=target)